Exemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();

            IContext context = Iisu.Iisu.Context;

            // get iisu handle
            iisuHandle = context.CreateHandle();

            // create iisu device
            device = iisuHandle.InitializeDevice();

            try
            {
                // register event listener
                device.EventManager.RegisterEventListener("SYSTEM.Error", new OnErrorDelegate(onError));

                // launch IID script
                device.CommandManager.SendCommand("IID.loadGraph", "gateway-v2.iid");
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                Environment.Exit(0);
            }

            CompositionTarget.Rendering += UpdateColor;

            device.Start();
            //while (true)
            {
                //update();
            }
        }
        protected ProjectionSubscriptionBase(
            Guid projectionCorrelationId, Guid subscriptionId, CheckpointTag from,
            IHandle<ProjectionSubscriptionMessage.CommittedEventReceived> eventHandler,
            IHandle<ProjectionSubscriptionMessage.CheckpointSuggested> checkpointHandler,
            IHandle<ProjectionSubscriptionMessage.ProgressChanged> progressHandler,
            IHandle<ProjectionSubscriptionMessage.EofReached> eofHandler,
            CheckpointStrategy checkpointStrategy, long? checkpointUnhandledBytesThreshold, bool stopOnEof)
        {
            if (eventHandler == null) throw new ArgumentNullException("eventHandler");
            if (checkpointHandler == null) throw new ArgumentNullException("checkpointHandler");
            if (progressHandler == null) throw new ArgumentNullException("progressHandler");
            if (eofHandler == null) throw new ArgumentNullException("eofHandler");
            if (checkpointStrategy == null) throw new ArgumentNullException("checkpointStrategy");
            _eventHandler = eventHandler;
            _checkpointHandler = checkpointHandler;
            _progressHandler = progressHandler;
            _eofHandler = eofHandler;
            _checkpointStrategy = checkpointStrategy;
            _checkpointUnhandledBytesThreshold = checkpointUnhandledBytesThreshold;
            _stopOnEof = stopOnEof;
            _projectionCorrelationId = projectionCorrelationId;
            _subscriptionId = subscriptionId;
            _lastPassedOrCheckpointedEventPosition = null;

            _eventFilter = checkpointStrategy.EventFilter;

            _positionTagger = checkpointStrategy.PositionTagger;
            _positionTracker = new PositionTracker(_positionTagger);
            _positionTracker.UpdateByCheckpointTagInitial(@from);
        }
Exemplo n.º 3
0
        //按下快捷键时被调用的方法
        public void CallBack () {
            // Keyboard.Press (System.Windows.Input.Key.Enter);
            // Keyboard.Release (System.Windows.Input.Key.Enter);
            // Keyboard.Type ("second=====CallBack========");
            // Mouse.MoveTo (new System.Drawing.Point (360, 720));
            // Keyboard.Press (System.Windows.Input.Key.Enter);
            // Keyboard.Release (System.Windows.Input.Key.Enter);
            // MessageBox.Show ("快捷键被调用!");
            // Console.WriteLine ("==========CallBack======================");

            // AddHandle (new TextHandle ());
            // AddHandle (new FKeyHandle());
            if (!isRunning) {
                SetTime (this.selectTextBox);
                if (this.curIdx == 5) {
                    runHandle = new F5Handle(this.timeDelay);
                } else if (this.curIdx == 6) {
                    runHandle = new F6Handle(this.timeDelay);
                } else if (this.curIdx == 7) {
                    runHandle = new F7Handle(this.timeDelay);
                } else if (this.curIdx == 8) {
                    runHandle = new F8Handle(this.timeDelay);
                }
                isRunning = true;
            } else {
                isRunning = false;
                runHandle = null;
            }
        }
