FIx for GitHub Issue #62 - SqlParameter is not marked as serializable

This commit is contained in:
NileshGhodekar 2018-11-10 18:39:58 +00:00
Родитель 9bb6e90222
Коммит c1f8d58fd0
11 изменённых файлов: 311 добавлений и 2 удалений

Просмотреть файл

@ -22,7 +22,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary
/// Build Number (MMDD) /// Build Number (MMDD)
/// Revision (if any on the same day) /// Revision (if any on the same day)
/// </summary> /// </summary>
internal const string Version = "2.18.0318.0"; internal const string Version = "2.18.1110.0";
/// <summary> /// <summary>
/// File Version information for the assembly consists of the following four values: /// File Version information for the assembly consists of the following four values:
@ -31,6 +31,6 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary
/// Build Number (MMDD) /// Build Number (MMDD)
/// Revision (if any on the same day) /// Revision (if any on the same day)
/// </summary> /// </summary>
internal const string FileVersion = "2.18.0318.0"; internal const string FileVersion = "2.18.1110.0";
} }
} }

Просмотреть файл

@ -13,9 +13,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
#region Namespaces Declarations #region Namespaces Declarations
using System; using System;
using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Globalization; using System.Globalization;
using System.Linq;
using System.Workflow.Activities; using System.Workflow.Activities;
using System.Workflow.ComponentModel; using System.Workflow.ComponentModel;
using MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common; using MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common;
@ -173,6 +175,35 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
} }
} }
/// <summary>
/// Determines the action taken when the activity has completed execution.
/// </summary>
/// <param name="executionContext">The execution context of the activity.</param>
protected override void OnSequenceComplete(ActivityExecutionContext executionContext)
{
Logger.Instance.WriteMethodEntry(EventIdentifier.AddDelayOnSequenceComplete);
try
{
// Clear the variable cache for the expression evaluator
// so that any variables, such as SqlParameter, not marked as serializable does not cause dehyration issues.
if (this.ActivityExpressionEvaluator != null
&& this.ActivityExpressionEvaluator.VariableCache != null
&& this.ActivityExpressionEvaluator.VariableCache.Keys != null)
{
List<string> variables = this.ActivityExpressionEvaluator.VariableCache.Keys.ToList();
foreach (string variable in variables)
{
this.ActivityExpressionEvaluator.VariableCache[variable] = null;
}
}
}
finally
{
Logger.Instance.WriteMethodExit(EventIdentifier.AddDelayOnSequenceComplete);
}
}
/// <summary> /// <summary>
/// Handles the ExecuteCode event of the ParseExpressions CodeActivity. /// Handles the ExecuteCode event of the ParseExpressions CodeActivity.
/// </summary> /// </summary>

Просмотреть файл

@ -590,6 +590,35 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
} }
} }
/// <summary>
/// Determines the action taken when the activity has completed execution.
/// </summary>
/// <param name="executionContext">The execution context of the activity.</param>
protected override void OnSequenceComplete(ActivityExecutionContext executionContext)
{
Logger.Instance.WriteMethodEntry(EventIdentifier.CreateResourceOnSequenceComplete);
try
{
// Clear the variable cache for the expression evaluator
// so that any variables, such as SqlParameter, not marked as serializable does not cause dehyration issues.
if (this.ActivityExpressionEvaluator != null
&& this.ActivityExpressionEvaluator.VariableCache != null
&& this.ActivityExpressionEvaluator.VariableCache.Keys != null)
{
List<string> variables = this.ActivityExpressionEvaluator.VariableCache.Keys.ToList();
foreach (string variable in variables)
{
this.ActivityExpressionEvaluator.VariableCache[variable] = null;
}
}
}
finally
{
Logger.Instance.WriteMethodExit(EventIdentifier.CreateResourceOnSequenceComplete);
}
}
/// <summary> /// <summary>
/// Handles the ExecuteCode event of the ParseDefinitions CodeActivity. /// Handles the ExecuteCode event of the ParseDefinitions CodeActivity.
/// </summary> /// </summary>

Просмотреть файл

