public void OnGet(PropertyContext context) { var arg0 = (int)context.Arguments[0]; context.Proceed(); if (arg0 == 2) { context.SetReturnValue(new Tuple <int, string, SimpleStruct, SimpleClass, InheritsFromSimpleClass, object>( 3, "c", new SimpleStruct(3), new SimpleClass(3), new InheritsFromSimpleClass(3), new Tuple <int, string, SimpleStruct, SimpleClass, InheritsFromSimpleClass, object>( 4, "d", new SimpleStruct(4), new SimpleClass(4), new InheritsFromSimpleClass(4), null ) )); } }
public void OnGet(PropertyContext context) { context.Proceed(); var original = context.ReturnValue as IEnumerable <int>; context.SetReturnValue(original.Select(i => i + 5).Concat(new[] { 8 })); }
public void OnGet(PropertyContext context) { context.Proceed(); var ret = context.ReturnValue as SimpleStruct[]; if (ret.Length == 1 && ret[0].Value == 1) { context.SetReturnValue(new[] { new SimpleStruct(2), new SimpleStruct(1) }); } }
public void OnGet(PropertyContext context) { context.Proceed(); var ret = context.ReturnValue as string; if (ret == "a") { context.SetReturnValue("ab"); } }
public void OnGet(PropertyContext context) { context.Proceed(); var ret = context.ReturnValue as InheritsFromSimpleClass; if (ret.Value == 1) { context.SetReturnValue(new InheritsFromSimpleClass(2)); } }
public void OnGet(PropertyContext context) { context.Proceed(); var ret = context.ReturnValue as int[]; if (ret.Length == 1 && ret[0] == 1) { context.SetReturnValue(new[] { 2, 1 }); } }
public void OnGet(PropertyContext context) { context.Proceed(); var ret = context.ReturnValue as InheritsFromSimpleClass[]; if (ret.Length == 1 && ret[0].Value == 1) { context.SetReturnValue(new[] { new InheritsFromSimpleClass(2), new InheritsFromSimpleClass(1) }); } }
public void OnGet(PropertyContext context) { context.Proceed(); var ret = (SimpleStruct)context.ReturnValue; if (ret.Value == 1) { context.SetReturnValue(new SimpleStruct(2)); } }
public void OnGet(PropertyContext context) { context.Proceed(); var ret = (int)context.ReturnValue; if (ret == 1) { context.SetReturnValue(2); } }
public void OnGet(PropertyContext context) { context.Proceed(); var ret = context.ReturnValue as string[]; if (ret.Length == 1 && ret[0] == "a") { context.SetReturnValue(new[] { "cd", "ab" }); } }
public void OnGet(PropertyContext context) { context.Proceed(); var ret = context.ReturnValue as List <InheritsFromSimpleClass>; if (ret.Count == 1 && ret[0].Value == 1) { context.SetReturnValue(new List <InheritsFromSimpleClass> { new InheritsFromSimpleClass(2), new InheritsFromSimpleClass(1) }); } }
public void OnGet(PropertyContext context) { context.Proceed(); var ret = context.ReturnValue as List <SimpleStruct>; if (ret.Count == 1 && ret[0].Value == 1) { context.SetReturnValue(new List <SimpleStruct> { new SimpleStruct(2), new SimpleStruct(1) }); } }
public void OnGet(PropertyContext context) { context.Proceed(); var ret = context.ReturnValue as List <string>; if (ret.Count == 1 && ret[0] == "a") { context.SetReturnValue(new List <string> { "cd", "ab" }); } }
public void OnGet(PropertyContext context) { context.Proceed(); var ret = context.ReturnValue as List <int>; if (ret.Count == 1 && ret[0] == 1) { context.SetReturnValue(new List <int> { 2, 1 }); } }
public void OnGet(PropertyContext context) { context.Proceed(); context.SetReturnValue(((int)context.ReturnValue) + 2); }