public FilesChangesClient(string url, string apiKey, ICredentials credentials, HttpJsonRequestFactory jsonRequestFactory, FilesConvention conventions, IReplicationInformerBase replicationInformer, Action onDispose) : base(url, apiKey, credentials, jsonRequestFactory, conventions, replicationInformer, onDispose) { }
public FilesChangesClient(string url, string apiKey, ICredentials credentials, HttpJsonRequestFactory jsonRequestFactory, FilesConvention conventions, IReplicationInformerBase replicationInformer, Func <string, FileHeader, string, Action, Task <bool> > tryResolveConflictByUsingRegisteredConflictListenersAsync, Action onDispose) : base(url, apiKey, credentials, jsonRequestFactory, conventions, replicationInformer, onDispose) { this.tryResolveConflictByUsingRegisteredConflictListenersAsync = tryResolveConflictByUsingRegisteredConflictListenersAsync; }
public RemoteDatabaseChanges(string url, string apiKey, ICredentials credentials, HttpJsonRequestFactory jsonRequestFactory, DocumentConvention conventions, IReplicationInformerBase replicationInformer, Action onDispose, Func <string, Etag, string[], OperationMetadata, Task <bool> > tryResolveConflictByUsingRegisteredConflictListenersAsync) : base(url, apiKey, credentials, jsonRequestFactory, conventions, replicationInformer, onDispose) { this.Conventions = conventions; this.tryResolveConflictByUsingRegisteredConflictListenersAsync = tryResolveConflictByUsingRegisteredConflictListenersAsync; }
public RemoteChangesClientBase( string url, string apiKey, ICredentials credentials, HttpJsonRequestFactory jsonRequestFactory, Convention conventions, IReplicationInformerBase replicationInformer, Action onDispose) { // Precondition TChangesApi api = this as TChangesApi; if (api == null) { throw new InvalidCastException(string.Format("The derived class does not implements {0}. Make sure the {0} interface is implemented by this class.", typeof(TChangesApi).Name)); } ConnectionStatusChanged = LogOnConnectionStatusChanged; id = Interlocked.Increment(ref connectionCounter) + "/" + Base62Util.Base62Random(); this.url = url; this.credentials = new OperationCredentials(apiKey, credentials); this.jsonRequestFactory = jsonRequestFactory; this.conventions = conventions; this.replicationInformer = replicationInformer; this.onDispose = onDispose; this.Task = EstablishConnection() .ObserveException() .ContinueWith(task => { task.AssertNotFailed(); return(this as TChangesApi); }); }