/// <summary>
/// class Invoker
/// static class to accsessing COM Servers
/// </summary>
public static class Invoker
{ 
     /// <summary>
     /// perform method as latebind call without parameters 
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of method</param>
     public static void Method(COMObject comObject, string name)

     /// <summary>
     /// perform method as latebind call without parameters 
     /// </summary>
     /// <param name="comObject">target proxy</param>
     /// <param name="name">name of method</param>
     public static void Method(object comObject, string name)

     /// <summary>
     /// perform method as latebind call with parameters
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of method</param>
     /// <param name="paramsArray">array with parameters</param>
     public static void Method(COMObject comObject, string name, object[] paramsArray)

     /// <summary>
     /// perform method as latebind call with parameters 
     /// </summary>
     /// <param name="comObject">target proxy</param>
     /// <param name="name">name of method</param>
     /// <param name="paramsArray">array with parameters</param>
     public static void Method(object comObject, string name, object[] paramsArray)

     /// <summary>
     /// perform method as latebind call with parameters
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of method</param>
     /// <param name="paramsArray">array with parameters</param>
     /// <param name="paramModifiers">ararry with modifiers correspond paramsArray</param>
     public static void Method(COMObject comObject, string name, object[] paramsArray, ParameterModifier[] paramModifiers)

     /// <summary>
     /// perform method as latebind call with return value
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of method</param>
     /// <returns>any return value</returns>
     public static object MethodReturn(COMObject comObject, string name)

     /// <summary>
     /// perform method as latebind call with return value
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of method</param>
     /// <param name="paramsArray">array with parameters</param>
     /// <returns>any return value</returns>
     public static object MethodReturn(COMObject comObject, string name, object[] paramsArray)

      /// <summary>
     /// perform method as latebind call with return value
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of method</param>
     /// <param name="paramsArray">array with parameters</param>
     /// <param name="paramModifiers">ararry with modifiers correspond paramsArray</param>
     /// <returns>any return value</returns>
     public static object MethodReturn(COMObject comObject, string name, object[] paramsArray, ParameterModifier[] paramModifiers)

     /// <summary>
     /// perform property get as latebind call with return value
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of property</param>
     /// <returns>any return value</returns>
     public static object PropertyGet(object comObject, string name)

     /// <summary>
     /// perform property get as latebind call with return value
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of property</param>
     /// <returns>any return value</returns>
     public static object PropertyGet(COMObject comObject, string name)
  
     /// <summary>
     /// perform property get as latebind call with return value
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of property</param>
     /// <param name="paramsArray">array with parameters</param>
     /// <returns>any return value</returns>
     public static object PropertyGet(object comObject, string name, object[] paramsArray)
 
     /// <summary>
     /// perform property get as latebind call with return value
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of property</param>
     /// <param name="paramsArray">array with parameters</param>
     /// <returns>any return value</returns>
     public static object PropertyGet(COMObject comObject, string name, object[] paramsArray)
 
     /// <summary>
     /// perform property get as latebind call with return value
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of property</param>
     /// <param name="paramsArray">array with parameters</param>
     /// <param name="paramModifiers">ararry with modifiers correspond paramsArray</param>
     /// <returns>any return value</returns>
     public static object PropertyGet(COMObject comObject, string name, object[] paramsArray, ParameterModifier[] paramModifiers)
  
     /// <summary>
     /// perform property set as latebind call
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of property</param>
     /// <param name="paramsArray">array with parameters</param>
     /// <param name="value">value to be set</param>
     public static void PropertySet(COMObject comObject, string name, object[] paramsArray, object value)
  
     /// <summary>
     /// perform property set as latebind call
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of property</param>
     /// <param name="paramsArray">array with parameters</param>
     /// <param name="value">value to be set</param>
     /// <param name="paramModifiers">ararry with modifiers correspond paramsArray</param>
     public static void PropertySet(COMObject comObject, string name, object[] paramsArray, object value, ParameterModifier[] paramModifiers)

     /// <summary>
     /// perform property set as latebind call
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of property</param>
     /// <param name="value">value to be set</param>
     public static void PropertySet(COMObject comObject, string name, object value)
  
     /// <summary>
     /// perform property set as latebind call
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of property</param>
     /// <param name="value">value to be set</param>
     /// <param name="paramModifiers">ararry with modifiers correspond paramsArray</param>
     public static void PropertySet(COMObject comObject, string name, object value, ParameterModifier[] paramModifiers)

     /// <summary>
     /// perform property set as latebind call
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of property</param>
     /// <param name="value">value to be set</param>
     /// <param name="paramModifiers">ararry with modifiers correspond paramsArray</param>
     public static void PropertySet(COMObject comObject, string name, object[] value, ParameterModifier[] paramModifiers)

     /// <summary>
     /// perform property set as latebind call
     /// </summary>
     /// <param name="comObject">target object</param>
     /// <param name="name">name of property</param>
     /// <param name="value">value to be set</param>
     public static void PropertySet(COMObject comObject, string name, object[] value)

     /// <summary>
     /// create parameter modifiers array
     /// </summary>
     /// <param name="isRef">parameter is given as ref(ByRef in Visual Basic)</param>
     /// <returns></returns>
     public static ParameterModifier[] CreateParamModifiers(params bool[] isRef)

     /// <summary>
     /// replace null with Type.Missing, replace COMObject with COMObject.UnderlyingObject
     /// </summary>
     /// <param name="param">value to check</param>
     /// <returns>validated value</returns>
     public static object ValidateParam(object param)
 
     /// <summary>
     /// calls ValidateParam for every array item
     /// </summary>
     /// <param name="paramsArray">array with parameters</param>
     /// <returns><returns>validated  array</returns>
     public static object[] ValidateParamsArray(params object[] paramsArray)
     
     /// <summary>
     /// calls dipose in case if param is COMObject, calls Marshal.ReleaseComObject in case of param is a COM proxy
     /// </summary>
     /// <param name="param">any value</param>
     public static void ReleaseParam(object param)

     /// <summary>
     /// calls ReleaseParam for every array item
     /// </summary>
     /// <param name="paramsArray">any value array</param>
     public static void ReleaseParamsArray(params object[] paramsArray)

     /// <summary>
     /// copy the param array or returns null if paramsArray not set
     /// </summary>
     /// <param name="paramsArray">array with parameters</param>
     /// <returns>array copy or null</returns>
     public static object[] CreateEventParamsArray(params object[] paramsArray)
     
     /// <summary>
     /// copy the param array or returns null if paramsArray not set
     /// </summary>
     /// <param name="paramsModifier">ararry with modifiers correspond paramsArray<</param>
     /// <param name="paramsArray">array with parameters</param>
     /// <returns>array copy or null</returns>
     public static object[] CreateEventParamsArray(bool[] paramsModifier, params object[] paramsArray)
}

Last edited May 29, 2011 at 1:56 PM by SebastianDotNet, version 5

Comments

No comments yet.