public static Task ExecuteAsync <TAction>(Brick brick, NotifyMethodAsync notify) where TAction : AbstractAction { var ctor = typeof(TAction).GetConstructor(new Type[] { typeof(Brick), typeof(NotifyMethodAsync) }); var action = ctor.Invoke(new object[] { brick, notify }) as AbstractAction; return(action.ExecuteAsync()); }
public CloseAction(Brick brick, NotifyMethodAsync notify) : base(brick, notify) { }
public DeviceListener(Brick brick, NotifyMethodAsync notify) { _deviceClient = DeviceClient.CreateFromConnectionString(DeviceConnectionString, TransportType.Mqtt); _communicator = new BrickCommunicator(brick, notify); _notify = notify ?? new NotifyMethodAsync((method, msg) => Task.CompletedTask); }
public InitAction(Brick brick, NotifyMethodAsync notify) : base(brick, notify) { }
public LoadBagAction(Brick brick, NotifyMethodAsync notify) : base(brick, notify) { }
public BrickCommunicator(Brick brick, NotifyMethodAsync notify) { _brick = brick; _notify = notify; }
protected AbstractAction(Brick brick, NotifyMethodAsync notify) { Brick = brick; Notify = notify; }