示例#1
0
        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);
        }
示例#2
0
 internal ImaqdxCommandAttribute(ImaqdxSession session, ImaqdxAttributeInformation attributeInfo)
     : base(session, attributeInfo)
 {
 }
示例#3
0
 internal ImaqdxInt64Attribute(ImaqdxSession session, ImaqdxAttributeInformation attributeInfo)
     : base(session, attributeInfo)
 {
     _numericAttribute = new ImaqdxNumericAttribute <long>(this);
 }
示例#4
0
 internal ImaqdxUInt32Attribute(ImaqdxSession session, ImaqdxAttributeInformation attributeInfo)
     : base(session, attributeInfo)
 {
     _numericAttribute = new ImaqdxNumericAttribute <uint>(this);
 }
示例#5
0
 internal ImaqdxAttribute(ImaqdxSession session, ImaqdxAttributeInformation attributeInfo)
 {
     _session = session;
     _name    = attributeInfo.Name;
     _type    = attributeInfo.Type;
 }
示例#6
0
 internal ImaqdxDoubleAttribute(ImaqdxSession session, ImaqdxAttributeInformation attributeInfo)
     : base(session, attributeInfo)
 {
     _numericAttribute = new ImaqdxNumericAttribute <double>(this);
 }