@ -362,6 +362,35 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
} }
} }
/// <summary>
/// Determines the action taken when the activity has completed execution.
/// </summary>
/// <param name="executionContext">The execution context of the activity.</param>
protected override void OnSequenceComplete(ActivityExecutionContext executionContext)
{
Logger.Instance.WriteMethodEntry(EventIdentifier.DeleteResourcesOnSequenceComplete);
try
{
// Clear the variable cache for the expression evaluator
// so that any variables, such as SqlParameter, not marked as serializable does not cause dehyration issues.
if (this.ActivityExpressionEvaluator != null
&& this.ActivityExpressionEvaluator.VariableCache != null
&& this.ActivityExpressionEvaluator.VariableCache.Keys != null)
{
List<string> variables = this.ActivityExpressionEvaluator.VariableCache.Keys.ToList();
foreach (string variable in variables)
{
this.ActivityExpressionEvaluator.VariableCache[variable] = null;
}
}
}
finally
{
Logger.Instance.WriteMethodExit(EventIdentifier.DeleteResourcesOnSequenceComplete);
}
}
/// <summary> /// <summary>
/// Handles the ExecuteCode event of the PrepareResolve CodeActivity. /// Handles the ExecuteCode event of the PrepareResolve CodeActivity.
/// </summary> /// </summary>

Просмотреть файл

@ -412,6 +412,35 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
} }
} }
/// <summary>
/// Determines the action taken when the activity has completed execution.
/// </summary>
/// <param name="executionContext">The execution context of the activity.</param>
protected override void OnSequenceComplete(ActivityExecutionContext executionContext)
{
Logger.Instance.WriteMethodEntry(EventIdentifier.GenerateUniqueValueOnSequenceComplete);
try
{
// Clear the variable cache for the expression evaluator
// so that any variables, such as SqlParameter, not marked as serializable does not cause dehyration issues.
if (this.ActivityExpressionEvaluator != null
&& this.ActivityExpressionEvaluator.VariableCache != null
&& this.ActivityExpressionEvaluator.VariableCache.Keys != null)
{
List<string> variables = this.ActivityExpressionEvaluator.VariableCache.Keys.ToList();
foreach (string variable in variables)
{
this.ActivityExpressionEvaluator.VariableCache[variable] = null;
}
}
}
finally
{
Logger.Instance.WriteMethodExit(EventIdentifier.GenerateUniqueValueOnSequenceComplete);
}
}
/// <summary> /// <summary>
/// Resolves the value filter. /// Resolves the value filter.
/// </summary> /// </summary>

Просмотреть файл

@ -408,6 +408,35 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
} }
} }
/// <summary>
/// Determines the action taken when the activity has completed execution.
/// </summary>
/// <param name="executionContext">The execution context of the activity.</param>
protected override void OnSequenceComplete(ActivityExecutionContext executionContext)
{
Logger.Instance.WriteMethodEntry(EventIdentifier.RequestApprovalOnSequenceComplete);
try
{
// Clear the variable cache for the expression evaluator
// so that any variables, such as SqlParameter, not marked as serializable does not cause dehyration issues.
if (this.ActivityExpressionEvaluator != null
&& this.ActivityExpressionEvaluator.VariableCache != null
&& this.ActivityExpressionEvaluator.VariableCache.Keys != null)
{
List<string> variables = this.ActivityExpressionEvaluator.VariableCache.Keys.ToList();
foreach (string variable in variables)
{
this.ActivityExpressionEvaluator.VariableCache[variable] = null;
}
}
}
finally
{
Logger.Instance.WriteMethodExit(EventIdentifier.RequestApprovalOnSequenceComplete);
}
}
/// <summary> /// <summary>
/// Handles the ExecuteCode event of the ParseExpressions CodeActivity. /// Handles the ExecuteCode event of the ParseExpressions CodeActivity.
/// </summary> /// </summary>

Просмотреть файл

@ -21,6 +21,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Linq;
using System.Management.Automation; using System.Management.Automation;
using System.Management.Automation.Runspaces; using System.Management.Automation.Runspaces;
using System.Reflection; using System.Reflection;
@ -516,6 +517,35 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
} }
} }
/// <summary>
/// Determines the action taken when the activity has completed execution.
/// </summary>
/// <param name="executionContext">The execution context of the activity.</param>
protected override void OnSequenceComplete(ActivityExecutionContext executionContext)
{
Logger.Instance.WriteMethodEntry(EventIdentifier.RunPowerShellScriptOnSequenceComplete);
try
{
// Clear the variable cache for the expression evaluator
// so that any variables, such as SqlParameter, not marked as serializable does not cause dehyration issues.
if (this.ActivityExpressionEvaluator != null
&& this.ActivityExpressionEvaluator.VariableCache != null
&& this.ActivityExpressionEvaluator.VariableCache.Keys != null)
{
List<string> variables = this.ActivityExpressionEvaluator.VariableCache.Keys.ToList();
foreach (string variable in variables)
{
this.ActivityExpressionEvaluator.VariableCache[variable] = null;
}
}
}
finally
{
Logger.Instance.WriteMethodExit(EventIdentifier.RunPowerShellScriptOnSequenceComplete);
}
}
/// <summary> /// <summary>
/// Sets up the PowerShell shell stream event handlers. /// Sets up the PowerShell shell stream event handlers.
/// </summary> /// </summary>

