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(); }
/// <summary> /// Initialise the library with a custom set of options /// </summary> /// <param name="ablyOptions"></param> public RestClient(AblyOptions ablyOptions) { _options = ablyOptions; InitialiseAbly(); }
/// <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(); }
internal AblyTokenAuth(AblyOptions options, Rest.IAblyRest rest) { _options = options; _rest = rest; }