Ejemplo n.º 1
0
        public int AClassWithBReponseRefToCallAMethod()
        {
            var a   = new AClass <GenericClassB>();
            var gen = new GenericClassB();

            a.SetReponse(gen);
            RefMethod(ref a);

            var aMoop = a.boop();

            return(aMoop);
        }
Ejemplo n.º 2
0
        public int AClassWithGenericReponseRefToCallAMethod <response>() where response : IGenericInterface
        {
            var a   = new AClass <response>();
            var gen = (response)Activator.CreateInstance(typeof(response));

            a.SetReponse(gen);
            RefMethod(ref a);

            var aMoop = a.boop();

            return(aMoop);
        }
Ejemplo n.º 3
0
        public int AClassWithAReponseRefToCallAMethod()
        {
            var a   = new AClass <GenericClassA>();
            var gen = new GenericClassA(); //data would normally be populated elsewhere but for testing and example is done here

            a.SetReponse(gen);
            RefMethod(ref a);

            var aMoop = a.boop();

            return(aMoop);
        }