/// <summary> /// Create controller with service /// </summary> /// <param name="supervisor"></param> /// <param name="activator"></param> /// <param name="nodes"></param> /// <param name="historian"></param> /// <param name="browse"></param> public SupervisorMethodsController(ISupervisorServices supervisor, IActivationServices <string> activator, INodeServices <EndpointModel> nodes, IHistoricAccessServices <EndpointModel> historian, IBrowseServices <EndpointModel> browse) { _supervisor = supervisor ?? throw new ArgumentNullException(nameof(supervisor)); _browse = browse ?? throw new ArgumentNullException(nameof(browse)); _historian = historian ?? throw new ArgumentNullException(nameof(historian)); _nodes = nodes ?? throw new ArgumentNullException(nameof(nodes)); _activator = activator ?? throw new ArgumentNullException(nameof(activator)); }
/// <summary> /// Create endpoint registry /// </summary> /// <param name="iothub"></param> /// <param name="broker"></param> /// <param name="logger"></param> /// <param name="activator"></param> /// <param name="events"></param> public EndpointRegistry(IIoTHubTwinServices iothub, IEndpointEventBroker broker, ILogger logger, IActivationServices <EndpointRegistrationModel> activator, IApplicationRegistryEvents events = null) { _iothub = iothub ?? throw new ArgumentNullException(nameof(iothub)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _activator = activator ?? throw new ArgumentNullException(nameof(activator)); _broker = broker ?? throw new ArgumentNullException(nameof(broker)); // Register for application registry events _unregister = events?.Register(this); }
/// <summary> /// Create controller with service /// </summary> /// <param name="supervisor"></param> /// <param name="browse"></param> /// <param name="discover"></param> /// <param name="activator"></param> /// <param name="nodes"></param> /// <param name="historian"></param> /// <param name="publisher"></param> /// <param name="logger"></param> public SupervisorMethodsController(ISupervisorServices supervisor, IDiscoveryServices discover, IActivationServices <string> activator, INodeServices <EndpointModel> nodes, IHistoricAccessServices <EndpointModel> historian, IBrowseServices <EndpointModel> browse, IPublishServices <EndpointModel> publisher, ILogger logger) { _supervisor = supervisor ?? throw new ArgumentNullException(nameof(supervisor)); _browse = browse ?? throw new ArgumentNullException(nameof(browse)); _historian = historian ?? throw new ArgumentNullException(nameof(historian)); _nodes = nodes ?? throw new ArgumentNullException(nameof(nodes)); _publisher = publisher ?? throw new ArgumentNullException(nameof(publisher)); _discover = discover ?? throw new ArgumentNullException(nameof(discover)); _activator = activator ?? throw new ArgumentNullException(nameof(activator)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
/// <summary> /// Default constructor /// </summary> /// <param name="activationType"></param> /// <param name="requestedType"></param> /// <param name="services"></param> /// <param name="constants"></param> /// <param name="objectGraphDepth"></param> /// <param name="requestingScope"></param> public ActivationExpressionRequest(Type activationType, RequestType requestedType, IActivationServices services, IExpressionConstants constants, int objectGraphDepth, IInjectionScope requestingScope) { ActivationType = activationType; RequestType = requestedType; Services = services; Constants = constants; KnownValueExpressions = ImmutableLinkedList <IKnownValueExpression> .Empty; DisposalScopeExpression = constants.RootDisposalScope; Parent = null; IsRequired = true; ObjectGraphDepth = objectGraphDepth; RequestingScope = requestingScope; }
/// <summary> /// Create endpoint registry /// </summary> /// <param name="iothub"></param> /// <param name="broker"></param> /// <param name="logger"></param> /// <param name="activator"></param> /// <param name="certificates"></param> /// <param name="supervisors"></param> /// <param name="serializer"></param> /// <param name="events"></param> public EndpointRegistry(IIoTHubTwinServices iothub, IJsonSerializer serializer, IRegistryEventBroker <IEndpointRegistryListener> broker, IActivationServices <EndpointRegistrationModel> activator, ICertificateServices <EndpointRegistrationModel> certificates, ISupervisorRegistry supervisors, ILogger logger, IRegistryEvents <IApplicationRegistryListener> events = null) { _iothub = iothub ?? throw new ArgumentNullException(nameof(iothub)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _certificates = certificates ?? throw new ArgumentNullException(nameof(certificates)); _supervisors = supervisors ?? throw new ArgumentNullException(nameof(supervisors)); _activator = activator ?? throw new ArgumentNullException(nameof(activator)); _serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); _broker = broker ?? throw new ArgumentNullException(nameof(broker)); // Register for application registry events _unregister = events?.Register(this); }