Esempio n. 1
0
        public FixPropValue(PropertyTag propertyTag)
            : base()
        {
            _fixedPropType = FTFactory.Instance.CreateFixedPropType();
            _propInfo = FTFactory.Instance.CreatePropInfo(propertyTag);
            _fixedSizeValue = FTFactory.Instance.CreateFixedSizeValue(_fixedPropType, propertyTag.PropType);

            Children.Add(_fixedPropType);
            Children.Add(_propInfo);
            Children.Add(_fixedSizeValue);
        }
Esempio n. 2
0
 internal IFixedSizeValue CreateFixedSizeValue(FixedPropType propType, UInt16 propTypeInt)
 {
     switch (propTypeInt)
     {
         case (UInt16)PropertyType.PT_I2:
             return new FixedInt16Value(propType);
         case (UInt16)PropertyType.PT_LONG:
             return new FixedInt32Value(propType);
         case (UInt16)PropertyType.PT_R4:
             return new FixedFloatValue(propType);
         case (UInt16)PropertyType.PT_DOUBLE:
             return new FixedDoubleValue(propType);
         case (UInt16)PropertyType.PT_CURRENCY:
             return new FixedCurrencyValue(propType);
         case (UInt16)PropertyType.PT_APPTIME:
             return new FixedFloatTimeValue(propType);
         case (UInt16)PropertyType.PT_BOOLEAN:
             return new FixedBooleanValue(propType);
         case (UInt16)PropertyType.PT_I8:
             return new FixedInt64Value(propType);
         case (UInt16)PropertyType.PT_SYSTIME:
             return new FixedSysTimeValue(propType);
         case (UInt16)PropertyType.PT_CLSID:
             return new FixedGuidValue(propType);
         default:
             throw new ArgumentException(string.Format("The type {0} is not the fixed type.", propType.Data.ToString("X4")));
     }
 }