Issues with .net library for SplitIO.

Comments

5 comments

  • Bilal Al-Shahwany

    Hi Priyank, could you please paste the code that is using the SDK? Also the first 4 characters of the API Key.

    Thanks

    Bilal

    0
    Comment actions Permalink
  • Priyank Kotiyal

    Hi following is code sample, I have debugger attached at  first line but control doesn't come to it, it breaks even before that :

    using System;
    using System.Collections.Generic;
    using Splitio.Services.Client.Classes;
    using Splitio.Services.Client.Interfaces;
    namespace SplitIO
    {
    class Program
    {
    static void Main(string[] args)
    {
    ConfigurationOptions config = new ConfigurationOptions();

    SplitFactory factory = new SplitFactory("jctg******", config);
    ISplitClient splitClient = factory.Client();
    try {
    splitClient.BlockUntilReady(10000);
    }
    catch (Exception ex)
    {
    Console.WriteLine("Error");
    }

    Dictionary<string, object> attributes = new Dictionary<string, object>();
    attributes.Add("location", "India");

    var treatment = splitClient.GetTreatment("Priyank", // unique identifier for your user
    "Google_Meet",
    attributes);

    if (treatment == "on")
    {
    // insert on code here
    }
    else if (treatment == "off")
    {
    // insert off code here
    }
    else
    {
    // insert control code here
    }
    }
    }
    }

    0
    Comment actions Permalink
  • Bilal Al-Shahwany

    Hi Priyank,  code and API Key looks correct, which version of .NET used? SDK support .NET version 4 and later.

    Thanks

    Bilal

    0
    Comment actions Permalink
  • Priyank Kotiyal

    Hi Bilal,

         I am using .Net framework 4.6.1 and SplitIO version 6.1.1.0.




    0
    Comment actions Permalink
  • Bilal Al-Shahwany

    Hi Priyank, I created a support ticket for this issue, will respond from there.

    Thanks

    Bilal

    0
    Comment actions Permalink

Please sign in to leave a comment.