예제 #1
0
 public BINValue(IBINValue parent, uint property, object value, BINValueType type)
 {
     this.Parent   = parent;
     this.Property = property;
     this.Value    = value;
     this.Type     = type;
 }
예제 #2
0
 public BINMap(IBINValue parent, BINValueType keyType, BINValueType valueType, Dictionary <BINValue, BINValue> values)
 {
     this.Parent    = parent;
     this.KeyType   = keyType;
     this.ValueType = valueType;
     this.Values    = values;
 }
예제 #3
0
        private static bool IsPrimitiveValue(BINValueType type)
        {
            if (type != BINValueType.Container && type != BINValueType.Structure && type != BINValueType.Embedded && type != BINValueType.Map && type != BINValueType.OptionalData)
            {
                return(true);
            }

            return(false);
        }
예제 #4
0
        public static BINValueType PackType(BINValueType type)
        {
            if ((int)type >= 18 && (int)type <= 24)
            {
                type = (BINValueType)(((int)type - 18) | COMPLEX_TYPE_FLAG);
            }

            return(type);
        }
예제 #5
0
        public static BINValueType UnpackType(BINValueType type)
        {
            if (((int)type & COMPLEX_TYPE_FLAG) == COMPLEX_TYPE_FLAG)
            {
                type -= COMPLEX_TYPE_FLAG;
                type += 18;
            }

            return(type);
        }
예제 #6
0
 private static bool IsPrimitiveType(BINValueType type)
 {
     return(type != BINValueType.Container && type != BINValueType.Embedded && type != BINValueType.Structure &&
            type != BINValueType.LinkOffset && type != BINValueType.Map && type != BINValueType.Optional &&
            type != BINValueType.Hash);
 }