예제 #1
0
        public Dictionary <object, object> GetValue()
        {
            var ret = new Dictionary <object, object>(Value.Count);

            foreach (var(key, value) in Value)
            {
                ret[key] = value switch
                {
                    ByteProperty byteProperty => byteProperty.GetValue(),
                    BoolProperty boolProperty => boolProperty.GetValue(),
                    IntProperty intProperty => intProperty.GetValue(),
                    FloatProperty floatProperty => floatProperty.GetValue(),
                    ObjectProperty objectProperty => objectProperty.GetValue(),
                    NameProperty nameProperty => nameProperty.GetValue(),
                    DelegateProperty delegateProperty => delegateProperty.GetValue(),
                    DoubleProperty doubleProperty => doubleProperty.GetValue(),
                    ArrayProperty arrayProperty => arrayProperty.GetValue(),
                    StructProperty structProperty => structProperty.GetValue(),
                    StrProperty strProperty => strProperty.GetValue(),
                    TextProperty textProperty => textProperty.GetValue(),
                    InterfaceProperty interfaceProperty => interfaceProperty.GetValue(),
                    SoftObjectProperty softObjectProperty => softObjectProperty.GetValue(),
                    UInt64Property uInt64Property => uInt64Property.GetValue(),
                    UInt32Property uInt32Property => uInt32Property.GetValue(),
                    UInt16Property uInt16Property => uInt16Property.GetValue(),
                    Int64Property int64Property => int64Property.GetValue(),
                    Int16Property int16Property => int16Property.GetValue(),
                    Int8Property int8Property => int8Property.GetValue(),
                    MapProperty mapProperty => mapProperty.GetValue(),
                    SetProperty setProperty => setProperty.GetValue(),
                    EnumProperty enumProperty => enumProperty.GetValue(),
                                 _ => value,
                };
            }
            return(ret);
        }
예제 #2
0
        public object[] GetValue()
        {
            var ret = new object[Value.Length];

            for (int i = 0; i < ret.Length; i++)
            {
                ret[i] = Value[i] switch
                {
                    ByteProperty byteProperty => byteProperty.GetValue(),
                    BoolProperty boolProperty => boolProperty.GetValue(),
                    IntProperty intProperty => intProperty.GetValue(),
                    FloatProperty floatProperty => floatProperty.GetValue(),
                    ObjectProperty objectProperty => objectProperty.GetValue(),
                    NameProperty nameProperty => nameProperty.GetValue(),
                    DelegateProperty delegateProperty => delegateProperty.GetValue(),
                    DoubleProperty doubleProperty => doubleProperty.GetValue(),
                    ArrayProperty arrayProperty => arrayProperty.GetValue(),
                    StructProperty structProperty => structProperty.GetValue(),
                    StrProperty strProperty => strProperty.GetValue(),
                    TextProperty textProperty => textProperty.GetValue(),
                    InterfaceProperty interfaceProperty => interfaceProperty.GetValue(),
                    SoftObjectProperty softObjectProperty => softObjectProperty.GetValue(),
                    UInt64Property uInt64Property => uInt64Property.GetValue(),
                    UInt32Property uInt32Property => uInt32Property.GetValue(),
                    UInt16Property uInt16Property => uInt16Property.GetValue(),
                    Int64Property int64Property => int64Property.GetValue(),
                    Int16Property int16Property => int16Property.GetValue(),
                    Int8Property int8Property => int8Property.GetValue(),
                    MapProperty mapProperty => mapProperty.GetValue(),
                    SetProperty setProperty => setProperty.GetValue(),
                    EnumProperty enumProperty => enumProperty.GetValue(),
                                 _ => Value[i],
                };
            }
            return(ret);
        }