Ejemplo n.º 1
0
        static void Process(IFooBase fooParam)
        {
            FooDerived fooParamD = fooParam as FooDerived;

            if (fooParamD != null)
            {
                fooParamD.FooDFunc();
            }
            fooParam.FooBFunc();
        }
 // Or, you could use method injection on static methods...
 public static void DoSomething(IFooBase fooBase) { /* Do some stuff... */ }
 public ActionClass(IFooBase fooBase) { this._fooBase = foobase };