예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlockSyncer"/> class.
 /// </summary>
 public BlockSyncer(NakoApplication application, NakoConfiguration config, ISyncOperations syncOperations, SyncConnection syncConnection, Tracer tracer)
     : base(application, config, tracer)
 {
     this.tracer         = tracer;
     this.syncConnection = syncConnection;
     this.syncOperations = syncOperations;
     this.config         = config;
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Notifier"/> class.
 /// </summary>
 public Notifier(NakoApplication application, NakoConfiguration config, Tracer tracer, IStorage storage)
     : base(application, config, tracer)
 {
     this.configuration = config;
     this.tracer        = tracer;
     this.storage       = storage;
     this.client        = new Lazy <HttpClient>(() => new HttpClient(new HttpClientHandler {
         ServerCertificateCustomValidationCallback = (sender, certificate, chain, errors) => errors == SslPolicyErrors.None || errors == SslPolicyErrors.RemoteCertificateNameMismatch
     }));
 }
예제 #3
0
파일: ApiServer.cs 프로젝트: wtcoin/Nako
 //// This code configures Web API. The ApiServer class is specified as a type
 //// parameter in the WebApp.Start method.
 public ApiServer(NakoApplication nakoApplication, NakoConfiguration nakoConfiguration, Tracer tracer)
 {
     this.configuration = nakoConfiguration;
     this.tracer        = tracer;
     this.application   = nakoApplication;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TaskRunner{T}"/> class.
 /// </summary>
 protected TaskRunner(NakoApplication application, NakoConfiguration config, Tracer tracer)
     : base(application, config, tracer)
 {
     this.Queue = new ConcurrentQueue <T>();
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlockStore"/> class.
 /// </summary>
 public BlockStore(NakoApplication application, NakoConfiguration config, Tracer tracer, IStorageOperations storageOperations)
     : base(application, config, tracer)
 {
     this.storageOperations = storageOperations;
     this.tracer            = tracer;
 }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TaskRunner"/> class.
 /// </summary>
 protected TaskRunner(NakoApplication application, NakoConfiguration configuration, Tracer tracer)
 {
     this.tracer      = tracer;
     this.application = application;
     this.Delay       = TimeSpan.FromSeconds(configuration.SyncInterval);
 }