EmptyAccount Class

Implementation of IAccountManager which always returns empty data.

Definition

Namespace: SMath.Manager
Assembly: SMath.Manager (in SMath.Manager.dll) Version: 1.2.9018.0
C#
public class EmptyAccount : IAccountManager
Inheritance
Object    EmptyAccount
Implements
IAccountManager

Constructors

EmptyAccountInitializes a new instance of the EmptyAccount class

Properties

DisplayName Display name of the user.
License Provides access to the license information.
Login Login of the user.
Organization Describes the licensed organization. If then the license is personal.
Status Current status of sign in.

Methods

Dismiss If the user is currently signed in online then ends the licensing session, but does not sign out from the server. In case of offline activation does nothing.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Refresh

Begins asynchronous reload the account and licensing information. On completion of reload StatusChanged event is raised.

The source of information depends on the type of sign in.

  • If the user is signed in online then the information is loaded from WorkingServerUrl.
  • In case of offline activation the information is loaded from the license activation file in SettingsDirectory.

Save Saves the authentication properties to the session profile.
SignIn Signs in online anonymously to WorkingServerUrl. Credentials are derived from the environment id. On completion of operation StatusChanged event is raised.
SignIn(String, String) Signs in online with the specified credentials to WorkingServerUrl. On completion of operation StatusChanged event is raised.
SignInOffline Signs in offline by copying the specified activation file into SettingsDirectory. On completion of operation StatusChanged event is raised.
SignOut

Sings out the user and sets Status to SignedOut. On completion of operation StatusChanged event is raised.

Behavior of the method depends on the type of sign in.

  • If the user is signed in online then the licensing session is ended and the user is signed out from WorkingServerUrl.
  • In case of offline activation the license activation file is removed from SettingsDirectory.

ToStringReturns a string that represents the current object.
(Inherited from Object)

Events

StatusChanged Raised when the status of the account is changed.

Extension Methods

GetOrganizationLogoBase64

Returns the logotype of the licensed organization in PNG format, encoded as Base64 string.

If Organization is then SMath logo is retrieved from resources.


(Defined by AccountExtensions)
HasStatusFlag Determines whether Status has the specified flag set.
(Defined by AccountExtensions)
IsWorkStopper Detects whether the user cannot continue working in the program due to loss of connection or missing license.
(Defined by AccountExtensions)

See Also