示例#1
0
 public static Task SetConnectedState(this Host host, ResourceStateManager resourceStateManager, Host.ConnectedState connectedState)
 {
     return(resourceStateManager.PatchState(host,
                                            new HomeCtl.Kinds.Resources.ResourceState(new List <ResourceField>
     {
         new ResourceField("connectedState", ResourceFieldValue.String(connectedState.ToString()))
     })));
 }
示例#2
0
 public HostServer(Host host,
                   EndpointConnectionManager connectionManager, EventBus eventBus,
                   ILogger <HostServer> logger,
                   HostManager hostManager,
                   ResourceStateManager resourceStateManager) :
     base(connectionManager, eventBus, logger)
 {
     Host                  = host;
     _hostManager          = hostManager;
     _resourceStateManager = resourceStateManager;
 }
示例#3
0
 public HostManager(ConnectionManager connectionManager, EventBus eventBus,
                    ILoggerFactory loggerFactory, IEndpointClientFactory endpointClientFactory,
                    IServerIdentityVerifier serverIdentityVerifier, IResourceDocumentStore <Host> documentStore,
                    ResourceStateManager resourceStateManager, ResourceManagerContainer resourceManagers) :
     base(documentStore, resourceManagers)
 {
     _connectionManager      = connectionManager;
     _eventBus               = eventBus;
     _loggerFactory          = loggerFactory;
     _endpointClientFactory  = endpointClientFactory;
     _serverIdentityVerifier = serverIdentityVerifier;
     _resourceStateManager   = resourceStateManager;
 }