public YourReturnType MyFunction()
    {
        OriginalClass obj = new OriginalClass();

        //And inside this function call your original function
        return(obj.OriginalFunction());
    }
Beispiel #2
0
        public void NewOverrideTest()
        {
            var o = new OriginalClass()
            {
                Code = "old"
            };
            var json = Json.ToJson(o);

            Assert.AreEqual(o.Code, Json.ToObject <OriginalClass> (json).Code);
            var n = new NewOverrideClass()
            {
                Code = 123
            };

            json = Json.ToJson(n);
            Assert.AreEqual(n.Code, Json.ToObject <NewOverrideClass> (json).Code);
        }
Beispiel #3
0
 public MyAdapter(OriginalClass original)
 {
     _originalClass = original;
 }