예제 #1
0
        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
                                               )
                                           ));
            }
        }
예제 #2
0
        public void OnSet(PropertyContext context)
        {
            var arg0 = (int)context.Arguments[0];

            context.Arguments.SetArgument(0, arg0 + 6);
            context.Proceed();
        }
        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 = (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 InheritsFromSimpleClass;

            if (ret.Value == 1)
            {
                context.SetReturnValue(new InheritsFromSimpleClass(2));
            }
        }
        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.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));
            }
        }
예제 #11
0
        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 OnSet(PropertyContext context)
        {
            var arg = context.Arguments[0] as InheritsFromSimpleClass[];

            if (arg.Length == 1 && arg[0].Value == 3)
            {
                context.Arguments.SetArgument(0, new[] { new InheritsFromSimpleClass(4), new InheritsFromSimpleClass(3) });
            }

            context.Proceed();
        }
        public void OnSet(PropertyContext context)
        {
            var arg = (SimpleStruct)context.Arguments[0];

            if (arg.Value == 3)
            {
                context.Arguments.SetArgument(0, new SimpleStruct(4));
            }

            context.Proceed();
        }
        public void OnSet(PropertyContext context)
        {
            var arg = (int)context.Arguments[0];

            if (arg == 3)
            {
                context.Arguments.SetArgument(0, 4);
            }

            context.Proceed();
        }
        public void OnSet(PropertyContext context)
        {
            var arg = context.Arguments[0] as SimpleStruct[];

            if (arg.Length == 1 && arg[0].Value == 3)
            {
                context.Arguments.SetArgument(0, new[] { new SimpleStruct(4), new SimpleStruct(3) });
            }

            context.Proceed();
        }
        public void OnSet(PropertyContext context)
        {
            var arg = context.Arguments[0] as string;

            if (arg == "c")
            {
                context.Arguments.SetArgument(0, "ca");
            }

            context.Proceed();
        }
예제 #17
0
        public void OnSet(PropertyContext context)
        {
            var arg = context.Arguments[0] as int[];

            if (arg.Length == 1 && arg[0] == 3)
            {
                context.Arguments.SetArgument(0, new[] { 4, 3 });
            }

            context.Proceed();
        }
        public void OnSet(PropertyContext context)
        {
            var arg = context.Arguments[0] as InheritsFromSimpleClass;

            if (arg.Value == 3)
            {
                context.Arguments.SetArgument(0, new InheritsFromSimpleClass(4));
            }

            context.Proceed();
        }
        public void OnSet(PropertyContext context)
        {
            var arg = context.Arguments[0] as string[];

            if (arg.Length == 1 && arg[0] == "c")
            {
                context.Arguments.SetArgument(0, new[] { "ca", "cb" });
            }

            context.Proceed();
        }
        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 <int>;

            if (ret.Count == 1 && ret[0] == 1)
            {
                context.SetReturnValue(new List <int> {
                    2, 1
                });
            }
        }
예제 #22
0
        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 <InheritsFromSimpleClass>;

            if (ret.Count == 1 && ret[0].Value == 1)
            {
                context.SetReturnValue(new List <InheritsFromSimpleClass> {
                    new InheritsFromSimpleClass(2), new InheritsFromSimpleClass(1)
                });
            }
        }
        public void OnSet(PropertyContext context)
        {
            var arg = context.Arguments[0] as List <int>;

            if (arg.Count == 1 && arg[0] == 3)
            {
                context.Arguments.SetArgument(0, new List <int> {
                    4, 3
                });
            }

            context.Proceed();
        }
        public void OnSet(PropertyContext context)
        {
            var arg = context.Arguments[0] as List <InheritsFromSimpleClass>;

            if (arg.Count == 1 && arg[0].Value == 3)
            {
                context.Arguments.SetArgument(0, new List <InheritsFromSimpleClass> {
                    new InheritsFromSimpleClass(4), new InheritsFromSimpleClass(3)
                });
            }

            context.Proceed();
        }
예제 #26
0
        public void OnSet(PropertyContext context)
        {
            var arg = context.Arguments[0] as List <string>;

            if (arg.Count == 1 && arg[0] == "c")
            {
                context.Arguments.SetArgument(0, new List <string> {
                    "ca", "cb"
                });
            }

            context.Proceed();
        }
        public void OnSet(PropertyContext context)
        {
            var arg = context.Arguments[0] as List <SimpleStruct>;

            if (arg.Count == 1 && arg[0].Value == 3)
            {
                context.Arguments.SetArgument(0, new List <SimpleStruct> {
                    new SimpleStruct(4), new SimpleStruct(3)
                });
            }

            context.Proceed();
        }
예제 #28
0
        public void OnSet(PropertyContext context)
        {
            var arg0 = (int)context.Arguments[0];

            if (arg0 == 2)
            {
                context.Arguments.SetArgument(0, 3);
                context.Arguments.SetArgument(1, "c");
                context.Arguments.SetArgument(2, new SimpleStruct(3));
                context.Arguments.SetArgument(3, new SimpleClass(3));
                context.Arguments.SetArgument(4, new InheritsFromSimpleClass(3));
                context.Arguments.SetArgument(5, new Tuple <int, string, SimpleStruct, SimpleClass, InheritsFromSimpleClass, object>(
                                                  4,
                                                  "d",
                                                  new SimpleStruct(4),
                                                  new SimpleClass(4),
                                                  new InheritsFromSimpleClass(4),
                                                  null
                                                  ));
            }

            context.Proceed();
        }
예제 #29
0
 public void OnGet(PropertyContext context)
 {
     context.Proceed();
     context.SetReturnValue(((int)context.ReturnValue) + 2);
 }
예제 #30
0
 public void OnSet(PropertyContext context)
 {
     context.Proceed();
 }