Просмотреть файл

@ -525,6 +525,35 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
} }
} }
/// <summary>
/// Determines the action taken when the activity has completed execution.
/// </summary>
/// <param name="executionContext">The execution context of the activity.</param>
protected override void OnSequenceComplete(ActivityExecutionContext executionContext)
{
Logger.Instance.WriteMethodEntry(EventIdentifier.SendEmailNotificationOnSequenceComplete);
try
{
// Clear the variable cache for the expression evaluator
// so that any variables, such as SqlParameter, not marked as serializable does not cause dehyration issues.
if (this.ActivityExpressionEvaluator != null
&& this.ActivityExpressionEvaluator.VariableCache != null
&& this.ActivityExpressionEvaluator.VariableCache.Keys != null)
{
List<string> variables = this.ActivityExpressionEvaluator.VariableCache.Keys.ToList();
foreach (string variable in variables)
{
this.ActivityExpressionEvaluator.VariableCache[variable] = null;
}
}
}
finally
{
Logger.Instance.WriteMethodExit(EventIdentifier.SendEmailNotificationOnSequenceComplete);
}
}
/// <summary> /// <summary>
/// Converts the specified email template resolved expression into a Guid object /// Converts the specified email template resolved expression into a Guid object
/// </summary> /// </summary>

Просмотреть файл

@ -440,6 +440,35 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
} }
} }
/// <summary>
/// Determines the action taken when the activity has completed execution.
/// </summary>
/// <param name="executionContext">The execution context of the activity.</param>
protected override void OnSequenceComplete(ActivityExecutionContext executionContext)
{
Logger.Instance.WriteMethodEntry(EventIdentifier.UpdateResourcesOnSequenceComplete);
try
{
// Clear the variable cache for the expression evaluator
// so that any variables, such as SqlParameter, not marked as serializable does not cause dehyration issues.
if (this.ActivityExpressionEvaluator != null
&& this.ActivityExpressionEvaluator.VariableCache != null
&& this.ActivityExpressionEvaluator.VariableCache.Keys != null)
{
List<string> variables = this.ActivityExpressionEvaluator.VariableCache.Keys.ToList();
foreach (string variable in variables)
{
this.ActivityExpressionEvaluator.VariableCache[variable] = null;
}
}
}
finally
{
Logger.Instance.WriteMethodExit(EventIdentifier.UpdateResourcesOnSequenceComplete);
}
}
/// <summary> /// <summary>
/// Handles the ExecuteCode event of the Prepare CodeActivity. /// Handles the ExecuteCode event of the Prepare CodeActivity.
/// </summary> /// </summary>

Просмотреть файл

@ -388,6 +388,35 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Activitie
} }
} }
/// <summary>
/// Determines the action taken when the activity has completed execution.
/// </summary>
/// <param name="executionContext">The execution context of the activity.</param>
protected override void OnSequenceComplete(ActivityExecutionContext executionContext)
{
Logger.Instance.WriteMethodEntry(EventIdentifier.VerifyRequestOnSequenceComplete);
try
{
// Clear the variable cache for the expression evaluator
// so that any variables, such as SqlParameter, not marked as serializable does not cause dehyration issues.
if (this.ActivityExpressionEvaluator != null
&& this.ActivityExpressionEvaluator.VariableCache != null
&& this.ActivityExpressionEvaluator.VariableCache.Keys != null)
{
List<string> variables = this.ActivityExpressionEvaluator.VariableCache.Keys.ToList();
foreach (string variable in variables)
{
this.ActivityExpressionEvaluator.VariableCache[variable] = null;
}
}
}
finally
{
Logger.Instance.WriteMethodExit(EventIdentifier.VerifyRequestOnSequenceComplete);
}
}
/// <summary> /// <summary>
/// Handles the ExecuteCode event of the Prepare CodeActivity. /// Handles the ExecuteCode event of the Prepare CodeActivity.
/// </summary> /// </summary>

Просмотреть файл

