コード例 #1
0
ファイル: Extensions.cs プロジェクト: daryllabar/DLaB.Xrm
 /// <summary>
 /// Gets the context information.
 /// </summary>
 /// <returns></returns>
 public static string GetContextInfo(this IExtendedWorkflowContext context)
 {
     return
         ("**** Context Info ****" + Environment.NewLine +
          "Activity: " + context.CodeActivityTypeName + Environment.NewLine +
          context.ToStringDebug());
 }
コード例 #2
0
 /// <summary>
 /// Method that gets called when an exception occurs in the Execute method.  Return true if the exception should be rethrown.
 /// This prevents losing the stack trace by rethrowing the originally caught error.
 /// </summary>
 /// <param name="ex"></param>
 /// <param name="context"></param>
 /// <returns></returns>
 protected virtual bool ExecuteExceptionHandler(Exception ex, IExtendedWorkflowContext context)
 {
     context.LogException(ex);
     // Unexpected Exception occurred, log exception then wrap and throw new exception
     if (context.IsolationMode == (int)IsolationMode.Sandbox)
     {
         Sandbox.ExceptionHandler.AssertCanThrow(ex);
     }
     return(true);
 }
コード例 #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="context"></param>
 protected abstract void Execute(IExtendedWorkflowContext context);
コード例 #4
0
ファイル: Extensions.cs プロジェクト: daryllabar/DLaB.Xrm
 /// <summary>Gets the value of the specified <see cref="T:System.Activities.InArgument`1" />.</summary>
 /// <param name="context"></param>
 /// <param name="argument">The argument to inspect.</param>
 /// <typeparam name="T">The type of the argument.</typeparam>
 /// <returns>The value of the argument.</returns>
 public static T GetValue <T>(this IExtendedWorkflowContext context, InArgument <T> argument)
 {
     return(context.CodeActivityContext.GetValue(argument));
 }
コード例 #5
0
ファイル: Extensions.cs プロジェクト: daryllabar/DLaB.Xrm
 /// <summary>Gets the value at the specified <see cref="T:System.Activities.LocationReference" />.</summary>
 /// <param name="context"></param>
 /// <param name="locationReference">The referenced location to inspect.</param>
 /// <typeparam name="T">The type of the value.</typeparam>
 /// <returns>The value of the referenced location.</returns>
 public static T GetValue <T>(this IExtendedWorkflowContext context, LocationReference locationReference)
 {
     return(context.CodeActivityContext.GetValue <T>(locationReference));
 }
コード例 #6
0
ファイル: Extensions.cs プロジェクト: daryllabar/DLaB.Xrm
 /// <summary>Gets the execution property of the specified type.</summary>
 /// <typeparam name="THandle">The type of execution property.</typeparam>
 /// <returns>The execution property.</returns>
 public static THandle GetProperty <THandle>(this IExtendedWorkflowContext context) where THandle : Handle
 {
     return(context.CodeActivityContext.GetProperty <THandle>());
 }
コード例 #7
0
ファイル: Extensions.cs プロジェクト: daryllabar/DLaB.Xrm
 /// <summary>Returns an extension of the specified type.</summary>
 /// <typeparam name="T">The type of extension to retrieve.</typeparam>
 /// <returns>The extension of the specified type if present; otherwise, <see langword="null" />.</returns>
 public static T GetExtension <T>(this IExtendedWorkflowContext context) where T : class
 {
     return(context.CodeActivityContext.GetExtension <T>());
 }
コード例 #8
0
ファイル: workflow.cs プロジェクト: derekfinlinson/d365-cli
 public override void ExecuteWorkflowActivity(IExtendedWorkflowContext context)
 {
     // Workflow activity logic
 }
コード例 #9
0
ファイル: Extensions.cs プロジェクト: daryllabar/DLaB.Xrm
 public static T Get <T>(this InOutArgument <T> arg, IExtendedWorkflowContext context)
 {
     return(arg.Get(context.CodeActivityContext));
 }
コード例 #10
0
ファイル: Extensions.cs プロジェクト: daryllabar/DLaB.Xrm
 /// <summary>Assigns a value to the specified <see cref="T:System.Activities.Argument" />.</summary>
 /// <param name="context"></param>
 /// <param name="argument">The argument to receive the new value.</param>
 /// <param name="value">The new value of the argument.</param>
 public static void SetValue(this IExtendedWorkflowContext context, Argument argument, object value)
 {
     context.CodeActivityContext.SetValue(argument, value);
 }
コード例 #11
0
ファイル: Extensions.cs プロジェクト: daryllabar/DLaB.Xrm
 /// <summary>Sends the specified custom tracking record to any registered tracking providers.</summary>
 /// <param name="context"></param>
 /// <param name="record">The data to be tracked.</param>
 public static void Track(this IExtendedWorkflowContext context, CustomTrackingRecord record)
 {
     context.CodeActivityContext.Track(record);
 }
コード例 #12
0
ファイル: Extensions.cs プロジェクト: daryllabar/DLaB.Xrm
 /// <summary>Assigns a value to the specified <see cref="T:System.Activities.InArgument`1" />.</summary>
 /// <param name="context"></param>
 /// <param name="argument">The argument to receive the new value.</param>
 /// <param name="value">The new value of the argument.</param>
 /// <typeparam name="T">The type of the argument.</typeparam>
 public static void SetValue <T>(this IExtendedWorkflowContext context, InArgument <T> argument, T value)
 {
     context.CodeActivityContext.SetValue(argument, value);
 }
コード例 #13
0
ファイル: Extensions.cs プロジェクト: daryllabar/DLaB.Xrm
 /// <summary>Assigns a value to the specified <see cref="T:System.Activities.LocationReference" />.</summary>
 /// <param name="context"></param>
 /// <param name="locationReference">The referenced location to receive the new value.</param>
 /// <param name="value">The new value of the referenced location.</param>
 /// <typeparam name="T">The type of the location.</typeparam>
 public static void SetValue <T>(this IExtendedWorkflowContext context, LocationReference locationReference, T value)
 {
     context.CodeActivityContext.SetValue(locationReference, value);
 }
コード例 #14
0
ファイル: Extensions.cs プロジェクト: daryllabar/DLaB.Xrm
 /// <summary>Gets the value of the specified <see cref="T:System.Activities.RuntimeArgument" />.</summary>
 /// <param name="context"></param>
 /// <param name="runtimeArgument">The argument to inspect.</param>
 /// <returns>The value of the argument.</returns>
 public static object GetValue(this IExtendedWorkflowContext context, RuntimeArgument runtimeArgument)
 {
     return(context.CodeActivityContext.GetValue(runtimeArgument));
 }
コード例 #15
0
 /// <summary>
 /// Method that gets called after the Execute
 /// </summary>
 /// <param name="context">The context.</param>
 protected virtual void PostExecute(IExtendedWorkflowContext context)
 {
 }
コード例 #16
0
ファイル: Extensions.cs プロジェクト: daryllabar/DLaB.Xrm
 public static void Set <T>(this OutArgument <T> arg, IExtendedWorkflowContext context, T value)
 {
     arg.Set(context.CodeActivityContext, value);
 }
コード例 #17
0
 /// <summary>
 /// Execution method for the workflow activity
 /// </summary>
 /// <param name="localContext">Context for the current plug-in.</param>
 public abstract void ExecuteWorkflowActivity(IExtendedWorkflowContext context);
コード例 #18
0
 protected sealed override void Execute(IExtendedWorkflowContext context)
 {
     Execute((ExtendedWorkflowContext)context);
 }