private ProfileUpdate GetProfileUpdate1() { ProfileUpdate pu = new ProfileUpdate(Token, "13793", ProfileUpdateOperation.Set); pu.IP = "123.123.123.123"; pu.OperationValues["Address"] = "1313 Mockingbird Lane"; pu.OperationValues["Birthday"] = "1948-01-01"; return pu; }
/// <summary> /// Contains the specified profile update to the local store. /// </summary> /// <param name="profileUpdate">The profile update.</param> /// <exception cref="System.ArgumentNullException">profileUpdate</exception> public bool Contains(ProfileUpdate profileUpdate) { if (profileUpdate == null) { throw new ArgumentNullException("profileUpdate"); } return(ProfileUpdates.Contains(profileUpdate)); }
/// <summary> /// Adds the specified profile update to the local store. /// </summary> /// <param name="profileUpdate">The profile update.</param> /// <exception cref="System.ArgumentNullException">profileUpdate</exception> public void Add(ProfileUpdate profileUpdate) { if (profileUpdate == null) { throw new ArgumentNullException("profileUpdate"); } ProfileUpdates.Add(profileUpdate); }
/// <summary> /// Determines whether the store contains the specified entity. /// </summary> /// <param name="entity">The entity.</param> /// <returns></returns> /// <exception cref="System.ArgumentNullException">entity</exception> public bool Contains(MixpanelEntity entity) { if (entity == null) { throw new ArgumentNullException("entity"); } ProfileUpdate profileUpdate = entity as ProfileUpdate; if (profileUpdate != null) { return(Contains(profileUpdate)); } TrackingEvent trackingEvent = entity as TrackingEvent; if (trackingEvent != null) { return(Contains(trackingEvent)); } return(false); }
/// <summary> /// Adds the specified entity to the local store. /// </summary> /// <param name="entity">The entity.</param> /// <exception cref="System.ArgumentNullException">entity</exception> public void Add(MixpanelEntity entity) { if (entity == null) { throw new ArgumentNullException("entity"); } ProfileUpdate profileUpdate = entity as ProfileUpdate; if (profileUpdate != null) { Add(profileUpdate); return; } TrackingEvent trackingEvent = entity as TrackingEvent; if (trackingEvent != null) { Add(trackingEvent); return; } }
private ProfileUpdate GetRevenueTracking() { ProfileUpdate pu = new ProfileUpdate(Token, "13793", ProfileUpdateOperation.Append); Dictionary<string, object> transactions = new Dictionary<string, object>(); transactions["$time"] = "2013-01-03T09:00:00"; transactions["$amount"] = 25.34f; pu.OperationValues["$transactions"] = transactions; return pu; }
private ProfileUpdate GetProfileUpdate7() { ProfileUpdate pu = new ProfileUpdate(Token, "13793", ProfileUpdateOperation.Delete); return pu; }
private ProfileUpdate GetProfileUpdate6() { ProfileUpdate pu = new ProfileUpdate(Token, "13793", ProfileUpdateOperation.Unset); pu.UnsetValueList = new List<string>() { "Days overdue" }; return pu; }
private ProfileUpdate GetProfileUpdate5() { ProfileUpdate pu = new ProfileUpdate(Token, "13793", ProfileUpdateOperation.Union); pu.OperationValues["Items purchased"] = new List<string>() { "socks", "shirts" }; return pu; }
private ProfileUpdate GetProfileUpdate4() { ProfileUpdate pu = new ProfileUpdate(Token, "13793", ProfileUpdateOperation.Append); pu.OperationValues["Power Ups"] = "Bubble Lead"; return pu; }
private ProfileUpdate GetProfileUpdate3() { ProfileUpdate pu = new ProfileUpdate(Token, "13793", ProfileUpdateOperation.Add); pu.OperationValues["Coins gathered"] = 12; return pu; }
private ProfileUpdate GetProfileUpdate2() { ProfileUpdate pu = new ProfileUpdate(Token, "13793", ProfileUpdateOperation.SetOnce); pu.OperationValues["First login date"] = MixpanelClient.ConvertToMixpanelDate(DateTime.Now); return pu; }