コード例 #1
0
 public AdderSetter(IXamlMethod getter, IXamlMethod adder)
 {
     _getter    = getter;
     _adder     = adder;
     TargetType = getter.DeclaringType;
     Parameters = adder.ParametersWithThis().Skip(1).ToList();
 }
コード例 #2
0
 public XamlMethodWithCasts(IXamlMethod method, IEnumerable <IXamlType> newArgumentTypes)
 {
     _method    = method;
     Parameters = newArgumentTypes.ToList();
     _baseParametersWithThis = _method.ParametersWithThis();
     if (_baseParametersWithThis.Count != Parameters.Count)
     {
         throw new ArgumentException("Method argument count mismatch");
     }
 }
            public AdderSetter(IXamlMethod getter, IXamlMethod adder)
            {
                _getter    = getter;
                _adder     = adder;
                TargetType = getter.DeclaringType;
                Parameters = adder.ParametersWithThis().Skip(1).ToList();

                bool allowNull = Parameters.Last().AcceptsNull();

                BinderParameters = new PropertySetterBinderParameters
                {
                    AllowMultiple    = true,
                    AllowXNull       = allowNull,
                    AllowRuntimeNull = allowNull
                };
            }
コード例 #4
0
 public XamlDirectCallPropertySetter(IXamlMethod method)
 {
     _method    = method;
     Parameters = method.ParametersWithThis().Skip(1).ToList();
     TargetType = method.ThisOrFirstParameter();
 }