Пример #1
0
        public BindSignalToBinder(DiContainer container, SignalBindingBindInfo signalBindInfo)
        {
            _container = container;

            _signalBindInfo = signalBindInfo;
            // This will ensure that they finish the binding
            _bindStatement = container.StartBinding();
        }
 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);
        }
        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 static BindSignalIdToBinder <TSignal> BindSignal <TSignal>(this DiContainer container)
        {
            var signalBindInfo = new SignalBindingBindInfo(typeof(TSignal));

            return(new BindSignalIdToBinder <TSignal>(container, signalBindInfo));
        }
Пример #6
0
 public BindSignalIdToBinder(DiContainer container, SignalBindingBindInfo signalBindInfo)
     : base(container, signalBindInfo)
 {
 }