public static string xIdentifyObjectToDictionary(XIdentify xIdentify) { Dictionary <string, object> dictionary = new Dictionary <string, object>(); if (xIdentify.getSet() != null) { dictionary.Add("$set", xIdentify.getSet()); } if (xIdentify.getSetOnce() != null) { dictionary.Add("$setOnce", xIdentify.getSetOnce()); } if (xIdentify.getUnset() != null) { dictionary.Add("$unset", xIdentify.getUnset()); } if (xIdentify.getAdd() != null) { dictionary.Add("$add", xIdentify.getAdd()); } if (xIdentify.getAppend() != null) { dictionary.Add("$append", xIdentify.getAppend()); } if (xIdentify.getPrepend() != null) { dictionary.Add("$prepend", xIdentify.getPrepend()); } string json = Serializer.Serialize(dictionary); Debug.Log("xIdentify json string : " + json); return(json); }
public static void groupIdentify(string key, string value, XIdentify xIdentify) { string groupString = groupObjectToDictionary(key, value); string xIdentifyString = xIdentifyObjectToDictionary(xIdentify); CallGroupIdentify(groupString, xIdentifyString); }
public static void userIdentify(XIdentify xIdentify) { Debug.Log("set user identify"); if (unityHelperInstance != null) { string xIdentifyString = xIdentifyObjectToDictionary(xIdentify); unityHelperInstance.Call("userIdentify", xIdentifyString); } }
public static void groupIdentify(string key, string value, XIdentify xIdentify) { Debug.Log("set group identify"); if (unityHelperInstance != null) { string xIdentifyString = xIdentifyObjectToDictionary(xIdentify); unityHelperInstance.Call("groupIdentify", key, value, xIdentifyString); } }
public static void userIdentify(XIdentify identify) { }
public static void groupIdentify(string key, string value, XIdentify identify) { }
public static void userIdentify(XIdentify xIdentify) { string xIdentifyString = xIdentifyObjectToDictionary(xIdentify); CallUserIdentify(xIdentifyString); }