static Element FromStream(Stream source) { var identifier = new ClassIdentifier(source); var elementType = ElementDefinitions[identifier]; Element element = elementType != null ? (Element)Activator.CreateInstance(elementType) : new UnknownElement(identifier); element.Initialize(source); return(element); }
public ElementAttribute(ClassIdentifier identifier, ElementTypes type, string description = null) : this(type, description) { ClassIdentifier = identifier; }
public ElementAttribute(byte a, byte b, byte c, byte d, ElementTypes type, string description = null) : this(type, description) { ClassIdentifier = new ClassIdentifier(a, b, c, d); }
public ElementAttribute(int identifier, ElementTypes type, string description = null) : this(type, description) { ClassIdentifier = new ClassIdentifier(identifier); }
protected Element(Stream source) { var identifier = new ClassIdentifier(source); Initialize(source); }