Woopsa.WoopsaValue.DeserializedJsonToWoopsaValue C# (CSharp) Method

DeserializedJsonToWoopsaValue() public static method

public static DeserializedJsonToWoopsaValue ( object deserializedJson, WoopsaValueType type, System.DateTime timeStamp = null ) : WoopsaValue
deserializedJson object
type WoopsaValueType
timeStamp System.DateTime
return WoopsaValue
        public static WoopsaValue DeserializedJsonToWoopsaValue(object deserializedJson,
            WoopsaValueType type, DateTime? timeStamp = null)
        {
            if (type == WoopsaValueType.JsonData)
                return new WoopsaValue(Woopsa.WoopsaJsonData.CreateFromDeserializedData(deserializedJson));
            else
                return ToWoopsaValue(deserializedJson, type, timeStamp);
        }

Usage Example

示例#1
0
        internal string InvokeMethodDeserializedJson(string path, Dictionary <string, object> arguments)
        {
            int argumentsCount = arguments != null ? arguments.Count : 0;

            return(InvokeMethod(path, argumentsCount,
                                (argumentName, woopsaValueType) =>
            {
                object argumentValue = arguments[argumentName];
                if (argumentValue != null)
                {
                    return WoopsaValue.DeserializedJsonToWoopsaValue(
                        argumentValue, woopsaValueType);
                }
                else
                {
                    return null;
                }
            }));
        }
All Usage Examples Of Woopsa.WoopsaValue::DeserializedJsonToWoopsaValue