Appboy.AppboyBinding.ParsePropertiesToAppboyProperties C# (CSharp) Method

ParsePropertiesToAppboyProperties() public static method

public static ParsePropertiesToAppboyProperties ( object>.Dictionary properties ) : AndroidJavaObject
properties object>.Dictionary
return UnityEngine.AndroidJavaObject
        public static AndroidJavaObject ParsePropertiesToAppboyProperties(Dictionary<string, object> properties)
        {
            AndroidJavaObject appboyProperties = new AndroidJavaObject("com.appboy.models.outgoing.AppboyProperties");
              if (properties != null && properties.Count > 0) {
            foreach (KeyValuePair<string, object> entry in properties) {
              if (entry.Value == null) {
            continue;
              }

              // Public API only supports int/string/double/bool/DateTime.  Other values can't get mapped
              // to Android AppboyProperty methods without casting.
              if (entry.Value.GetType() == typeof(int) || entry.Value.GetType() == typeof(string) ||
              entry.Value.GetType() == typeof(double) || entry.Value.GetType() == typeof(bool)) {
            appboyProperties.Call<AndroidJavaObject>("addProperty", entry.Key, entry.Value);
              } else {
            appboyProperties.Call<AndroidJavaObject>("addProperty", entry.Key, entry.Value.ToString());
              }
            }
              }
              return appboyProperties;
        }
AppboyBinding