public Service(WifiLink.IBridge bridge, Entity.IFactory entityFactory, Configuration.IProvider configurationProvider, With.Messaging.Client.IEndpoint clientEndpoint) { _entityFactory = entityFactory; _clientEndpoint = clientEndpoint; _configurationProvider = configurationProvider; _bridge = bridge; }
public Service(WifiLink.IBridge bridge, Entity.IFactory entityFactory, Configuration.IProvider configurationProvider, With.Messaging.Client.IEndpoint clientEndpoint) { _entityFactory = entityFactory; _clientEndpoint = clientEndpoint; _configurationProvider = configurationProvider; _bridge = bridge; }
public void Initialize() { _configurationSettings = A.Fake<Intuition.Configuration.ISettings>(); _deviceFactory = A.Fake<Intuition.Gateway.IFactory>(); _clientEndpoint = A.Fake<Messaging.Client.IEndpoint>(); _subject = new Connector(_clientEndpoint, _configurationSettings, _deviceFactory); }
public Context(IKernel kernel, IBridge bridge, IInstance instance, Messaging.Client.IEndpoint clientEndpoint, Settings.IProvider settingsProvider) { Kernel = kernel; Bridge = bridge; Instance = instance; Endpoint = clientEndpoint; SettingsProvider = settingsProvider; }
public void Initialize() { _configurationSettings = A.Fake <Intuition.Configuration.ISettings>(); _deviceFactory = A.Fake <Intuition.Gateway.IFactory>(); _clientEndpoint = A.Fake <Messaging.Client.IEndpoint>(); _subject = new Connector(_clientEndpoint, _configurationSettings, _deviceFactory); }
public Bootstrapper(IKernel kernel, With.Messaging.Client.IEndpoint clientEndpoint) { _clientEndpoint = clientEndpoint; _configurationProvider = new Configuration.Provider(); _gatewayFactory = new Gateway.Factory(kernel); _connector = new Connector(_clientEndpoint, _configurationProvider.GetSettings(), _gatewayFactory); }
public Bootstrapper(IKernel kernel, With.Messaging.Client.IEndpoint clientEndpoint) { _clientEndpoint = clientEndpoint; _configurationProvider = new Configuration.Provider(); _gatewayFactory = new Gateway.Factory(kernel); _connector = new Connector(_clientEndpoint, _configurationProvider.GetSettings(), _gatewayFactory); }
public Entity(Configuration.Dimmer dimmer, WifiLink.IBridge bridge, With.Messaging.Client.IEndpoint clientEndpoint) { _dimmer = dimmer; _bridge = bridge; _clientEndpoint = clientEndpoint; _on = new On(dimmer, bridge); _off = new Off(dimmer, bridge); _level = new Level(dimmer, bridge); _messages = new Subject <Message.IMessage>(); Identity = _dimmer.ToEntityIdentity(); Description = _dimmer.ToEntityDescription(); Observables = Enumerable.Empty <IObservable>(); Actionables = new IActionable[] { _off, _on, _level }; }
public IContext CreateDeviceInContext(Settings.IProvider settingsProvider, Messaging.Client.IEndpoint clientEndpoint) { ChildKernel kernel = new ChildKernel(_kernel); kernel.Bind <Command.Response.IBuilder>().To <Command.Response.Builder.VersionResponse>().InSingletonScope(); kernel.Bind <Command.Response.IBuilder>().To <Command.Response.Builder.RostaResponse>().InSingletonScope(); kernel.Bind <Command.Response.IBuilder>().To <Command.Response.Builder.DeviceResponse>().InSingletonScope(); kernel.Bind <Command.Response.IBuilder>().To <Command.Response.Builder.UdpResponse>().InSingletonScope(); kernel.Bind <Command.Response.IBuilder>().To <Command.Response.Builder.SaveResponse>().InSingletonScope(); kernel.Bind <Command.Response.IParser>().To <Command.Response.Parser>().InSingletonScope(); kernel.Bind <Command.Endpoint.IFactory>().To <Command.Endpoint.Factory>().InSingletonScope(); kernel.Bind <Packet.IParser>().To <Packet.Parser>().InSingletonScope(); kernel.Bind <Packet.Endpoint.IFactory>().To <Packet.Endpoint.Factory>().InSingletonScope(); kernel.Bind <Event.IMediator>().To <Event.Mediator>().InSingletonScope(); kernel.Bind <State.Event.IFactory>().To <State.Event.Factory>().InSingletonScope(); kernel.Bind <State.Context.IFactory>().To <State.Context.Factory>().InSingletonScope(); kernel.Bind <State.ITransition>().To <State.Transition>().InSingletonScope(); kernel.Bind <State.IFactory>().To <State.Factory>().InSingletonScope(); kernel.Bind <State.IMachine>().To <State.Machine>().InSingletonScope(); kernel.Bind <Entity.IFactory>().To <Entity.Factory>().InSingletonScope(); kernel.Bind <Entity.Observable.IFactory>().To <Entity.Observable.CurrentElectricityConsumptionFactory>().InSingletonScope(); kernel.Bind <Entity.Observable.IAbstractFactory>().To <Entity.Observable.AbstractFactory>().InSingletonScope(); kernel.Bind <IBridge>().To <Bridge>().InSingletonScope(); kernel.Bind <IInstance>().To <Instance>().InSingletonScope(); kernel.Bind <IContext>().To <Context>().InSingletonScope(); kernel.Bind <Settings.IProvider>().ToConstant(settingsProvider); kernel.Bind <Messaging.Client.IEndpoint>().ToConstant(clientEndpoint); return(kernel.Get <IContext>()); }
public Connector(With.Messaging.Client.IEndpoint clientEndpoint, Configuration.ISettings configurationSettings, Gateway.IFactory gatewayFactory) { _clientEndpoint = clientEndpoint; _configurationSettings = configurationSettings; _gatewayFactory = gatewayFactory; }
public Connector(With.Messaging.Client.IEndpoint clientEndpoint, Configuration.ISettings configurationSettings, Gateway.IFactory gatewayFactory) { _clientEndpoint = clientEndpoint; _configurationSettings = configurationSettings; _gatewayFactory = gatewayFactory; }