Ejemplo n.º 1
0
        public RavenCountersClient(string serverUrl, string counterStorageName, ICredentials credentials = null, string apiKey = null)
        {
            try
            {
                ServerUrl = serverUrl;
                if (ServerUrl.EndsWith("/"))
                {
                    ServerUrl = ServerUrl.Substring(0, ServerUrl.Length - 1);
                }

                CounterStorageName = counterStorageName;
                Credentials        = credentials ?? CredentialCache.DefaultNetworkCredentials;
                ApiKey             = apiKey;

                convention = new CounterConvention();
                //replicationInformer = new RavenFileSystemReplicationInformer(convention, JsonRequestFactory);
                //readStripingBase = replicationInformer.GetReadStripingBase();
                //todo: implement remote counter changes
                //notifications = new RemoteFileSystemChanges(serverUrl, apiKey, credentials, jsonRequestFactory, convention, replicationInformer, () => { });

                InitializeSecurity();
            }
            catch (Exception)
            {
                Dispose();
                throw;
            }
        }
Ejemplo n.º 2
0
 public CounterBatch(RavenCountersClient countersClient, CounterConvention convention)
 {
     credentials        = countersClient.PrimaryCredentials;
     jsonRequestFactory = countersClient.JsonRequestFactory;
     counterStorageUrl  = countersClient.CounterStorageUrl;
     this.convention    = convention;
 }
Ejemplo n.º 3
0
 public AdminClient(RavenCountersClient countersClient, CounterConvention convention)
 {
     credentials        = countersClient.PrimaryCredentials;
     jsonRequestFactory = countersClient.JsonRequestFactory;
     serverUrl          = countersClient.ServerUrl;
     counterStorageName = countersClient.CounterStorageName;
     this.convention    = convention;
 }