public static object CallByName(object Instance, string MethodName, CallType UseCallType, params object[] Arguments) { switch (UseCallType) { case CallType.Method: return(NewLateBinding.LateCall(Instance, null, MethodName, Arguments, null, null, null, false)); case CallType.Get: return(NewLateBinding.LateGet(Instance, null, MethodName, Arguments, null, null, null)); case CallType.Let: case CallType.Set: { IDynamicMetaObjectProvider instance = IDOUtils.TryCastToIDMOP(Instance); if (instance == null) { NewLateBinding.LateSet(Instance, null, MethodName, Arguments, null, null, false, false, UseCallType); break; } IDOBinder.IDOSet(instance, MethodName, null, Arguments); break; } default: throw new ArgumentException(Utils.GetResourceString("Argument_InvalidValue1", new string[] { "CallType" })); } return(null); }
public static object LateGet(object Instance, Type Type, string MemberName, object[] Arguments, string[] ArgumentNames, Type[] TypeArguments, bool[] CopyBack) { Symbols.Container container; if (Arguments == null) { Arguments = Symbols.NoArguments; } if (ArgumentNames == null) { ArgumentNames = Symbols.NoArgumentNames; } if (TypeArguments == null) { TypeArguments = Symbols.NoTypeArguments; } if (Type != null) { container = new Symbols.Container(Type); } else { container = new Symbols.Container(Instance); } if (container.IsCOMObject) { return(LateBinding.LateGet(Instance, Type, MemberName, Arguments, ArgumentNames, CopyBack)); } IDynamicMetaObjectProvider instance = IDOUtils.TryCastToIDMOP(Instance); if ((instance != null) && (TypeArguments == Symbols.NoTypeArguments)) { return(IDOBinder.IDOGet(instance, MemberName, Arguments, ArgumentNames, CopyBack)); } return(ObjectLateGet(Instance, Type, MemberName, Arguments, ArgumentNames, TypeArguments, CopyBack)); }
private static object InternalLateInvokeDefault(object Instance, object[] Arguments, string[] ArgumentNames, bool ReportErrors, bool[] CopyBack) { IDynamicMetaObjectProvider instance = IDOUtils.TryCastToIDMOP(Instance); if (instance != null) { return(IDOBinder.IDOInvokeDefault(instance, Arguments, ArgumentNames, ReportErrors, CopyBack)); } return(ObjectLateInvokeDefault(Instance, Arguments, ArgumentNames, ReportErrors, CopyBack)); }
public static void LateSetComplex(object Instance, Type Type, string MemberName, object[] Arguments, string[] ArgumentNames, Type[] TypeArguments, bool OptimisticSet, bool RValueBase) { IDynamicMetaObjectProvider instance = IDOUtils.TryCastToIDMOP(Instance); if ((instance != null) && (TypeArguments == null)) { IDOBinder.IDOSetComplex(instance, MemberName, Arguments, ArgumentNames, OptimisticSet, RValueBase); } else { ObjectLateSetComplex(Instance, Type, MemberName, Arguments, ArgumentNames, TypeArguments, OptimisticSet, RValueBase); } }
public static void LateSet(object Instance, Type Type, string MemberName, object[] Arguments, string[] ArgumentNames, Type[] TypeArguments) { IDynamicMetaObjectProvider instance = IDOUtils.TryCastToIDMOP(Instance); if ((instance != null) && (TypeArguments == null)) { IDOBinder.IDOSet(instance, MemberName, ArgumentNames, Arguments); } else { ObjectLateSet(Instance, Type, MemberName, Arguments, ArgumentNames, TypeArguments); } }
public static void LateIndexSetComplex(object Instance, object[] Arguments, string[] ArgumentNames, bool OptimisticSet, bool RValueBase) { IDynamicMetaObjectProvider instance = IDOUtils.TryCastToIDMOP(Instance); if (instance != null) { IDOBinder.IDOIndexSetComplex(instance, Arguments, ArgumentNames, OptimisticSet, RValueBase); } else { ObjectLateIndexSetComplex(Instance, Arguments, ArgumentNames, OptimisticSet, RValueBase); } }
public static void LateIndexSet(object Instance, object[] Arguments, string[] ArgumentNames) { IDynamicMetaObjectProvider instance = IDOUtils.TryCastToIDMOP(Instance); if (instance != null) { IDOBinder.IDOIndexSet(instance, Arguments, ArgumentNames); } else { ObjectLateIndexSet(Instance, Arguments, ArgumentNames); } }
public static object LateGetInvokeDefault(object Instance, object[] Arguments, string[] ArgumentNames, bool ReportErrors) { if ((IDOUtils.TryCastToIDMOP(Instance) == null) && ((Arguments == null) || (Arguments.Length <= 0))) { return(Instance); } return(InternalLateInvokeDefault(Instance, Arguments, ArgumentNames, ReportErrors, IDOBinder.GetCopyBack())); }
public static object LateCallInvokeDefault(object Instance, object[] Arguments, string[] ArgumentNames, bool ReportErrors) { return(InternalLateInvokeDefault(Instance, Arguments, ArgumentNames, ReportErrors, IDOBinder.GetCopyBack())); }
public static object FallbackInvokeDefault1(object Instance, object[] Arguments, string[] ArgumentNames, bool ReportErrors) { return(IDOBinder.IDOFallbackInvokeDefault((IDynamicMetaObjectProvider)Instance, Arguments, ArgumentNames, ReportErrors, IDOBinder.GetCopyBack())); }
public static object FallbackGet(object Instance, string MemberName, object[] Arguments, string[] ArgumentNames) { return(ObjectLateGet(Instance, null, MemberName, Arguments, ArgumentNames, Symbols.NoTypeArguments, IDOBinder.GetCopyBack())); }
public static object FallbackCall(object Instance, string MemberName, object[] Arguments, string[] ArgumentNames, bool IgnoreReturn) { return(ObjectLateCall(Instance, null, MemberName, Arguments, ArgumentNames, Symbols.NoTypeArguments, IDOBinder.GetCopyBack(), IgnoreReturn)); }