Beispiel #1
0
 /// <summary>
 /// Execute a variant property set
 /// </summary>
 /// <param name="caller">calling instance</param>
 /// <param name="name">property name</param>
 /// <param name="args">arguments as any</param>
 internal static void ExecuteVariantPropertySetInternal <T>(this COMObject caller, string name, object[] args) where T : class, ICOMObject
 {
     try
     {
         caller.BeforeExecute(ExecuteMode.PropertySet, name, args);
         caller.CallPropertySet(name, args);
         caller.AfterExecute(ExecuteMode.PropertySet, name, args, null != args && args.Length > 0 ? args[args.Length - 1] : null);
     }
     catch (Exception exception)
     {
         bool   continueAnyway = false;
         object continueResult = null;
         caller.ExecutionError(ExecuteMode.PropertySet, name, args, exception, ref continueAnyway, ref continueResult);
         if (!continueAnyway)
         {
             throw;
         }
     }
 }