private void AddAttribute(ImaqdxAttributeInformation attributeInfo) { ImaqdxAttribute attribute = null; switch (attributeInfo.Type) { case ImaqdxAttributeType.UInt32: attribute = new ImaqdxUInt32Attribute(_session, attributeInfo); break; case ImaqdxAttributeType.Int64: attribute = new ImaqdxInt64Attribute(_session, attributeInfo); break; case ImaqdxAttributeType.Double: attribute = new ImaqdxDoubleAttribute(_session, attributeInfo); break; case ImaqdxAttributeType.String: attribute = new ImaqdxStringAttribute(_session, attributeInfo); break; case ImaqdxAttributeType.Enum: attribute = new ImaqdxEnumAttribute(_session, attributeInfo); break; case ImaqdxAttributeType.Boolean: attribute = new ImaqdxBoolAttribute(_session, attributeInfo); break; case ImaqdxAttributeType.Command: attribute = new ImaqdxCommandAttribute(_session, attributeInfo); break; default: attribute = new ImaqdxAttribute(_session, attributeInfo); break; } Items.Add(attribute); int index = Items.Count - 1; _attributeLookupTable.Add(attribute.Name, index); }
internal ImaqdxCommandAttribute(ImaqdxSession session, ImaqdxAttributeInformation attributeInfo) : base(session, attributeInfo) { }
internal ImaqdxInt64Attribute(ImaqdxSession session, ImaqdxAttributeInformation attributeInfo) : base(session, attributeInfo) { _numericAttribute = new ImaqdxNumericAttribute <long>(this); }
internal ImaqdxUInt32Attribute(ImaqdxSession session, ImaqdxAttributeInformation attributeInfo) : base(session, attributeInfo) { _numericAttribute = new ImaqdxNumericAttribute <uint>(this); }
internal ImaqdxAttribute(ImaqdxSession session, ImaqdxAttributeInformation attributeInfo) { _session = session; _name = attributeInfo.Name; _type = attributeInfo.Type; }
internal ImaqdxDoubleAttribute(ImaqdxSession session, ImaqdxAttributeInformation attributeInfo) : base(session, attributeInfo) { _numericAttribute = new ImaqdxNumericAttribute <double>(this); }