Beispiel #1
0
 /// <summary>
 /// Adds a custom attribute whose value is a JSON value of any kind, and ensures that the
 /// attribute will not be sent back to LaunchDarkly. When set to one of the
 /// <a href="http://docs.launchdarkly.com/docs/targeting-users#targeting-based-on-user-attributes">built-in
 /// user attribute keys</a>, this custom attribute will be ignored.
 /// </summary>
 /// <param name="user">the user</param>
 /// <param name="attribute">the key for the custom attribute</param>
 /// <param name="value">the value for the custom attribute</param>
 /// <returns>the same user</returns>
 public static User AndPrivateCustomAttribute(this User user, string attribute, JToken value)
 {
     return(user.AddCustom(attribute, value).AddPrivate(attribute));
 }
Beispiel #2
0
 /// <summary>
 /// Adds a <c>long</c>-valued custom attribute, and ensures that the attribute will not
 /// be sent back to LaunchDarkly. When set to one of the
 /// <a href="http://docs.launchdarkly.com/docs/targeting-users#targeting-based-on-user-attributes">built-in
 /// user attribute keys</a>, this custom attribute will be ignored.
 /// </summary>
 /// <param name="user">the user</param>
 /// <param name="attribute">the key for the custom attribute</param>
 /// <param name="value">the value for the custom attribute</param>
 /// <returns>the same user</returns>
 public static User AndPrivateCustomAttribute(this User user, string attribute, long value)
 {
     return(user.AddCustom(attribute, new JValue(value)).AddPrivate(attribute));
 }
Beispiel #3
0
 /// <summary>
 /// Adds a custom attribute who value is a list of ints, and ensures that the attribute will not
 /// be sent back to LaunchDarkly. When set to one of the
 /// <a href="http://docs.launchdarkly.com/docs/targeting-users#targeting-based-on-user-attributes">built-in
 /// user attribute keys</a>, this custom attribute will be ignored.
 /// </summary>
 /// <param name="user">the user</param>
 /// <param name="attribute">the key for the custom attribute</param>
 /// <param name="value">the value for the custom attribute</param>
 /// <returns>the same user</returns>
 public static User AndPrivateCustomAttribute(this User user, string attribute, List <int> value)
 {
     return(user.AddCustom(attribute, new JArray(value.ToArray())).AddPrivate(attribute));
 }
Beispiel #4
0
 /// <summary>
 /// Adds a <c>float</c>-valued custom attribute. When set to one of the
 /// <a href="http://docs.launchdarkly.com/docs/targeting-users#targeting-based-on-user-attributes">built-in
 /// user attribute keys</a>, this custom attribute will be ignored.
 /// </summary>
 /// <param name="user">the user</param>
 /// <param name="attribute">the key for the custom attribute</param>
 /// <param name="value">the value for the custom attribute</param>
 /// <returns>the same user</returns>
 public static User AndCustomAttribute(this User user, string attribute, float value)
 {
     return(user.AddCustom(attribute, new JValue(value)));
 }