Exemplo n.º 4
0
 public QueuedHandler(IHandle<Message> consumer,
                      string name,
                      bool watchSlowMsg = true,
                      TimeSpan? slowMsgThreshold = null,
                      TimeSpan? threadStopWaitTimeout = null,
                      string groupName = null)
         : base(consumer, name, watchSlowMsg, slowMsgThreshold, threadStopWaitTimeout ?? DefaultStopWaitTimeout, groupName)
 {
 }
 public override void InvokeStart(double x, double y, IDrawingView view) 
 {
     m_connection = CreateConnection();
     m_connection.EndPoint = new PointD (x, y);
     m_connection.StartPoint = new PointD (x, y);
     m_connection.ConnectStart (Owner.ConnectorAt(x, y));
     m_connection.UpdateConnection();
     view.Drawing.Add(m_connection);
     view.ClearSelection();
     view.AddToSelection(m_connection);
     m_handle = view.FindHandle(x, y);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Register an instance as wanting to receive events. Implement IHandle{T} for each event type you want to receive.
 /// </summary>
 /// <param name="handler">Instance that will be registered with the EventAggregator</param>
 /// <param name="channels">Channel(s) which should be subscribed to. Defaults to EventAggregator.DefaultChannel if none given</param>
 public void Subscribe(IHandle handler, params string[] channels)
 {
     lock (this.handlersLock)
     {
         // Is it already subscribed?
         var subscribed = this.handlers.FirstOrDefault(x => x.IsHandlerForInstance(handler));
         if (subscribed == null)
             this.handlers.Add(new Handler(handler, channels)); // Adds default topic if appropriate
         else
             subscribed.SubscribeToChannels(channels);
     }
 }
Exemplo n.º 7
0
        /// <summary>
        /// Unregister as wanting to receive events. The instance will no longer receive events after this is called.
        /// </summary>
        /// <param name="handler">Instance to unregister</param>
        /// <param name="channels">Channel(s) to unsubscribe from. Unsubscribes from everything if no channels given</param>
        public void Unsubscribe(IHandle handler, params string[] channels)
        {
            lock (handlersLock)
            {
                var existingHandler = handlers.FirstOrDefault(x => x.IsHandlerForInstance(handler));

                if (existingHandler != null && existingHandler.UnsubscribeFromChannels(channels)) // Handles default topic appropriately
                {
                    handlers.Remove(existingHandler);
                }
            }
        }
 public override void InvokeStart(MouseEvent ev) 
 {
     m_connection = CreateConnection();
     m_connection.EndPoint = new PointD (ev.X, ev.Y);
     m_connection.StartPoint = new PointD (ev.X, ev.Y);
     m_connection.ConnectStart (Owner.ConnectorAt(ev.X, ev.Y));
     m_connection.UpdateConnection();
     ev.View.Drawing.Add(m_connection);
     ev.View.ClearSelection();
     ev.View.AddToSelection(m_connection);
     m_handle = ev.View.FindHandle(ev.X, ev.Y);
 }
 public EventReorderingProjectionSubscription(
     Guid projectionCorrelationId, Guid subscriptionId, CheckpointTag from,
     IHandle<ProjectionSubscriptionMessage.CommittedEventReceived> eventHandler,
     IHandle<ProjectionSubscriptionMessage.CheckpointSuggested> checkpointHandler,
     IHandle<ProjectionSubscriptionMessage.ProgressChanged> progressHandler,
     IHandle<ProjectionSubscriptionMessage.EofReached> eofHandler,
     CheckpointStrategy checkpointStrategy, long? checkpointUnhandledBytesThreshold, int processingLagMs,
     bool stopOnEof = false)
     : base(
         projectionCorrelationId, subscriptionId, @from, eventHandler, checkpointHandler, progressHandler, eofHandler, 
         checkpointStrategy, checkpointUnhandledBytesThreshold, stopOnEof)
 {
     _processingLagMs = processingLagMs;
 }
        public void setup()
        {
            _checkpointUnhandledBytesThreshold = 1000;
            Given();
            _bus = new FakePublisher();
            _projectionCorrelationId = Guid.NewGuid();
            _eventHandler = new TestMessageHandler<ProjectionMessage.Projections.CommittedEventReceived>();
            _checkpointHandler = new TestMessageHandler<ProjectionMessage.Projections.CheckpointSuggested>();
            _subscription = new ProjectionSubscription(
                _projectionCorrelationId, CheckpointTag.FromPosition(0, -1), _eventHandler, _checkpointHandler,
                CreateCheckpointStrategy(), _checkpointUnhandledBytesThreshold);

            When();
        }
Exemplo n.º 11
0
        /// <summary>
        /// Constructor Initializes Iisu and loads the input movie
        /// </summary>
        /// <param name="skvMoviePath">skv movie path</param>
        /// <exception cref="System.Exception">
        /// Can occur when Iisu cannot be properly initialized
        /// or when the input path is not valid.
        /// </exception>
        public IisuWrapper()
        {
            // We need to specify where is located the iisu dll and its configuration file.
            // in this sample we'll use the SDK's environment variable as resource to locate them
            // but you can use any mean you need.
            string libraryLocation = System.Environment.GetEnvironmentVariable("IISU_SDK_DIR");
            IHandleConfiguration config = Iisu.Iisu.Context.CreateHandleConfiguration();
            <<<<<<< HEAD

            =======
            >>>>>>> b8e918927be2a4af4732581fe5ad6d829df34356
            config.IisuBinDir = (libraryLocation + "/bin");
            config.ConfigFileName = "iisu_config.xml";

            // get iisu handle
            _iisuHandle = Iisu.Iisu.Context.CreateHandle(config);

            // create iisu device
            _device = _iisuHandle.InitializeDevice();

            // check if Mode DS325 is Enable
            string isCiEnabledString = "";
            _iisuHandle.GetConfigString("//CONFIG//PROCESSING//CI", out isCiEnabledString);
            bool isCiEnabled = isCiEnabledString.Equals("1");

            if (isCiEnabled != true)
            {
                Console.WriteLine("Hand Control will not be Ok");
            }

            //Envoi du fichier coincoin.iid dans le le moteur IIsi
            _device.CommandManager.SendCommand("IID.loadGraph", Directory.GetCurrentDirectory() +  "\\coincoin.iid");

            // register even listener
            _device.EventManager.RegisterEventListener("SYSTEM.Error", new OnErrorDelegate(onError));
            _Hand1Status = _device.RegisterDataHandle<int>("CI.HAND1.Status");
            _Hand1PosingGestureId = _device.RegisterDataHandle<int>("CI.HAND1.PosingGestureId");
            _Hand1PalmPosition = _device.RegisterDataHandle<Iisu.Data.Vector3>("CI.HAND1.PalmPosition3D");

            // enregistrement du la reconnaissance  CoinCoin

            _coincoin = _device.RegisterDataHandle<bool>("IID.Script.CoinCoin");
            _imetaInfo = _device.EventManager.GetMetaInfo("CI.HandPosingGesture");

            _device.Start();
        }
Exemplo n.º 12
0
        /// <summary>
        /// Register an instance as wanting to receive events. Implement IHandle{T} for each event type you want to receive.
        /// </summary>
        /// <param name="handler">Instance that will be registered with the EventAggregator</param>
        /// <param name="channels">Channel(s) which should be subscribed to. Defaults to EventAggregator.DefaultChannel if none given</param>
        public void Subscribe(IHandle handler, params string[] channels)
        {
            lock (handlersLock)
            {
                var isAlreadySubscribed = handlers.FirstOrDefault(x => x.IsHandlerForInstance(handler));

                if (isAlreadySubscribed == null)
                {
                    // Adds default topic if appropriate
                    handlers.Add(new Handler(handler, channels));
                }
                else
                {
                    isAlreadySubscribed.SubscribeToChannels(channels);
                }
            }
        }
        public void SubscribeAndTrack(object scope, IHandle instance)
        {
            _messageBus.Subscribe(instance);

            lock (_updateLock)
            {
                List<IHandle> scopeInstances;
                if (_instances.TryGetValue(scope, out scopeInstances) == false)
                {
                    scopeInstances = new List<IHandle>();
                    _instances.Add(scope, scopeInstances);
                }

                if (scopeInstances.Contains(instance) == false)
                    scopeInstances.Add(instance);
            }
        }
Exemplo n.º 14
0
        private LabService()
        {
            this.PKDAL = new LabPKDAL();
            this.ReportDAL = new LabReportDAL();

            this.InfoHandler = new InfoHandle(this.ReportDAL);
            this.ItemHandler = new ItemHandle(this.ReportDAL);
            this.ImageHandler = new ImageHandle(this.ReportDAL);
            this.GSItemHandler = new GSItemHandle(this.ReportDAL);
            this.GSCustomHandler = new GSCustomHandle(this.ReportDAL);
            this.GeneCustomHandler = new GeneCustomHandle(this.ReportDAL);

            this.Item2CustomMap = new Hashtable(20);
            this.ImageNormalMap = new Hashtable(40);
            this.RequestQueue = new BlockingCollection<LabPK>(5000);

            this.Init();
        }
Exemplo n.º 15
0
        public QueuedHandlerThreadPool(IHandle<Message> consumer,
                                       string name,
                                       bool watchSlowMsg = true,
                                       TimeSpan? slowMsgThreshold = null,
                                       TimeSpan? threadStopWaitTimeout = null,
                                       string groupName = null)
        {
            Ensure.NotNull(consumer, "consumer");
            Ensure.NotNull(name, "name");

            _consumer = consumer;

            _watchSlowMsg = watchSlowMsg;
            _slowMsgThreshold = slowMsgThreshold ?? InMemoryBus.DefaultSlowMessageThreshold;
            _threadStopWaitTimeout = threadStopWaitTimeout ?? QueuedHandler.DefaultStopWaitTimeout;

            _queueMonitor = QueueMonitor.Default;
            _queueStats = new QueueStatsCollector(name, groupName);
        }
        public override void MouseDown(MouseEvent ev)
        {
            IDrawingView view = ev.View;
            Figure figure = view.Drawing.FindFigure (ev.X, ev.Y);

            if (figure != null) {
                _connection.EndPoint = new PointD (ev.X, ev.Y);
                _connection.StartPoint = new PointD (ev.X, ev.Y);
                _connection.StartConnector = figure.ConnectorAt (ev.X, ev.Y);
                _connection.UpdateConnection ();
                view.Drawing.Add (_connection);
                view.ClearSelection ();
                view.AddToSelection (_connection);
                _handle = _connection.EndHandle;
                CreateUndoActivity();
            } else {
                Editor.Tool = new SelectionTool(Editor);
            }
        }
Exemplo n.º 17
0
        public ProjectionSubscription(
            Guid projectionCorrelationId, CheckpointTag from,
            IHandle<ProjectionMessage.Projections.CommittedEventReceived> eventHandler,
            IHandle<ProjectionMessage.Projections.CheckpointSuggested> checkpointHandler,
            CheckpointStrategy checkpointStrategy, long? checkpointUnhandledBytesThreshold)
        {
            if (eventHandler == null) throw new ArgumentNullException("eventHandler");
            if (checkpointHandler == null) throw new ArgumentNullException("checkpointHandler");
            if (checkpointStrategy == null) throw new ArgumentNullException("checkpointStrategy");
            _eventHandler = eventHandler;
            _checkpointHandler = checkpointHandler;
            _checkpointStrategy = checkpointStrategy;
            _checkpointUnhandledBytesThreshold = checkpointUnhandledBytesThreshold;
            _projectionCorrelationId = projectionCorrelationId;
            _lastPassedOrCheckpointedEventPosition = from.Position;

            _eventFilter = checkpointStrategy.EventFilter;

            _positionTagger = checkpointStrategy.PositionTagger;
            _positionTracker = new PositionTracker(_positionTagger);
            _positionTracker.UpdateByCheckpointTagInitial(from);
        }
Exemplo n.º 18
0
		public UndoableHandle(IHandle wrappedHandle)	{
			WrappedHandle = wrappedHandle;
		}
Exemplo n.º 19
0
 public QueuedHandler(IHandle <T> next, string name)
 {
     this.next = next;
     this.name = name;
     queue     = new ConcurrentQueue <T>();
 }
        public void VisitHandle(IHandle handle)
        {
            if (view.SelectionEnumerator.Contains (handle.Owner)) {
                handle.Draw (context, view);

                foreach (IHandle childHandles in handle.Owner.Handles)
                    childHandles.Draw (context, view);
            }
        }
 public NarrowingHandler(IHandle <TOutput> handler)
 {
     _handler = handler;
 }
 public TimeToLiveHandler(IHandle <T> next)
 {
     _next = next;
 }
Exemplo n.º 23
0
 public void AddHandle(IHandle handle)
 {
     _handles.Add(handle);
 }
 public void UnsubscribeByType <TMessage>(IHandle <TMessage> handler)
     where TMessage : class, IMessage
 {
     Unsubscribe(TypeToTopicName(typeof(TMessage)), handler.NarrowToIfYouCan <IMessage, TMessage>());
 }
 public static IHandle <TInput> NarrowTo <TInput, TOutput>(this IHandle <TOutput> handler)
     where TInput : Message
     where TOutput : TInput
 {
     return(new NarrowingHandler <TInput, TOutput>(handler));
 }
 public void SubscribeByCorellationId(Guid corellationId, IHandle <IMessage> handler)
 {
     Subscribe(CorellationIdToTopicName(corellationId), handler);
 }
 public void SubscribeByType <TMessage>(IHandle <TMessage> handler)
     where TMessage : class, IMessage
 {
     Subscribe(typeof(TMessage).FullName, handler.NarrowToIfYouCan <IMessage, TMessage>());
 }
 public void SubscribeByCorellationId <TMessage>(Guid corellationId, IHandle <TMessage> handler)
     where TMessage : class, IMessage
 {
     Subscribe(CorellationIdToTopicName(corellationId), handler.NarrowToIfYouCan <IMessage, TMessage>());
 }
Exemplo n.º 29
0
 public ResidencyRouter(IHandle <CustomsDeclaration> residentHandler, IHandle <CustomsDeclaration> visitorHandler)
 {
     this.residentHandler = residentHandler;
     this.visitorHandler  = visitorHandler;
 }
Exemplo n.º 30
0
 public static Gdi32.HDC GetDCEx(IHandle hWnd, IntPtr hrgnClip, DCX flags)
 {
     Gdi32.HDC result = GetDCEx(hWnd.Handle, hrgnClip, flags);
     GC.KeepAlive(hWnd);
     return(result);
 }
 static internal IHandle <IEnumerable <TMessage> > ForMessages <TMessage>(this IHandle <TMessage> receiver)
 {
     return(new Converter <TMessage>(receiver));
 }
Exemplo n.º 32
0
 /// <summary>
 /// Clean up work at the end of the gesture, either by canceling or finishing
 /// </summary>
 private void CleanUp()
 {
     slaveHandle = null;
 }
Exemplo n.º 33
0
 protected void OnHandleMouseDown(object sender, MouseEventArgs args)
 {
     clicked_handle = sender as IHandle;
 }
Exemplo n.º 34
0
 /// <summary>
 /// Clean up work at the end of the gesture, either by canceling or finishing
 /// </summary>
 private void CleanUp()
 {
     firstSlaveHandle = null;
     lastSlaveHandle  = null;
 }
Exemplo n.º 35
0
 public void Listen <TEvent>(IHandle <TEvent> handler)
     where TEvent : IEvent
 {
     Require.NotNull(handler, "handler");
     DoListen(typeof(TEvent), handler);
 }
Exemplo n.º 36
0
 /// <summary>
 /// Creates a new instance that wraps the original <paramref name="coreHandle"/> for the given <paramref name="bend"/>.
 /// </summary>
 public OuterControlPointHandle([NotNull] IHandle coreHandle, [NotNull] IBend bend)
 {
     this.coreHandle = coreHandle;
     this.bend       = bend;
 }
Exemplo n.º 37
0
 public void Unsubscribe <T>(IHandle <T> handler) where T : Message
 {
     _node.MainBus.Unsubscribe(handler);
 }
		public void VisitHandle (IHandle hostHandle) {
		}
Exemplo n.º 39
0
 public Publisher(IHandle<Message> handler)
 {
     _handler = handler;
 }
Exemplo n.º 40
0
 private void DispatchRecentMessagesTo(
     IHandle<ReaderSubscriptionMessage.CommittedEventDistributed> subscription,
     long fromTransactionFilePosition)
 {
     foreach (var m in _lastMessages)
         if (m.Data.Position.CommitPosition >= fromTransactionFilePosition)
             subscription.Handle(m);
 }
Exemplo n.º 41
0
        public bool ContainsHandle(IHandle ihandle)
        {
            Handle handle = ValidateHandle(ihandle);

            return(ReferenceEquals(handle.heap, this) && handle.index > -1);
        }
 public DelayedSender(IHandle <TMessage> handler)
 {
 }
Exemplo n.º 43
0
 public ValuesController(IUserApplicationService service)
 {
     this._service      = service;
     this._notification = DomainEvents.Container.GetService <IHandle <DomainNotification> >();
 }
Exemplo n.º 44
0
        /// <summary>
        /// A handler for mouse up events
        /// </summary>
        /// <param name="sender">the object that generated the event</param>
        /// <param name="e">the mouse event data</param>
        public override void MouseUp(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left) return;

            if (_selectedHandle != null)
            {
                _selectedHandle.Selected = false;
                _selectedHandle = null;
            }
            else if (_selectedFigure != null)
            {
                _selectedFigure = null;
            }
            else
            {
                _canvas.SelectionRectangle = Rectangle.Empty;
                _canvas.Repaint(Rectangle.Inflate(_selectionBox, 1, 1));
                _selectionBox = Rectangle.Empty;
            }
        }
