Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public ElementAttribute(ClassIdentifier identifier, ElementTypes type, string description = null) : this(type, description)
 {
     ClassIdentifier = identifier;
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 public ElementAttribute(int identifier, ElementTypes type, string description = null) : this(type, description)
 {
     ClassIdentifier = new ClassIdentifier(identifier);
 }
Exemplo n.º 5
0
        protected Element(Stream source)
        {
            var identifier = new ClassIdentifier(source);

            Initialize(source);
        }