Class for all constants which are used to indicate change types.

Namespace:  BioSharp.Core.Utils
Assembly:  BioSharp.Core (in BioSharp.Core.dll) Version: 0.1.3191.26120 (0.1.0.0)

Syntax

C#
public sealed class ChangeType

Remarks

Note that all ChangeType objects must be accessible via a public static field of some class or interface. These should be specified at construction time, so that the ChangeType can be properly serialized. Typically, they should be constructed using code like:

CopyC#
class MyClassWhichCanFireChangeEvents
{
    public static readonly ChangeType CHANGE_COLOR = new ChangeType(
                   "Color change",
                   typeof(MyClassWhichCanFireChangeEvents),
                   "CHANGE_COLOR");
    // Rest of the class here...
}

The known ChangeTypes of a system follow a simple hierarchy with single inheritance. All ChangeTypes (except ChangeType.UNKNOWN) have a parent ChangeType (defaulting to ChangeType.UNKNOWN). Generally, when a listener is registered for changetype foo, changes of type bar should be accepted if bar is a sub-type of foo. This can be checked using an expression like:

CopyC#
bar.IsMatchingType(foo);

Original BioJava version by Thomas Down and Matthew Pocock. Port to C# by Doug Swisher.

Inheritance Hierarchy

System..::.Object
  BioSharp.Core.Utils..::.ChangeType

See Also