Exemplo n.º 45
0
 public static IHandle <TInput> WidenFrom <TInput, TOutput>(this IHandle <TOutput> handler)
     where TOutput : Message
     where TInput : TOutput
 {
     return(new WideningHandler <TInput, TOutput>(handler));
 }
Exemplo n.º 46
0
 public void Register(IHandle handler)
 {
     _handlers.Add(handler.MessageType, handler);
 }
 private void DispatchRecentMessagesTo(
     IHandle<ProjectionCoreServiceMessage.CommittedEventDistributed> subscription)
 {
     foreach (var m in _lastMessages)
         subscription.Handle(m);
 }
 public ErraticMessageBehavior(IHandle <T> handler)
 {
     _handler = handler;
 }
Exemplo n.º 49
0
		public HandleTracker (IDrawingEditor editor, IHandle anchor): base (editor) {
			_anchorHandle = anchor;
		}
 internal Converter(IHandle <TMessage> receiver)
 {
     _receiver = receiver;
 }
Exemplo n.º 51
0
        /// <summary>
        /// A handler for mouse down events
        /// </summary>
        /// <param name="sender">the object that generated the event</param>
        /// <param name="e">the mouse event data</param>
        public override void MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left) return;

            foreach (var f in _canvas.SelectedFigures)
            {
                foreach (var h in f.Handles)
                {
                    if (h.Touches(e.X, e.Y))
                        _selectedHandle = h;
                }
            }
            if (_selectedHandle != null) // mouse was pressed over a handle
            {
                _selectedHandle.Selected = true;
            }
            else
            {
                _canvas.ClearSelected();
                _selectedFigure = _canvas.FindFigureAtPoint(e.Location);
                if (_selectedFigure != null) // mouse was pressed over a figure
                {
                    _selectedFigure.Selected = true;
                    _canvas.TopFigure = _selectedFigure;
                    _figureLocator = _selectedFigure.RelativeLocator(e.Location);
                }
                else // just on the canvas, so make a selection rectangle
                {
                    _startPoint = e.Location;
                    _selectionBox = new Rectangle(e.Location, Size.Empty);
                    _canvas.SelectionRectangle = _selectionBox;
                    _canvas.Repaint(Rectangle.Inflate(_selectionBox, 1, 1));
                }
            }
        }
