public ObjectA(InterfaceB b) { if (b == null) { throw new ArgumentNullException(); } this.b = b; }
public ThirdController(ILogger <ThirdController> logger, IConfiguration configuration, InterfaceA interfaceA, InterfaceB interfaceB, InterfaceC interfaceC) { _logger = logger; _configuration = configuration; _interfaceA = interfaceA; _interfaceB = interfaceB; _interfaceC = interfaceC; }
public void Callsite(InterfaceB intF) { B b = new B(); // in both possible implementations of foo, this callsite is relevant // in IntA, it improves virtual dispatch, // and in IntB, it improves the dataflow analysis. intF.Foo(b, new object(), false); }
public void Callsite(InterfaceB intF) { B b = new B(); // in both possible implementations of foo, this callsite is relevant // in IntA, it improves virtual dispatch, // and in IntB, it improves the dataflow analysis. intF.Foo(b, new object(), false); // no flow to `Sink()` via `A2.M()`, but flow via `IntA.Foo()` CallM(b, new object()); // no flow to `Sink()` CallM(this, new object()); // flow to `Sink()` }
static void Main(string[] args) { Console.WriteLine("Hello World!"); ICSContainer container = new CSContainer(); container.Register <InterfaceA, ClassA>(); container.Register <InterfaceB, ClassB>(); InterfaceB itfb = container.Resolve <InterfaceB>(); itfb.show(); }
public static void Main() { MyClass myClass = new MyClass(); Console.WriteLine("Calling myClass.MethodA()"); myClass.MethodA(); InterfaceB mySteerable = myClass as InterfaceB; Console.WriteLine("Calling mySteerable.MethodA()"); mySteerable.MethodA(); ((InterfaceB)myClass).MethodA(); InterfaceA myDrivable = myClass as InterfaceA; Console.WriteLine("Calling myDrivable.MethodA()"); myDrivable.MethodA(); ((InterfaceA)myClass).MethodA(); }
public void OneArgWithInterface(InterfaceB x) { AmbigousMethodsTests.Output = "OneArgWithInterface_InterfaceB"; }
public ObjectBDecorator(InterfaceB b) { _b = b; }
public Recipient(InterfaceA a, InterfaceB b) { Assert.Equals(a, b, "multiple type dependency"); }
public ObjectA(InterfaceB b, ObjectC c) { this.b = b; _c = c; }
public ObjectA(InterfaceB b) { this.b = b; }
public void NullPicking1(InterfaceB x) { AmbigousMethodsTests.Output = "NullPicking1_InterfaceB"; }
public void TwoArgsWithInterface(InterfaceB x, InterfaceB y) { AmbigousMethodsTests.Output = "OneArgWithInterface_InterfaceBInterfaceB"; }
public void TwoArgsWithInterface(InterfaceB x, ClassB2 y) { AmbigousMethodsTests.Output = "OneArgWithInterface_InterfaceBClassB2"; }
public ServiceC(InterfaceB @interface) { interfaceB = @interface; }
public void Visit(VisitContext <ContainerWithInterface> context, ref ContainerWithInterface container, InterfaceB value) { Visitor.Builder.Append("B"); context.ContinueVisitation(ref container); }
public ClassA(InterfaceB b) { Argument.IsNotNull(() => b); }
public static void PrintCounterB(InterfaceB b) { System.Console.Out.WriteLine(b.Counter); }