Imported Upstream version 4.8.0.309

Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-10 13:04:39 +00:00
parent ee1447783b
commit 94b2861243
4912 changed files with 390737 additions and 49310 deletions

View File

@@ -1837,18 +1837,25 @@ namespace System.Workflow.Runtime
return HashServiceType(serviceType.AssemblyQualifiedName);
}
[SuppressMessage("Microsoft.Cryptographic.Standard", "CA5350:MD5CannotBeUsed",
[SuppressMessage("Microsoft.Cryptographic.Standard", "CA5350:MD5CannotBeUsed",
Justification = "Design has been approved. We are not using MD5 for any security or cryptography purposes but rather as a hash.")]
internal static Guid HashServiceType(String serviceFullTypeName)
{
MD5 md5 = new MD5CryptoServiceProvider();
byte[] data;
byte[] result;
UnicodeEncoding ue = new UnicodeEncoding();
data = ue.GetBytes(serviceFullTypeName);
result = md5.ComputeHash(data);
if (AppSettings.FIPSRequired)
{
result = MD5PInvokeHelper.CalculateHash(data);
}
else
{
MD5 md5 = new MD5CryptoServiceProvider();
result = md5.ComputeHash(data);
}
return new Guid(result);
}

View File

@@ -28,7 +28,8 @@ namespace System.Workflow.Runtime.Tracking
{
public TrackingProfileSerializer()
{
_schema = XmlSchema.Read(new StringReader(_xsd), null);
StringReader reader = new StringReader(_xsd);
_schema = XmlSchema.Read(new XmlTextReader(reader) { DtdProcessing = DtdProcessing.Prohibit }, null);
_schema.Namespaces.Add("", _ns);
}

View File

@@ -129,6 +129,17 @@ namespace System.Workflow.Runtime
// listen to activity definition resolve events
Activity.ActivityResolve += OnActivityDefinitionResolve;
Activity.WorkflowChangeActionsResolve += OnWorkflowChangeActionsResolve;
try
{
using (TelemetryEventSource eventSource = new TelemetryEventSource())
{
eventSource.V1Runtime();
}
}
catch
{
}
}
public WorkflowRuntime()