Exemplo n.º 52
0
        private void onHandleThrown(IHandle handle, Vector3 throwVector)
        {
            _heldHandles.Remove(handle);

            _idleHandles.Add(handle);
        }
Exemplo n.º 53
0
 protected void AddHandle(IHandle handle)
 {
     Handles.Add(handle);
 }
Exemplo n.º 54
0
 internal Stock(Pennies purchasePrice, IHandle <Sell> saleHandler)
 {
     LatestPrice  = purchasePrice;
     _saleHandler = saleHandler;
 }
Exemplo n.º 55
0
 public static Task CloseAsync(this IHandle handle)
 {
     return(HelperFunctions.WrapSingle(handle.Close));
 }
Exemplo n.º 56
0
 public IHandle SetNext(IHandle handle)
 {
     this._handle = handle;
     return(_handle);
 }
Exemplo n.º 57
0
        public override void MouseUp(MouseEventArgs ev)
        {
            base.MouseUp (ev);

            if (undo.Count > 0)
                PushUndo();

            if (clicked_element == null && clicked_handle == null)
                EndSelection();

            clicked_element = null;
            clicked_handle = null;
        }
Exemplo n.º 58
0
        /// <summary>
        /// Adds the listener.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="listener">The listener.</param>
        /// <param name="holdStrongReference">The hold strong reference.</param>
        /// <returns>Emwin.Core.EventAggregator.IEventSubscriptionManager.</returns>
        public IEventSubscriptionManager AddListener <T>(IHandle <T> listener, bool?holdStrongReference)
        {
            AddListener((object)listener, holdStrongReference);

            return(this);
        }
Exemplo n.º 59
0
 public WideningHandler(IHandle <TOutput> handler)
 {
     _handler = handler;
 }
 protected void Subscribe <T>(IHandle <T> handler) where T : class, IMessage
 {
     _subscriptions.Add(_eventSubscriber.Subscribe <T>(handler));
 }