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())) }))); }
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; }
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; }