Esempio n. 1
0
    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);
    }
Esempio n. 2
0
    public static void groupIdentify(string key, string value, XIdentify xIdentify)
    {
        string groupString     = groupObjectToDictionary(key, value);
        string xIdentifyString = xIdentifyObjectToDictionary(xIdentify);

        CallGroupIdentify(groupString, xIdentifyString);
    }
Esempio n. 3
0
 public static void userIdentify(XIdentify xIdentify)
 {
     Debug.Log("set user identify");
     if (unityHelperInstance != null)
     {
         string xIdentifyString = xIdentifyObjectToDictionary(xIdentify);
         unityHelperInstance.Call("userIdentify", xIdentifyString);
     }
 }
Esempio n. 4
0
 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);
     }
 }
Esempio n. 5
0
 public static void userIdentify(XIdentify identify)
 {
 }
Esempio n. 6
0
 public static void groupIdentify(string key, string value, XIdentify identify)
 {
 }
Esempio n. 7
0
    public static void userIdentify(XIdentify xIdentify)
    {
        string xIdentifyString = xIdentifyObjectToDictionary(xIdentify);

        CallUserIdentify(xIdentifyString);
    }