C#
Getting Started
If still not registered, sign up and create an account at https://koople.io.
Add SDK library
Refer to the Nuget release page to identify the latest version.
2. Initliaze the SDK
3. Get your feature flags values
Identify users to allow specific targets. See KUser.
Methods
Initialize
Use initialize
to get a validated client object.
Parameter
Description
apiKey
The server ApiKey for your project environment.
required
poolingInterval
Interval in seconds with which the SDK makes requests to the server to update the evaluation object.
optional
Interval in seconds with which the SDK makes requests to the server to update the evaluation object. The minimum value is 10
seconds. If the value is less than 10
it will be ignored and automatically set to 10
. The default value is 60
seconds.
IsEnabled
The isEnabled
method will return a boolean indicating whether a release toggle is enabled or disabled.
Name
Type
releaseToggleKey
string
required
user
KUser
optional
The evaluation of an unexistent releaseToggleKey
will return false
as an evaluation result.
ValueOf
The valueOf method will return a value for a remote config. You can pass an optional second parameter that will be used as a fallback if there is no value.
Name
Type
remoteConfigKey
string
required
user
KUser
optional
defaultValue
string
optional
Objects
KUser
The KUser
object represents a user with the properties to be evaluated. The properties can be added in the following ways.
Name
Type
identity
string
required
attributes
List<KUserAttribute>
optional
The user can be created first for adding attributes later.
Also, the user can be created as an anonymous user.
KUserAttribute
The KUserAttribute
represents a key-value object to set the name and value of a user attribute.
Name
Type
name
string
required
value
Object
required
Value object can be a string, a number or a boolean type.
Last updated