Example #1
0
 /// <summary>
 /// Create IoT hub message sink
 /// </summary>
 /// <param name="clientAccessor"></param>
 /// <param name="logger"></param>
 public IoTHubMessageSink(IClientAccessor clientAccessor, ILogger logger)
 {
     _clientAccessor = clientAccessor
                       ?? throw new ArgumentNullException(nameof(clientAccessor));
     _logger = logger
               ?? throw new ArgumentNullException(nameof(logger));
 }
 private SetStructProjectionController(
     IDialogManager dialogManager,
     IClientAccessor clientAccessor)
 {
     _dialogManager  = dialogManager;
     _clientAccessor = clientAccessor;
 }
Example #3
0
 internal ClientAccessor(
     IClientAccessor <BufferPool.ConstBuffer, BufferPool.ConstBuffer> impl,
     Func <IComponent, Serializer> serializerMaker)
     : base(impl)
 {
     _serializerMaker = serializerMaker;
 }
Example #4
0
 public EventAckModel(IWebContext webContext, IUserContext userContext, IClientAccessor clientAccessor)
 {
     this.webContext     = webContext;
     this.userContext    = userContext;
     this.clientAccessor = clientAccessor;
     dict = Locale.GetDictionary("Scada.Web.Plugins.PlgMain.Areas.Main.Pages.EventAck");
 }
        public void Init()
        {
            _mapper = new Mock<IMapper>();
            _accessor = new FakeClientAccessor();// new Mock<IClientAccessor>();
            _clientController = new ClientController(_accessor, _mapper.Object);

        }
Example #6
0
 public GrpcMasterClientFactory(
     IClientAccessor <MachineLocation, T> clientAccessor,
     IMasterElectionMechanism masterElectionMechanism)
 {
     _masterElectionMechanism = masterElectionMechanism;
     _clientAccessor          = clientAccessor;
     LinkLifetime(clientAccessor);
 }
Example #7
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public ViewLoader(IWebContext webContext, IUserContext userContext,
                   IClientAccessor clientAccessor, IMemoryCache memoryCache)
 {
     this.webContext     = webContext ?? throw new ArgumentNullException(nameof(webContext));
     this.userContext    = userContext ?? throw new ArgumentNullException(nameof(userContext));
     this.clientAccessor = clientAccessor ?? throw new ArgumentNullException(nameof(clientAccessor));
     this.memoryCache    = memoryCache ?? throw new ArgumentNullException(nameof(memoryCache));
 }
Example #8
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public LoginService(IWebContext webContext, IClientAccessor clientAccessor,
                     IHttpContextAccessor httpContextAccessor)
 {
     this.webContext     = webContext ?? throw new ArgumentNullException(nameof(webContext));
     this.clientAccessor = clientAccessor;
     httpContext         = httpContextAccessor?.HttpContext ??
                           throw new ArgumentException("HTTP context must not be null.", nameof(httpContextAccessor));
 }
Example #9
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public SchemeApiController(IWebContext webContext, IUserContext userContext,
                            IClientAccessor clientAccessor, IViewLoader viewLoader)
 {
     this.webContext     = webContext;
     this.userContext    = userContext;
     this.clientAccessor = clientAccessor;
     this.viewLoader     = viewLoader;
 }
Example #10
0
 public ConnectionProvider(
     IBroadcastService broadcastService,
     IConnectionStorage connectionStorage,
     IClientAccessor clientAccessor)
 {
     _broadcastService  = broadcastService;
     _connectionStorage = connectionStorage;
     _clientAccessor    = clientAccessor;
 }
Example #11
0
 public ConnectionNodeController(
     IDialogManager dialogManager,
     IConnectionProvider connectionProvider,
     IClientAccessor clientAccessor)
 {
     _dialogManager      = dialogManager;
     _connectionProvider = connectionProvider;
     _clientAccessor     = clientAccessor;
 }
Example #12
0
 public CommandModel(IWebContext webContext, IUserContext userContext, IClientAccessor clientAccessor,
                     PluginContext pluginContext)
 {
     this.webContext     = webContext;
     this.userContext    = userContext;
     this.clientAccessor = clientAccessor;
     this.pluginContext  = pluginContext;
     dict = Locale.GetDictionary("Scada.Web.Plugins.PlgMain.Areas.Main.Pages.Command");
 }
