Imported Upstream version 4.2.0.179

Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
Xamarin Public Jenkins
2015-08-26 07:17:56 -04:00
committed by Jo Shields
parent aa7da660d6
commit c042cd0c52
7507 changed files with 90259 additions and 657307 deletions

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections;
using System.IO;
namespace System.Diagnostics
{
class AssertWrapper
{
public static void ShowAssert(string stackTrace, StackFrame frame, string message, string detailMessage)
{
new DefaultTraceListener ().Fail (message, detailMessage);
}
}
}

View File

@@ -0,0 +1,12 @@
using System;
namespace System.Diagnostics
{
class ConfigurationManagerInternalFactory
{
public class Instance
{
public static bool SetConfigurationSystemInProgress = false;
}
}
}

View File

@@ -0,0 +1,8 @@
namespace System.Net
{
static class HttpSysSettings
{
public const bool EnableNonUtf8 = true;
public const bool FavorUtf8 = true;
}
}

View File

@@ -14,6 +14,12 @@ namespace System.Net {
}
}
internal static TraceSource HttpListener {
get {
return null;
}
}
[Conditional ("TRACE")]
internal static void Enter(TraceSource traceSource, object obj, string method, object paramObject) {
}
@@ -21,6 +27,9 @@ namespace System.Net {
[Conditional ("TRACE")]
internal static void Exit(TraceSource traceSource, object obj, string method, object retObject) {
}
internal static void PrintWarning(TraceSource traceSource, object obj, string method, string msg) {
}
}
#if MOBILE

View File

@@ -879,4 +879,48 @@ partial class SR
public const string net_wrongversion = "net_wrongversion";
public const string security_ExtendedProtection_NoOSSupport = "security_ExtendedProtection_NoOSSupport";
public const string Argument_FrameworkNameInvalid = "Argument_FrameworkNameInvalid";
public const string Argument_FrameworkNameInvalidVersion = "Argument_FrameworkNameInvalidVersion";
public const string Argument_FrameworkNameMissingVersion = "Argument_FrameworkNameMissingVersion";
public const string Argument_FrameworkNameTooShort = "Argument_FrameworkNameTooShort";
public const string DebugAssertBanner = @"---- DEBUG ASSERTION FAILED ----";
public const string ExceptionOccurred = @"An exception occurred writing trace output to log file '{0}'. {1}";
public const string TraceSwitchLevelTooHigh = @"Attempted to set {0} to a value that is too high. Setting level to TraceLevel.Verbose";
public const string TraceSwitchLevelTooLow = @"Attempted to set {0} to a value that is too low. Setting level to TraceLevel.Off";
public const string TraceSwitchInvalidLevel = @"The Level must be set to a value in the enumeration TraceLevel.";
public const string TraceListenerIndentSize = @"The IndentSize property must be non-negative.";
public const string TraceListenerFail = @"Fail:";
public const string TraceAsTraceSource = @"Trace";
public const string MustAddListener = @"Only TraceListeners can be added to a TraceListenerCollection.";
public const string DebugAssertShortMessage = @"---- Assert Short Message ----";
public const string DebugAssertLongMessage = @"---- Assert Long Message ----";
public const string BadConfigSwitchValue = @"The config value for Switch '{0}' was invalid.";
public const string AttributeNotSupported = @"'{0}' is not a valid configuration attribute for type '{1}'.";
public const string Could_not_create_listener = @"Couldn't create listener '{0}'.";
public const string TL_InitializeData_NotSpecified = @"initializeData needs to be valid for this TraceListener.";
public const string Could_not_create_type_instance = @"Could not create {0}.";
public const string Could_not_find_type = @"Couldn't find type for class {0}.";
public const string Could_not_get_constructor = @"Couldn't find constructor for class {0}.";
public const string EmptyTypeName_NotAllowed = @"switchType needs to be a valid class name. It can't be empty.";
public const string Incorrect_base_type = @"The specified type, '{0}' is not derived from the appropriate base type, '{1}'.";
public const string Only_specify_one = @"'switchValue' and 'switchName' cannot both be specified on source '{0}'.";
public const string Reference_listener_cant_have_properties = @"A listener with no type name specified references the sharedListeners section and cannot have any attributes other than 'Name'. Listener: '{0}'.";
public const string Reference_to_nonexistent_listener = @"Listener '{0}' does not exist in the sharedListeners section.";
public const string Argument_NullComment = @"The 'Comment' property of the CodeCommentStatement '{0}' cannot be null.";
public const string CodeGenOutputWriter = @"The output writer for code generation and the writer supplied don't match and cannot be used. This is generally caused by a bad implementation of a CodeGenerator derived class.";
public const string CodeGenReentrance = @"This code generation API cannot be called while the generator is being used to generate something else.";
public const string InvalidElementType = @"Element type {0} is not supported.";
public const string InvalidIdentifier = @"Identifier '{0}' is not valid.";
public const string InvalidPrimitiveType = @"Invalid Primitive Type: {0}. Consider using CodeObjectCreateExpression.";
public const string ArityDoesntMatch = @"The total arity specified in '{0}' does not match the number of TypeArguments supplied. There were '{1}' TypeArguments supplied.
";
public const string InvalidPathCharsInChecksum = @"The CodeChecksumPragma file name '{0}' contains invalid path characters.";
public const string InvalidLanguageIdentifier = @"The identifier:""{0}"" on the property:""{1}"" of type:""{2}"" is not a valid language-independent identifier name. Check to see if CodeGenerator.IsValidLanguageIndependentIdentifier allows the identifier name.";
public const string InvalidTypeName = @"The type name:""{0}"" on the property:""{1}"" of type:""{2}"" is not a valid language-independent type name.";
public const string InvalidRegion = "The region directive '{0}' contains invalid characters. RegionText cannot contain any new line characters.";
}

View File

@@ -9,7 +9,11 @@ namespace System.Net.Configuration {
}
}
#if !MOBILE
internal UnicodeEncodingConformance WebUtilityUnicodeEncodingConformance = UnicodeEncodingConformance.Auto;
internal UnicodeDecodingConformance WebUtilityUnicodeDecodingConformance = UnicodeDecodingConformance.Auto;
#endif
internal bool HttpListenerUnescapeRequestUrl = true;
}
}
}

View File

@@ -37,10 +37,10 @@ namespace System.Net.Sockets
// this version does not throw.
internal void InternalShutdown (SocketShutdown how)
{
if (!connected || disposed)
if (!is_connected || is_disposed)
return;
int error;
Shutdown_internal (socket, how, out error);
Shutdown_internal (safe_handle, how, out error);
}
internal IAsyncResult UnsafeBeginConnect (EndPoint remoteEP, AsyncCallback callback, object state)
@@ -86,7 +86,7 @@ namespace System.Net.Sockets
internal void SetSocketOption (SocketOptionLevel optionLevel, SocketOptionName optionName, int optionValue, bool silent)
{
if (disposed && closed) {
if (is_disposed && is_closed) {
if (silent)
return;
throw new ObjectDisposedException (GetType ().ToString ());
@@ -94,7 +94,7 @@ namespace System.Net.Sockets
int error;
SetSocketOption_internal (socket, optionLevel, optionName, null,
SetSocketOption_internal (safe_handle, optionLevel, optionName, null,
null, optionValue, out error);
if (!silent && error != 0)