Ejemplo n.º 1
0
        void Construct(SignalManager manager, SignalSettings settings, BindInfo bindInfo)
        {
            _manager = manager;

            SignalId = new BindingId(this.GetType(), bindInfo.Identifier);
            Settings = settings;
        }
Ejemplo n.º 2
0
        public static SignalBinderWithId DeclareSignal(this DiContainer container, Type type)
        {
            var info           = new BindInfo(type);
            var signalSettings = new SignalSettings();

            container.Bind(type).AsCached().WithArguments(signalSettings, info);
            return(new SignalBinderWithId(info, signalSettings));
        }
        public static SignalBinderWithId DeclareSignal <T>(this DiContainer container)
            where T : ISignalBase
        {
            var info           = new BindInfo(typeof(T));
            var signalSettings = new SignalSettings();

            container.Bind <T>(info).AsCached().WithArguments(signalSettings, info);
            return(new SignalBinderWithId(info, signalSettings));
        }
Ejemplo n.º 4
0
 public ZenjectSettings(
     ValidationErrorResponses validationErrorResponse,
     RootResolveMethods validationRootResolveMethod            = RootResolveMethods.NonLazyOnly,
     bool displayWarningWhenResolvingDuringInstall             = true,
     bool ensureDeterministicDestructionOrderOnApplicationQuit = false,
     SignalSettings signalSettings = null)
 {
     _validationErrorResponse     = validationErrorResponse;
     _validationRootResolveMethod = validationRootResolveMethod;
     _displayWarningWhenResolvingDuringInstall             = displayWarningWhenResolvingDuringInstall;
     _ensureDeterministicDestructionOrderOnApplicationQuit = ensureDeterministicDestructionOrderOnApplicationQuit;
     _signalSettings = signalSettings ?? ZenjectSettings.SignalSettings.Default;
 }
Ejemplo n.º 5
0
 public ZenjectSettings(
     ValidationErrorResponses validationErrorResponse,
     RootResolveMethods validationRootResolveMethod            = RootResolveMethods.NonLazyOnly,
     bool displayWarningWhenResolvingDuringInstall             = true,
     bool ensureDeterministicDestructionOrderOnApplicationQuit = false,
     SignalSettings signalSettings = null,
     ConstructorChoiceStrategy constructorChoiceStrategy = ConstructorChoiceStrategy.InjectAttributeThenLeastArguments)
 {
     _validationErrorResponse     = validationErrorResponse;
     _validationRootResolveMethod = validationRootResolveMethod;
     _displayWarningWhenResolvingDuringInstall             = displayWarningWhenResolvingDuringInstall;
     _ensureDeterministicDestructionOrderOnApplicationQuit = ensureDeterministicDestructionOrderOnApplicationQuit;
     _signalSettings            = signalSettings ?? SignalSettings.Default;
     _constructorChoiceStrategy = constructorChoiceStrategy;
 }
Ejemplo n.º 6
0
 public SignalBinder(
     BindInfo bindInfo, SignalSettings signalSettings)
     : base(bindInfo)
 {
     _signalSettings = signalSettings;
 }
Ejemplo n.º 7
0
 public SignalBinderWithId(
     BindInfo bindInfo, SignalSettings signalSettings)
     : base(bindInfo, signalSettings)
 {
 }