Ejemplo n.º 1
0
        public RestClient()
        {
            var key = GetConnectionString();

            if (string.IsNullOrEmpty(key))
            {
                throw new AblyException(
                          "A connection string with key 'Ably' doesn't exist in the application configuration");
            }

            _options = new AblyOptions(key);
            InitialiseAbly();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initialise the library with a custom set of options
 /// </summary>
 /// <param name="ablyOptions"></param>
 public RestClient(AblyOptions ablyOptions)
 {
     _options = ablyOptions;
     InitialiseAbly();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Convenience method for initialising the RestClient by passing a Action{AblyOptions}
 /// <example>
 /// var rest = new RestClient(opt => {
 ///  opt.Key = "fake.key:value";
 ///  opt.ClientId = "123";
 /// });
 /// </example>
 /// </summary>
 /// <param name="init">Action delegate which receives a empty options object.</param>
 public RestClient(Action <AblyOptions> init)
 {
     _options = new AblyOptions();
     init(_options);
     InitialiseAbly();
 }
Ejemplo n.º 4
0
 internal AblyTokenAuth(AblyOptions options, Rest.IAblyRest rest)
 {
     _options = options;
     _rest    = rest;
 }