@ -128,6 +128,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
/// </summary> /// </summary>
public const int CreateResourceActorIsNotValueExpressionCondition = 10115; public const int CreateResourceActorIsNotValueExpressionCondition = 10115;
/// <summary>
/// The event identifier for CreateResource OnSequenceComplete events
/// </summary>
public const int CreateResourceOnSequenceComplete = 10116;
/// <summary> /// <summary>
/// The event identifier for DeleteResources Constructor events /// The event identifier for DeleteResources Constructor events
/// </summary> /// </summary>
@ -188,6 +193,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
/// </summary> /// </summary>
public const int DeleteResourcesActorIsNotValueExpressionCondition = 10212; public const int DeleteResourcesActorIsNotValueExpressionCondition = 10212;
/// <summary>
/// The event identifier for DeleteResources OnSequenceComplete events
/// </summary>
public const int DeleteResourcesOnSequenceComplete = 10213;
/// <summary> /// <summary>
/// The event identifier for GenerateUniqueValue Constructor events /// The event identifier for GenerateUniqueValue Constructor events
/// </summary> /// </summary>
@ -263,6 +273,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
/// </summary> /// </summary>
public const int GenerateUniqueValueRepositionUniquenessKey = 10315; public const int GenerateUniqueValueRepositionUniquenessKey = 10315;
/// <summary>
/// The event identifier for GenerateUniqueValue OnSequenceComplete events
/// </summary>
public const int GenerateUniqueValueOnSequenceComplete = 10316;
/// <summary> /// <summary>
/// The event identifier for RunPowerShellScript Constructor events /// The event identifier for RunPowerShellScript Constructor events
/// </summary> /// </summary>
@ -303,6 +318,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
/// </summary> /// </summary>
public const int RunPowerShellScriptActivityExecutionConditionSatisfiedCondition = 10408; public const int RunPowerShellScriptActivityExecutionConditionSatisfiedCondition = 10408;
/// <summary>
/// The event identifier for RunPowerShellScript OnSequenceComplete events
/// </summary>
public const int RunPowerShellScriptOnSequenceComplete = 10409;
/// <summary> /// <summary>
/// The event identifier for UpdateResources Constructor events /// The event identifier for UpdateResources Constructor events
/// </summary> /// </summary>
@ -368,6 +388,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
/// </summary> /// </summary>
public const int UpdateResourcesForEachDynamicStringForResolutionChildCompleted = 10513; public const int UpdateResourcesForEachDynamicStringForResolutionChildCompleted = 10513;
/// <summary>
/// The event identifier for UpdateResources OnSequenceComplete events
/// </summary>
public const int UpdateResourcesOnSequenceComplete = 10514;
/// <summary> /// <summary>
/// The event identifier for VerifyRequest Constructor events /// The event identifier for VerifyRequest Constructor events
/// </summary> /// </summary>
@ -433,6 +458,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
/// </summary> /// </summary>
public const int VerifyRequestActivityExecutionConditionSatisfiedCondition = 10613; public const int VerifyRequestActivityExecutionConditionSatisfiedCondition = 10613;
/// <summary>
/// The event identifier for VerifyRequest OnSequenceComplete events
/// </summary>
public const int VerifyRequestOnSequenceComplete = 10614;
/// <summary> /// <summary>
/// The event identifier for AsynchronousCreateResource Constructor events /// The event identifier for AsynchronousCreateResource Constructor events
/// </summary> /// </summary>
@ -1458,6 +1488,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
/// </summary> /// </summary>
public const int AddDelayTraceWakeupExecuteCode = 12506; public const int AddDelayTraceWakeupExecuteCode = 12506;
/// <summary>
/// The event identifier for AddDelay OnSequenceComplete events
/// </summary>
public const int AddDelayOnSequenceComplete = 12507;
/// <summary> /// <summary>
/// The event identifier for SendEmailNotification Constructor events /// The event identifier for SendEmailNotification Constructor events
/// </summary> /// </summary>
@ -1611,6 +1646,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
/// </summary> /// </summary>
public const int SendEmailNotificationQueriesHaveNoValueExpressionsCondition = 12630; public const int SendEmailNotificationQueriesHaveNoValueExpressionsCondition = 12630;
/// <summary>
/// The event identifier for SendEmailNotification OnSequenceComplete events
/// </summary>
public const int SendEmailNotificationOnSequenceComplete = 12631;
/// <summary> /// <summary>
/// The event identifier for RequestApproval Constructor events /// The event identifier for RequestApproval Constructor events
/// </summary> /// </summary>
@ -1761,6 +1801,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
/// </summary> /// </summary>
public const int RequestApprovalFormatRecipient = 12729; public const int RequestApprovalFormatRecipient = 12729;
/// <summary>
/// The event identifier for RequestApproval OnSequenceComplete events
/// </summary>
public const int RequestApprovalOnSequenceComplete = 12730;
#endregion #endregion
#region "Informational Events" #region "Informational Events"