public void ToFaulted(Command.Endpoint.IInstance commandEndpoint, Exception exception) { Context.IFault context = _contextFactory.ForFault(commandEndpoint, exception); Event.Transition message = _eventFactory.ForStateTransition(context); _eventMediator.Publish(message); }
public Configuration(Command.Endpoint.IInstance commandEndpoint, Version version, bool autoConfigurePacketEndpoint, IPEndPoint localPacketEndpoint) { CommandEndpoint = commandEndpoint; Version = version; AutoConfigurePacketEndpoint = autoConfigurePacketEndpoint; LocalPacketEndpoint = localPacketEndpoint; }
public void ToListening(Command.Endpoint.IInstance commandEndpoint, Values.Version version) { Context.IListen context = _contextFactory.ForListen(commandEndpoint, version); Event.Transition message = _eventFactory.ForStateTransition(context); _eventMediator.Publish(message); }
public void OnEnter() { _endpoint = _commandEndpointFactory.CreateEndpoint(); _endpoint.Open(); Observable.FromAsync(() => _endpoint.Send(new Command.Request.GetVersion())).Timeout(TimeSpan.FromSeconds(30)).Take(1) .Subscribe(Process, Fault); }
public Registration(Command.Endpoint.IInstance commandEndpoint, Version version, string name, string remarks, PhysicalAddress macAddress) { CommandEndpoint = commandEndpoint; Version = version; Name = name; Remarks = remarks; MacAddress = macAddress; }
public void OnEnter() { _endpoint = _commandEndpointFactory.CreateEndpoint(); _endpoint.Open(); Observable.FromAsync(() => _endpoint.Send(new Command.Request.GetVersion())).Timeout(TimeSpan.FromSeconds(30)).Take(1) .Subscribe(Process, Fault); }
public Listen(Command.Endpoint.IInstance commandEndpoint, Values.Version version, IPEndPoint localPacketEndpoint) { CommandEndpoint = commandEndpoint; Version = version; LocalPacketEndpoint = localPacketEndpoint; }
public IFault ForFault(Command.Endpoint.IInstance commandEndpoint, Exception exception) { return(new Fault(commandEndpoint, exception)); }
public IListen ForListen(Command.Endpoint.IInstance commandEndpoint, Values.Version version) { Settings.IValues settings = _settingsProvider.GetValues(); return(new Listen(commandEndpoint, version, settings.LocalPacketEndpoint)); }
public IRegistration ForRegistration(Command.Endpoint.IInstance commandEndpoint, Values.Version version) { Settings.IValues settings = _settingsProvider.GetValues(); return(new Registration(commandEndpoint, version, settings.Name, settings.Remarks, settings.OwlMacAddress)); }
public IConfiguration ForConfiguration(Command.Endpoint.IInstance commandEndpoint, Values.Version version) { Settings.IValues settings = _settingsProvider.GetValues(); return(new Configuration(commandEndpoint, version, settings.AutoConfigurePacketPort, settings.LocalPacketEndpoint)); }
public Fault(Command.Endpoint.IInstance commandEndpoint, Exception exception) { CommandEndpoint = commandEndpoint; Exception = exception; }