Struct Context
Assembly: LaunchDarkly.CommonSdk.dll
Syntax
[JsonConverter(typeof(LdJsonConverters.ContextConverter))]
public readonly struct Context : IEquatable<Context>, IJsonSerializable
Properties
Anonymous
Declaration
public bool Anonymous { get; }
Property Value
Defined
Declaration
public bool Defined { get; }
Property Value
Error
Declaration
public string Error { get; }
Property Value
FullyQualifiedKey
Declaration
public string FullyQualifiedKey { get; }
Property Value
Key
Declaration
public string Key { get; }
Property Value
Kind
Declaration
public ContextKind Kind { get; }
Property Value
MultiKindContexts
Declaration
public ImmutableList<Context> MultiKindContexts { get; }
Property Value
Multiple
Declaration
public bool Multiple { get; }
Property Value
Name
Declaration
public string Name { get; }
Property Value
OptionalAttributeNames
Declaration
public IEnumerable<string> OptionalAttributeNames { get; }
Property Value
PrivateAttributes
Declaration
public ImmutableList<AttributeRef> PrivateAttributes { get; }
Property Value
Valid
Declaration
public bool Valid { get; }
Property Value
Methods
Builder(ContextKind, string)
Declaration
public static ContextBuilder Builder(ContextKind kind, string key)
Parameters
Returns
Builder(string)
Declaration
public static ContextBuilder Builder(string key)
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
BuilderFromContext(Context)
Declaration
public static ContextBuilder BuilderFromContext(Context context)
Parameters
Type |
Name |
Description |
Context |
context |
|
Returns
Equals(Context)
Declaration
public bool Equals(Context other)
Parameters
Type |
Name |
Description |
Context |
other |
|
Returns
Equals(object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
object |
other |
|
Returns
Overrides
FromUser(User)
Declaration
public static Context FromUser(User user)
Parameters
Type |
Name |
Description |
User |
user |
|
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
GetValue(in AttributeRef)
Declaration
public LdValue GetValue(in AttributeRef attributeRef)
Parameters
Returns
GetValue(string)
Declaration
public LdValue GetValue(string attributeName)
Parameters
Type |
Name |
Description |
string |
attributeName |
|
Returns
MultiBuilder()
Declaration
public static ContextMultiBuilder MultiBuilder()
Returns
New(ContextKind, string)
Declaration
public static Context New(ContextKind kind, string key)
Parameters
Returns
New(string)
Declaration
public static Context New(string key)
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
NewMulti(params Context[])
Declaration
public static Context NewMulti(params Context[] contexts)
Parameters
Type |
Name |
Description |
Context[] |
contexts |
|
Returns
ToString()
Declaration
public override string ToString()
Returns
Overrides
TryGetContextByKind(ContextKind, out Context)
Declaration
public bool TryGetContextByKind(ContextKind kind, out Context context)
Parameters
Returns
Implements