Click or drag to resize

ActivationFile Class

Represents a text file with a list of app IDs.
Inheritance Hierarchy

Namespace:  Mastersign.Bench
Assembly:  BenchLib (in BenchLib.dll) Version: (
public class ActivationFile : IEnumerable<string>, 

The ActivationFile type exposes the following members.

Public methodActivationFile
Initializes a new instance of ActivationFile.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetEnumerator
Returns all app IDs listed as active.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodSignIn
Makes shure, the given app ID is listed active.
The text file is updated immediately.
Public methodSignOut
Makes shure, the given app ID is not listed active.
The text file is updated immediately.
Public methodToString (Inherited from Object.)

The syntax of the text file follows the following rules:

  • Empty lines are ignored.
  • Lines with nothing but white space are ignored.
  • White space at the beginning and the end of lines is trimmed.
  • Lines starting with # are ignored.
  • The first word (contiguous non white space) in a line is considered to be an app ID.
  • Additional characters after the first word are ignored, and can be used to commment the entry.
A text file represented by this class could look like this:
# --- Activated Apps --- #

AppB (this app has a comment)
 AppC (this app ID is valid, despite the fact, that it is indended)

# AppD (this app is not activated, because the line is commented out)
AppE some arbitrary comment
See Also