Example #13
0
 public ConnectDialogController(
     IConnectionProvider connectionProvider,
     IConnectionStorage connectionStorage,
     IClientAccessor clientAccessor)
 {
     _connectionProvider = connectionProvider;
     _connectionStorage  = connectionStorage;
     _clientAccessor     = clientAccessor;
 }
 /// <summary>
 /// Constructor for runtime state reporter.
 /// </summary>
 public RuntimeStateReporter(IClientAccessor clientAccessor,
                             IJsonSerializer jsonSerializer,
                             IRuntimeStateReporterConfiguration config,
                             ILogger logger)
 {
     _clientAccessor = clientAccessor ?? throw new ArgumentNullException(nameof(clientAccessor));
     _jsonSerializer = jsonSerializer ?? throw new ArgumentNullException(nameof(jsonSerializer));
     _config         = config ?? throw new ArgumentNullException(nameof(config));
     _logger         = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Example #15
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public MainApiController(IWebContext webContext, IUserContext userContext, IClientAccessor clientAccessor,
                          IViewLoader viewLoader, IMemoryCache memoryCache, PluginContext pluginContext)
 {
     this.webContext     = webContext;
     this.userContext    = userContext;
     this.clientAccessor = clientAccessor;
     this.viewLoader     = viewLoader;
     this.memoryCache    = memoryCache;
     this.pluginContext  = pluginContext;
 }
Example #16
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public PrintController(IWebContext webContext, IUserContext userContext, IClientAccessor clientAccessor,
                        IViewLoader viewLoader, PluginContext pluginContext)
 {
     this.webContext     = webContext;
     this.userContext    = userContext;
     this.clientAccessor = clientAccessor;
     this.viewLoader     = viewLoader;
     this.pluginContext  = pluginContext;
     templateDir         = Path.Combine(webContext.AppDirs.ExeDir, "wwwroot", "plugins", "Main", "templates");
 }
Example #17
0
        public GrpcClientPool(IClientAccessor <MachineLocation, ConnectionHandle> connectionAccessor, LocalClient <TService> localClient = null)
        {
            _connectionAccessor = connectionAccessor;
            _localClient        = localClient;
            LinkLifetime(connectionAccessor);

            if (_localClient != null)
            {
                LinkLifetime(_localClient);
            }
        }
 public CommandEditorController(
     IBroadcastService broadcastService,
     IDialogManager dialogManager,
     IConnectionProvider connectionProvider,
     ICommandParser commandParser,
     ICommandExecutor commandExecutor,
     IClientAccessor clientAccessor)
 {
     _broadcastService   = broadcastService;
     _dialogManager      = dialogManager;
     _connectionProvider = connectionProvider;
     _commandParser      = commandParser;
     _commandExecutor    = commandExecutor;
     _clientAccessor     = clientAccessor;
 }
        public ClientGlobalCacheStore(
            IClientAccessor <IGlobalCacheService> metadataServiceClientFactory,
            ClientContentMetadataStoreConfiguration configuration)
        {
            _serviceClientFactory = metadataServiceClientFactory;
            _configuration        = configuration;
            _clock = SystemClock.Instance;

            _retryPolicy = RetryPolicyFactory.GetExponentialPolicy(
                _ => true,
                // We use an absurdly high retry count because the actual operation timeout is controlled through
                // PerformOperationAsync in ExecuteAsync.
                1_000_000,
                _configuration.RetryMinimumWaitTime,
                _configuration.RetryMaximumWaitTime,
                _configuration.RetryDelta);

            LinkLifetime(_serviceClientFactory);
        }
Example #20
0
 public ClientController(IClientAccessor accessor, IMapper mapper)
 {
     _clientAccessor = accessor;
     _mapper         = mapper;
 }
Example #21
0
 public CommandExecutor(
     IClientAccessor clientAccessor)
 {
     _clientAccessor = clientAccessor;
 }
Example #22
0
 public void Init()
 {
     _mapper           = new Mock <IMapper>();
     _accessor         = new FakeClientAccessor();// new Mock<IClientAccessor>();
     _clientController = new ClientController(_accessor, _mapper.Object);
 }
Example #23
0
 private StringStructProjectionController(
     IClientAccessor clientAccessor)
 {
     _clientAccessor = clientAccessor;
 }
Example #24
0
 public ChartModel(IWebContext webContext, IUserContext userContext, IClientAccessor clientAccessor)
 {
     this.webContext     = webContext;
     this.userContext    = userContext;
     this.clientAccessor = clientAccessor;
 }
Example #25
0
 public StructProjector(
     IClientAccessor clientAccessor)
 {
     _clientAccessor = clientAccessor;
 }
Example #26
0
 public ClientController(IClientAccessor accessor, IMapper mapper)
     {
         _clientAccessor = accessor;
         _mapper = mapper;
     }
Example #27
0
 public ClientService(IClientAccessor clientAccessor)
 {
     _clientAccessor = clientAccessor;
 }