Imported Upstream version 5.4.0.167

Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-08-21 15:34:15 +00:00
parent e49d6f06c0
commit 536cd135cc
12856 changed files with 563812 additions and 223249 deletions

View File

@ -116,12 +116,12 @@ namespace System.ServiceModel.Description
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SR2.CrossDomainJavascriptNotsupported));
}
#pragma warning disable 56506 // [....], endpoint.Contract is never null
#pragma warning disable 56506 // Microsoft, endpoint.Contract is never null
this.reflector = new XmlSerializerOperationBehavior.Reflector(endpoint.Contract.Namespace, null);
foreach (OperationDescription od in endpoint.Contract.Operations)
#pragma warning restore 56506
{
#pragma warning disable 56506 // [....], clientRuntime.Operations is never null
#pragma warning disable 56506 // Microsoft, clientRuntime.Operations is never null
if (clientRuntime.Operations.Contains(od.Name))
#pragma warning restore 56506
{
@ -169,7 +169,7 @@ namespace System.ServiceModel.Description
{
this.HelpUri = new UriTemplate(HelpPage.OperationListHelpPageUriTemplate).BindByPosition(endpoint.ListenUri);
}
#pragma warning disable 56506 // [....], endpoint.Contract is never null
#pragma warning disable 56506 // Microsoft, endpoint.Contract is never null
this.reflector = new XmlSerializerOperationBehavior.Reflector(endpoint.Contract.Namespace, null);
#pragma warning restore 56506
@ -177,12 +177,12 @@ namespace System.ServiceModel.Description
endpointDispatcher.AddressFilter = new PrefixEndpointAddressMessageFilter(endpoint.Address);
endpointDispatcher.ContractFilter = new MatchAllMessageFilter();
// operation selector
#pragma warning disable 56506 // [....], endpointDispatcher.DispatchRuntime is never null
#pragma warning disable 56506 // Microsoft, endpointDispatcher.DispatchRuntime is never null
endpointDispatcher.DispatchRuntime.OperationSelector = this.GetOperationSelector(endpoint);
#pragma warning restore 56506
// unhandled operation
string actionStarOperationName = null;
#pragma warning disable 56506 // [....], endpoint.Contract is never null
#pragma warning disable 56506 // Microsoft, endpoint.Contract is never null
foreach (OperationDescription od in endpoint.Contract.Operations)
#pragma warning restore 56506
{
@ -197,7 +197,7 @@ namespace System.ServiceModel.Description
{
// WCF v1 installs any Action="*" op into UnhandledDispatchOperation, but WebHttpBehavior
// doesn't want this, so we 'move' that operation back into normal set of operations
#pragma warning disable 56506 // [....], endpointDispatcher.DispatchRuntime.{Operations,UnhandledDispatchOperation} is never null
#pragma warning disable 56506 // Microsoft, endpointDispatcher.DispatchRuntime.{Operations,UnhandledDispatchOperation} is never null
endpointDispatcher.DispatchRuntime.Operations.Add(
endpointDispatcher.DispatchRuntime.UnhandledDispatchOperation);
#pragma warning restore 56506
@ -228,7 +228,7 @@ namespace System.ServiceModel.Description
jsonContentType = JsonMessageEncoderFactory.GetContentType(null);
}
#pragma warning disable 56506 // [....], endpointDispatcher.DispatchRuntime.UnhandledDispatchOperation is never null
#pragma warning disable 56506 // Microsoft, endpointDispatcher.DispatchRuntime.UnhandledDispatchOperation is never null
// always install UnhandledDispatchOperation (WebHttpDispatchOperationSelector may choose not to use it)
endpointDispatcher.DispatchRuntime.UnhandledDispatchOperation = new DispatchOperation(endpointDispatcher.DispatchRuntime, "*", WildcardAction, WildcardAction);
endpointDispatcher.DispatchRuntime.UnhandledDispatchOperation.DeserializeRequest = false;
@ -239,13 +239,13 @@ namespace System.ServiceModel.Description
foreach (OperationDescription od in endpoint.Contract.Operations)
{
DispatchOperation dop = null;
#pragma warning disable 56506 // [....], endpointDispatcher.DispatchRuntime, DispatchRuntime.Operations are never null
#pragma warning disable 56506 // Microsoft, endpointDispatcher.DispatchRuntime, DispatchRuntime.Operations are never null
if (endpointDispatcher.DispatchRuntime.Operations.Contains(od.Name))
#pragma warning restore 56506
{
dop = endpointDispatcher.DispatchRuntime.Operations[od.Name];
}
#pragma warning disable 56506 // [....], endpointDispatcher.DispatchRuntime.UnhandledDispatchOperation is never null
#pragma warning disable 56506 // Microsoft, endpointDispatcher.DispatchRuntime.UnhandledDispatchOperation is never null
else if (endpointDispatcher.DispatchRuntime.UnhandledDispatchOperation.Name == od.Name)
{
dop = endpointDispatcher.DispatchRuntime.UnhandledDispatchOperation;
@ -600,7 +600,7 @@ namespace System.ServiceModel.Description
WebMessageFormat responseFormat = GetResponseFormat(operationDescription);
// Determine if we should add a json formatter; If the ResponseFormat is json, we always add the json formatter even if the
// operation is XmlSerializerFormat because the formatter constructor throws the exception: "json not valid with XmlSerializerFormat" [[....]]
// operation is XmlSerializerFormat because the formatter constructor throws the exception: "json not valid with XmlSerializerFormat" [Microsoft]
bool useJson = (responseFormat == WebMessageFormat.Json || SupportsJsonFormat(operationDescription));
IDispatchMessageFormatter innerFormatter;

View File

@ -126,7 +126,7 @@ namespace System.ServiceModel.Description
public override void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
{
base.ApplyClientBehavior(endpoint, clientRuntime);
#pragma warning disable 56506 // [....], clientRuntime.MessageInspectors is never null
#pragma warning disable 56506 // Microsoft, clientRuntime.MessageInspectors is never null
clientRuntime.MessageInspectors.Add(new JsonClientMessageInspector());
#pragma warning restore 56506
}
@ -142,7 +142,7 @@ namespace System.ServiceModel.Description
}
catch (XmlException exception)
{
// [....], need to reference this resource string although fix for 13332 was removed
// Microsoft, need to reference this resource string although fix for 13332 was removed
throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SR2.GetString(SR2.InvalidXmlCharactersInNameUsedWithPOSTMethod, string.Empty, string.Empty, string.Empty), exception));
}
}
@ -151,7 +151,7 @@ namespace System.ServiceModel.Description
{
base.Validate(endpoint);
#pragma warning disable 56506 // [....], endpoint.Contract is never null
#pragma warning disable 56506 // Microsoft, endpoint.Contract is never null
foreach (OperationDescription operation in endpoint.Contract.Operations)
#pragma warning restore 56506
{
@ -232,7 +232,7 @@ namespace System.ServiceModel.Description
throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperArgument(
"endpointDispatcher", SR2.GetString(SR2.ChannelDispatcherMustBePresent));
}
#pragma warning disable 56506 // [....], endpointDispatcher.ChannelDispatcher.ErrorHandlers never null
#pragma warning disable 56506 // Microsoft, endpointDispatcher.ChannelDispatcher.ErrorHandlers never null
endpointDispatcher.ChannelDispatcher.ErrorHandlers.Add(new JsonErrorHandler(endpoint, endpointDispatcher.ChannelDispatcher.IncludeExceptionDetailInFaults));
#pragma warning restore 56506
}

View File

@ -36,7 +36,7 @@ namespace System.ServiceModel.Dispatcher
{
Message message = inputs[0] as Message;
outputs = null;
#pragma warning disable 56506 // [....], message.Properties is never null
#pragma warning disable 56506 // Microsoft, message.Properties is never null
if (message == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(

View File

@ -47,7 +47,7 @@ namespace System.ServiceModel.Dispatcher
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
SR2.GetString(SR2.EndpointAddressCannotBeNull)));
}
#pragma warning disable 56506 // [....], endpoint.Address.Uri is never null
#pragma warning disable 56506 // Microsoft, endpoint.Address.Uri is never null
Uri baseUri = endpoint.Address.Uri;
this.methodSpecificTables = new Dictionary<string, UriTemplateTable>();
this.templates = new Dictionary<string, UriTemplate>();
@ -61,7 +61,7 @@ namespace System.ServiceModel.Dispatcher
Dictionary<WCFKey, string> alreadyHaves = new Dictionary<WCFKey, string>();
#pragma warning disable 56506 // [....], endpoint.Contract is never null
#pragma warning disable 56506 // Microsoft, endpoint.Contract is never null
foreach (OperationDescription od in endpoint.Contract.Operations)
#pragma warning restore 56506
{
@ -156,7 +156,7 @@ namespace System.ServiceModel.Dispatcher
}
bool uriMatched;
string result = this.SelectOperation(ref message, out uriMatched);
#pragma warning disable 56506 // [....], Message.Properties is never null
#pragma warning disable 56506 // Microsoft, Message.Properties is never null
message.Properties.Add(HttpOperationSelectorUriMatchedPropertyName, uriMatched);
#pragma warning restore 56506
if (result != null)
@ -164,7 +164,7 @@ namespace System.ServiceModel.Dispatcher
message.Properties.Add(HttpOperationNamePropertyName, result);
if (DiagnosticUtility.ShouldTraceInformation)
{
#pragma warning disable 56506 // [....], Message.Headers is never null
#pragma warning disable 56506 // Microsoft, Message.Headers is never null
TraceUtility.TraceEvent(TraceEventType.Information, TraceCode.WebRequestMatchesOperation, SR2.GetString(SR2.TraceCodeWebRequestMatchesOperation, message.Headers.To, result));
#pragma warning restore 56506
}
@ -186,7 +186,7 @@ namespace System.ServiceModel.Dispatcher
return this.catchAllOperationName;
}
#pragma warning disable 56506 // [....], message.Properties is never null
#pragma warning disable 56506 // Microsoft, message.Properties is never null
if (!message.Properties.ContainsKey(HttpRequestMessageProperty.Name))
{
return this.catchAllOperationName;

View File

@ -1,4 +1,4 @@
//------------------------------------------------------------
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------
namespace System.ServiceModel.Web
@ -11,7 +11,7 @@ namespace System.ServiceModel.Web
// All of the code from this class was taken from build 20717.00
// of System.Net.HttpDateParse. If there is a bug with this code
// it should be fixed in the original System.Net.HttpDateParse
// and then ported here. [[....]]
// and then ported here. [Microsoft]
internal static class HttpDateParse
{
@ -48,7 +48,7 @@ namespace System.ServiceModel.Web
private const int DATE_TOKEN_JANUARY = 1;
private const int DATE_TOKEN_FEBRUARY = 2;
private const int DATE_TOKEN_MARCH = 3;
private const int DATE_TOKEN_Microsoft = 3;
private const int DATE_TOKEN_APRIL = 4;
private const int DATE_TOKEN_MAY = 5;
private const int DATE_TOKEN_JUNE = 6;
@ -145,7 +145,7 @@ namespace System.ServiceModel.Web
switch (MakeUpper(lpszDay[index + 2]))
{
case 'R':
return DATE_TOKEN_MARCH;
return DATE_TOKEN_Microsoft;
case 'Y':
return DATE_TOKEN_MAY;
}

View File

@ -37,7 +37,7 @@ namespace System.ServiceModel.Web
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("operationContext");
}
this.operationContext = operationContext;
#pragma warning disable 56506 // [....], operationContext.Extensions is never null
#pragma warning disable 56506 // Microsoft, operationContext.Extensions is never null
if (operationContext.Extensions.Find<WebOperationContext>() == null)
{
operationContext.Extensions.Add(this);

View File

@ -195,7 +195,7 @@ namespace System.ServiceModel
}
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] // [....], This is the pattern we use on the standard bindings in Indigo V1
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] // Microsoft, This is the pattern we use on the standard bindings in Indigo V1
bool IBindingRuntimePreferences.ReceiveSynchronously
{
get { return false; }