Exemple #1
0
        public object QuackInvoke(string name, object[] args)
        {
            if (target == null)
            {
                return(this);
            }
            object value = ExpandDuckTypedExpressions_WorkaroundForDuplicateVirtualMethods.Invoke(target, name, args);

            return(new IgnoreNull(value));
        }
Exemple #2
0
 public object QuackSet(string name, object[] parameters, object obj)
 {
     if (target == null)
     {
         return(this);
     }
     if (IsNullOrEmpty(parameters))
     {
         ExpandDuckTypedExpressions_WorkaroundForDuplicateVirtualMethods.SetProperty(target, name, obj);
     }
     else
     {
         ExpandDuckTypedExpressions_WorkaroundForDuplicateVirtualMethods.SetSlice(target, name,
                                                                                  GetParameterArray(parameters, obj));
     }
     return(this);
 }
Exemple #3
0
        public object QuackGet(string name, object[] parameters)
        {
            if (name == "_IsIgnoreNullReferencingNotNullObject_")
            {
                return(target != null);
            }

            if (target == null)
            {
                return(this);
            }
            object value;

            if (IsNullOrEmpty(parameters))
            {
                value = ExpandDuckTypedExpressions_WorkaroundForDuplicateVirtualMethods.GetProperty(target, name);
            }
            else
            {
                value = ExpandDuckTypedExpressions_WorkaroundForDuplicateVirtualMethods.GetSlice(target, name, parameters);
            }
            return(new IgnoreNull(value));
        }