コード例 #1
0
        public BindSignalToBinder(DiContainer container, SignalBindingBindInfo signalBindInfo)
        {
            _container = container;

            _signalBindInfo = signalBindInfo;
            // This will ensure that they finish the binding
            _bindStatement = container.StartBinding();
        }
コード例 #2
0
 public BindSignalFromBinder(
     SignalBindingBindInfo signalBindInfo, BindStatement bindStatement, Func <TObject, Action <TSignal> > methodGetter,
     DiContainer container)
 {
     _signalBindInfo = signalBindInfo;
     _bindStatement  = bindStatement;
     _methodGetter   = methodGetter;
     _container      = container;
 }
コード例 #3
0
        public SignalCallbackWrapper(
            SignalBindingBindInfo bindInfo,
            Action <object> action,
            SignalBus signalBus)
        {
            _signalType = bindInfo.SignalType;
            _identifier = bindInfo.Identifier;
            _signalBus  = signalBus;
            _action     = action;

            signalBus.Subscribe(bindInfo.SignalType, OnSignalFired, _identifier);
        }
コード例 #4
0
        public SignalCallbackWithLookupWrapper(
            SignalBindingBindInfo signalBindInfo,
            Type objectType,
            Guid lookupId,
            Func <object, Action <object> > methodGetter,
            SignalBus signalBus,
            DiContainer container)
        {
            _objectType   = objectType;
            _signalType   = signalBindInfo.SignalType;
            _identifier   = signalBindInfo.Identifier;
            _container    = container;
            _methodGetter = methodGetter;
            _signalBus    = signalBus;
            _lookupId     = lookupId;

            signalBus.Subscribe(signalBindInfo.SignalType, OnSignalFired, _identifier);
        }
コード例 #5
0
        public SignalCommandCallbackWrapper(
            SignalBindingBindInfo bindInfo,
            Pool <TCommand, TSignal> commandPool,
            SignalBus signalBus,
            TickableManager tickableManager)
        {
            if (bindInfo == null)
            {
                return;
            }

            _signalType      = bindInfo.SignalType;
            _identifier      = bindInfo.Identifier;
            _signalBus       = signalBus;
            _tickableManager = tickableManager;
            _commandPool     = commandPool;

            signalBus.SubscribeId(bindInfo.SignalType, _identifier, OnSignalFired);
        }
コード例 #6
0
        public static BindSignalIdToBinder <TSignal> BindSignal <TSignal>(this DiContainer container)
        {
            var signalBindInfo = new SignalBindingBindInfo(typeof(TSignal));

            return(new BindSignalIdToBinder <TSignal>(container, signalBindInfo));
        }
コード例 #7
0
 public BindSignalIdToBinder(DiContainer container, SignalBindingBindInfo signalBindInfo)
     : base(container, signalBindInfo)
 {
 }