// ReSharper disable once ParameterOnlyUsedForPreconditionCheck.Local - tests that DI passes a value. // ReSharper disable once UnusedMember.Local - invoked by DI. public void Deps2(Dep2 dep) { if (dep == null) { throw new ArgumentNullException(nameof(dep)); } }
public DefaultGroupCommandFactory(Dep1 d1, Dep2 d2, Dep3 d3, Dep4 d4, Dep5 d5) { _d1 = d1; _d2 = d2; _d3 = d3; _d4 = d4; _d5 = d5; }
public void ConstructorSelectionTests_Decorator_Args() { using var container = new StashboxContainer(config => config.WithUnknownTypeResolution()); var dep = new Dep(); var dep2 = new Dep2(); container.RegisterDecorator <Dep, DepDecorator>(context => context.WithConstructorByArguments(dep, dep2)); var test = container.Resolve <Dep>(); Assert.Same(dep, ((DepDecorator)test).Dep); Assert.Same(dep2, ((DepDecorator)test).Dep2); }
public void ConstructorSelectionTests_Args() { using var container = new StashboxContainer(); var dep = new Dep(); var dep2 = new Dep2(); container.Register <Test>(context => context.WithConstructorByArguments(dep, dep2)); var test = container.Resolve <Test>(); Assert.Same(dep, test.Dep); Assert.Same(dep2, test.Dep2); }
public CtroFooBar(Dep0 dep0, Dep1 dep1, Dep2 dep2) { if (dep0 == null) { throw new ArgumentNullException(nameof(dep0)); } if (dep1 == null) { throw new ArgumentNullException(nameof(dep1)); } if (dep2 == null) { throw new ArgumentNullException(nameof(dep2)); } }
public GetGroupCommand(Result <string> result, Dep2 d2, Dep4 d4) { _result = result; _d2 = d2; _d4 = d4; }
public Test(Dep dep, Dep2 dep2, Dep3 dep3) { Assert.True(false, "wrong constructor"); }
public Test(Dep dep, Dep2 dep2) { this.Dep = dep; this.Dep2 = dep2; }
public DepDecorator(Dep dep, Dep2 dep2, Dep3 dep3) { Assert.True(false, "wrong constructor"); }
public DepDecorator(Dep dep, Dep2 dep2) { this.Dep = dep; this.Dep2 = dep2; }
void StObjConstruct(Dep2 d) { Dep2 = d; }
public AudioChannelViewModel(Channel channel, Dep1 dep1, Dep2 dep2, Dep3 dep3) {
public DepMultipleCtor1(Dep1 d, Dep2 d2) { }
public Test(Dep dep, Dep2 dep2, Dep3 dep3) { Assert.Fail("wrong constructor"); }
public DepDecorator(Dep dep, Dep2 dep2, Dep3 dep3) { Assert.Fail("wrong constructor"); }