Imported Upstream version 4.6.0.182

Former-commit-id: 439c182e520038bf50777ca2fe684f216ae28552
This commit is contained in:
Xamarin Public Jenkins (auto-signing) 2016-09-01 10:46:18 +00:00
parent c911219690
commit 804b15604f
118 changed files with 1007 additions and 891 deletions

View File

@ -36,22 +36,28 @@ namespace Microsoft.Win32
{ {
public static class RegistryAclExtensions public static class RegistryAclExtensions
{ {
[MonoTODO]
public static RegistrySecurity GetAccessControl (this RegistryKey key) public static RegistrySecurity GetAccessControl (this RegistryKey key)
{ {
throw new NotImplementedException (); if (key == null)
throw new ArgumentNullException (nameof (key));
return key.GetAccessControl ();
} }
[MonoTODO]
public static RegistrySecurity GetAccessControl (this RegistryKey key, AccessControlSections includeSections) public static RegistrySecurity GetAccessControl (this RegistryKey key, AccessControlSections includeSections)
{ {
throw new NotImplementedException (); if (key == null)
throw new ArgumentNullException (nameof (key));
return key.GetAccessControl (includeSections);
} }
[MonoTODO]
public static void SetAccessControl (this RegistryKey key, RegistrySecurity registrySecurity) public static void SetAccessControl (this RegistryKey key, RegistrySecurity registrySecurity)
{ {
throw new NotImplementedException (); if (key == null)
throw new ArgumentNullException (nameof (key));
key.SetAccessControl (registrySecurity);
} }
} }
} }

View File

@ -37,36 +37,54 @@ namespace System.Diagnostics
[MonoTODO] [MonoTODO]
public static IntPtr GetNativeImageBase (this StackFrame stackFrame) public static IntPtr GetNativeImageBase (this StackFrame stackFrame)
{ {
if (stackFrame == null)
throw new ArgumentNullException (nameof (stackFrame));
throw new NotImplementedException (); throw new NotImplementedException ();
} }
[MonoTODO] [MonoTODO]
public static IntPtr GetNativeIP (this StackFrame stackFrame) public static IntPtr GetNativeIP (this StackFrame stackFrame)
{ {
if (stackFrame == null)
throw new ArgumentNullException (nameof (stackFrame));
throw new NotImplementedException (); throw new NotImplementedException ();
} }
[MonoTODO] [MonoTODO]
public static bool HasNativeImage (this StackFrame stackFrame) public static bool HasNativeImage (this StackFrame stackFrame)
{ {
if (stackFrame == null)
throw new ArgumentNullException (nameof (stackFrame));
throw new NotImplementedException (); throw new NotImplementedException ();
} }
[MonoTODO] [MonoTODO]
public static bool HasMethod (this StackFrame stackFrame) public static bool HasMethod (this StackFrame stackFrame)
{ {
if (stackFrame == null)
throw new ArgumentNullException (nameof (stackFrame));
throw new NotImplementedException (); throw new NotImplementedException ();
} }
[MonoTODO] [MonoTODO]
public static bool HasILOffset (this StackFrame stackFrame) public static bool HasILOffset (this StackFrame stackFrame)
{ {
if (stackFrame == null)
throw new ArgumentNullException (nameof (stackFrame));
throw new NotImplementedException (); throw new NotImplementedException ();
} }
[MonoTODO] [MonoTODO]
public static bool HasSource (this StackFrame stackFrame) public static bool HasSource (this StackFrame stackFrame)
{ {
if (stackFrame == null)
throw new ArgumentNullException (nameof (stackFrame));
throw new NotImplementedException (); throw new NotImplementedException ();
} }
} }

View File

@ -33,28 +33,36 @@ namespace System
{ {
public static class StringNormalizationExtensions public static class StringNormalizationExtensions
{ {
[MonoTODO]
public static bool IsNormalized(this string value) public static bool IsNormalized(this string value)
{ {
throw new NotImplementedException (); if (value == null)
throw new ArgumentNullException (nameof (value));
return value.IsNormalized ();
} }
[MonoTODO]
public static bool IsNormalized(this string value, NormalizationForm normalizationForm) public static bool IsNormalized(this string value, NormalizationForm normalizationForm)
{ {
throw new NotImplementedException (); if (value == null)
throw new ArgumentNullException (nameof (value));
return value.IsNormalized (normalizationForm);
} }
[MonoTODO]
public static String Normalize(this string value) public static String Normalize(this string value)
{ {
throw new NotImplementedException (); if (value == null)
throw new ArgumentNullException (nameof (value));
return value.Normalize ();
} }
[MonoTODO]
public static String Normalize(this string value, NormalizationForm normalizationForm) public static String Normalize(this string value, NormalizationForm normalizationForm)
{ {
throw new NotImplementedException (); if (value == null)
throw new ArgumentNullException (nameof (value));
return value.Normalize (normalizationForm);
} }
} }
} }

View File

@ -28,56 +28,74 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// //
using System.Security.AccessControl;
namespace System.IO namespace System.IO
{ {
public static partial class FileSystemAclExtensions public static class FileSystemAclExtensions
{ {
[MonoTODO] public static DirectorySecurity GetAccessControl(this DirectoryInfo directoryInfo)
public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo)
{ {
throw new NotImplementedException (); if (directoryInfo == null)
throw new ArgumentNullException (nameof (directoryInfo));
return directoryInfo.GetAccessControl ();
} }
[MonoTODO] public static DirectorySecurity GetAccessControl(this DirectoryInfo directoryInfo, AccessControlSections includeSections)
public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.AccessControlSections includeSections)
{ {
throw new NotImplementedException (); if (directoryInfo == null)
throw new ArgumentNullException (nameof (directoryInfo));
return directoryInfo.GetAccessControl (includeSections);
} }
[MonoTODO] public static FileSecurity GetAccessControl(this FileInfo fileInfo)
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo)
{ {
throw new NotImplementedException (); if (fileInfo == null)
throw new ArgumentNullException (nameof (fileInfo));
return fileInfo.GetAccessControl ();
} }
[MonoTODO] public static FileSecurity GetAccessControl(this FileInfo fileInfo, AccessControlSections includeSections)
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.AccessControlSections includeSections)
{ {
throw new NotImplementedException (); if (fileInfo == null)
throw new ArgumentNullException (nameof (fileInfo));
return fileInfo.GetAccessControl (includeSections);
} }
[MonoTODO] public static FileSecurity GetAccessControl(this FileStream fileStream)
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileStream fileStream)
{ {
throw new NotImplementedException (); if (fileStream == null)
throw new ArgumentNullException (nameof (fileStream));
return fileStream.GetAccessControl ();
} }
[MonoTODO] public static void SetAccessControl(this DirectoryInfo directoryInfo, DirectorySecurity directorySecurity)
public static void SetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.DirectorySecurity directorySecurity)
{ {
throw new NotImplementedException (); if (directoryInfo == null)
throw new ArgumentNullException (nameof (directoryInfo));
directoryInfo.SetAccessControl (directorySecurity);
} }
[MonoTODO] public static void SetAccessControl(this FileInfo fileInfo, FileSecurity fileSecurity)
public static void SetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.FileSecurity fileSecurity)
{ {
throw new NotImplementedException (); if (fileInfo == null)
throw new ArgumentNullException (nameof (fileInfo));
fileInfo.SetAccessControl (fileSecurity);
} }
[MonoTODO] public static void SetAccessControl(this FileStream fileStream, FileSecurity fileSecurity)
public static void SetAccessControl(this System.IO.FileStream fileStream, System.Security.AccessControl.FileSecurity fileSecurity)
{ {
throw new NotImplementedException (); if (fileStream == null)
throw new ArgumentNullException (nameof (fileStream));
fileStream.SetAccessControl (fileSecurity);
} }
} }
} }

View File

@ -28,12 +28,12 @@ namespace System.Net.Sockets
state: socket); state: socket);
} }
public static Task ConnectAsync(this Socket socket, EndPoint remoteEndPoint) public static Task ConnectAsync(this Socket socket, EndPoint remoteEP)
{ {
return Task.Factory.FromAsync( return Task.Factory.FromAsync(
(targetEndPoint, callback, state) => ((Socket)state).BeginConnect(targetEndPoint, callback, state), (targetEndPoint, callback, state) => ((Socket)state).BeginConnect(targetEndPoint, callback, state),
asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult), asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
remoteEndPoint, remoteEP,
state: socket); state: socket);
} }
@ -229,7 +229,7 @@ namespace System.Net.Sockets
this Socket socket, this Socket socket,
ArraySegment<byte> buffer, ArraySegment<byte> buffer,
SocketFlags socketFlags, SocketFlags socketFlags,
EndPoint remoteEndPoint) EndPoint remoteEP)
{ {
return Task<int>.Factory.FromAsync( return Task<int>.Factory.FromAsync(
(targetBuffer, flags, endPoint, callback, state) => ((Socket)state).BeginSendTo( (targetBuffer, flags, endPoint, callback, state) => ((Socket)state).BeginSendTo(
@ -243,7 +243,7 @@ namespace System.Net.Sockets
asyncResult => ((Socket)asyncResult.AsyncState).EndSendTo(asyncResult), asyncResult => ((Socket)asyncResult.AsyncState).EndSendTo(asyncResult),
buffer, buffer,
socketFlags, socketFlags,
remoteEndPoint, remoteEP,
state: socket); state: socket);
} }
} }

View File

@ -1,37 +0,0 @@
//
// Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Private.CoreLib.InteropServices.dll")]
[assembly: AssemblyDescription ("System.Private.CoreLib.InteropServices.dll")]
[assembly: AssemblyDefaultAlias ("System.Private.CoreLib.InteropServices.dll")]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]

View File

@ -1,23 +0,0 @@
MCS_BUILD_DIR = ../../../build
thisdir = class/Facades/System.Private.CoreLib.InteropServices
SUBDIRS =
include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Private.CoreLib.InteropServices.dll
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
include $(MCS_BUILD_DIR)/library.make

View File

@ -1,34 +0,0 @@
//
// Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CallingConvention))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DllImportAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.GCHandle))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.GCHandleType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.SafeHandle))]
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Internal.Reflection.Execution.PayForPlayExperience.MissingMetadataExceptionCreator))]
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.DependencyReductionTypeRemoved))]
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.PreInitializedAttribute))]
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.InteropExtensions))]
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.NativeCallableAttributes))]
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.RuntimeImportAttribute))]

View File

@ -30,7 +30,7 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")] [assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")] [assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")] [assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")] [assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")] [assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")] [assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)] [assembly: AssemblyDelaySign (true)]

View File

@ -30,7 +30,7 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")] [assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")] [assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")] [assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")] [assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")] [assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")] [assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)] [assembly: AssemblyDelaySign (true)]

View File

@ -30,7 +30,7 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")] [assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")] [assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")] [assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")] [assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")] [assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")] [assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)] [assembly: AssemblyDelaySign (true)]

View File

@ -15,199 +15,199 @@ namespace System.Reflection
{ {
public static class TypeExtensions public static class TypeExtensions
{ {
public static ConstructorInfo GetConstructor(Type type, Type[] types) public static ConstructorInfo GetConstructor(this Type type, Type[] types)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetConstructor(types); return type.GetConstructor(types);
} }
public static ConstructorInfo[] GetConstructors(Type type) public static ConstructorInfo[] GetConstructors(this Type type)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetConstructors(); return type.GetConstructors();
} }
public static ConstructorInfo[] GetConstructors(Type type, BindingFlags bindingAttr) public static ConstructorInfo[] GetConstructors(this Type type, BindingFlags bindingAttr)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetConstructors(bindingAttr); return type.GetConstructors(bindingAttr);
} }
public static MemberInfo[] GetDefaultMembers(Type type) public static MemberInfo[] GetDefaultMembers(this Type type)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetDefaultMembers(); return type.GetDefaultMembers();
} }
public static EventInfo GetEvent(Type type, string name) public static EventInfo GetEvent(this Type type, string name)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetEvent(name); return type.GetEvent(name);
} }
public static EventInfo GetEvent(Type type, string name, BindingFlags bindingAttr) public static EventInfo GetEvent(this Type type, string name, BindingFlags bindingAttr)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetEvent(name, bindingAttr); return type.GetEvent(name, bindingAttr);
} }
public static EventInfo[] GetEvents(Type type) public static EventInfo[] GetEvents(this Type type)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetEvents(); return type.GetEvents();
} }
public static EventInfo[] GetEvents(Type type, BindingFlags bindingAttr) public static EventInfo[] GetEvents(this Type type, BindingFlags bindingAttr)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetEvents(bindingAttr); return type.GetEvents(bindingAttr);
} }
public static FieldInfo GetField(Type type, string name) public static FieldInfo GetField(this Type type, string name)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetField(name); return type.GetField(name);
} }
public static FieldInfo GetField(Type type, string name, BindingFlags bindingAttr) public static FieldInfo GetField(this Type type, string name, BindingFlags bindingAttr)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetField(name, bindingAttr); return type.GetField(name, bindingAttr);
} }
public static FieldInfo[] GetFields(Type type) public static FieldInfo[] GetFields(this Type type)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetFields(); return type.GetFields();
} }
public static FieldInfo[] GetFields(Type type, BindingFlags bindingAttr) public static FieldInfo[] GetFields(this Type type, BindingFlags bindingAttr)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetFields(bindingAttr); return type.GetFields(bindingAttr);
} }
public static Type[] GetGenericArguments(Type type) public static Type[] GetGenericArguments(this Type type)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetGenericArguments(); return type.GetGenericArguments();
} }
public static Type[] GetInterfaces(Type type) public static Type[] GetInterfaces(this Type type)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetInterfaces(); return type.GetInterfaces();
} }
public static MemberInfo[] GetMember(Type type, string name) public static MemberInfo[] GetMember(this Type type, string name)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetMember(name); return type.GetMember(name);
} }
public static MemberInfo[] GetMember(Type type, string name, BindingFlags bindingAttr) public static MemberInfo[] GetMember(this Type type, string name, BindingFlags bindingAttr)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetMember(name, bindingAttr); return type.GetMember(name, bindingAttr);
} }
public static MemberInfo[] GetMembers(Type type) public static MemberInfo[] GetMembers(this Type type)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetMembers(); return type.GetMembers();
} }
public static MemberInfo[] GetMembers(Type type, BindingFlags bindingAttr) public static MemberInfo[] GetMembers(this Type type, BindingFlags bindingAttr)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetMembers(bindingAttr); return type.GetMembers(bindingAttr);
} }
public static MethodInfo GetMethod(Type type, string name) public static MethodInfo GetMethod(this Type type, string name)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetMethod(name); return type.GetMethod(name);
} }
public static MethodInfo GetMethod(Type type, string name, BindingFlags bindingAttr) public static MethodInfo GetMethod(this Type type, string name, BindingFlags bindingAttr)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetMethod(name, bindingAttr); return type.GetMethod(name, bindingAttr);
} }
public static MethodInfo GetMethod(Type type, string name, Type[] types) public static MethodInfo GetMethod(this Type type, string name, Type[] types)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetMethod(name, types); return type.GetMethod(name, types);
} }
public static MethodInfo[] GetMethods(Type type) public static MethodInfo[] GetMethods(this Type type)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetMethods(); return type.GetMethods();
} }
public static MethodInfo[] GetMethods(Type type, BindingFlags bindingAttr) public static MethodInfo[] GetMethods(this Type type, BindingFlags bindingAttr)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetMethods(bindingAttr); return type.GetMethods(bindingAttr);
} }
public static Type GetNestedType(Type type, string name, BindingFlags bindingAttr) public static Type GetNestedType(this Type type, string name, BindingFlags bindingAttr)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetNestedType(name, bindingAttr); return type.GetNestedType(name, bindingAttr);
} }
public static Type[] GetNestedTypes(Type type, BindingFlags bindingAttr) public static Type[] GetNestedTypes(this Type type, BindingFlags bindingAttr)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetNestedTypes(bindingAttr); return type.GetNestedTypes(bindingAttr);
} }
public static PropertyInfo[] GetProperties(Type type) public static PropertyInfo[] GetProperties(this Type type)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetProperties(); return type.GetProperties();
} }
public static PropertyInfo[] GetProperties(Type type, BindingFlags bindingAttr) public static PropertyInfo[] GetProperties(this Type type, BindingFlags bindingAttr)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetProperties(bindingAttr); return type.GetProperties(bindingAttr);
} }
public static PropertyInfo GetProperty(Type type, string name) public static PropertyInfo GetProperty(this Type type, string name)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetProperty(name); return type.GetProperty(name);
} }
public static PropertyInfo GetProperty(Type type, string name, BindingFlags bindingAttr) public static PropertyInfo GetProperty(this Type type, string name, BindingFlags bindingAttr)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetProperty(name, bindingAttr); return type.GetProperty(name, bindingAttr);
} }
public static PropertyInfo GetProperty(Type type, string name, Type returnType) public static PropertyInfo GetProperty(this Type type, string name, Type returnType)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetProperty(name, returnType); return type.GetProperty(name, returnType);
} }
public static PropertyInfo GetProperty(Type type, string name, Type returnType, Type[] types) public static PropertyInfo GetProperty(this Type type, string name, Type returnType, Type[] types)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.GetProperty(name, returnType, types); return type.GetProperty(name, returnType, types);
} }
public static bool IsAssignableFrom(Type type, Type c) public static bool IsAssignableFrom(this Type type, Type c)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.IsAssignableFrom(c); return type.IsAssignableFrom(c);
} }
public static bool IsInstanceOfType(Type type, object o) public static bool IsInstanceOfType(this Type type, object o)
{ {
Requires.NotNull(type, nameof(type)); Requires.NotNull(type, nameof(type));
return type.IsInstanceOfType(o); return type.IsInstanceOfType(o);
@ -216,19 +216,19 @@ namespace System.Reflection
public static class AssemblyExtensions public static class AssemblyExtensions
{ {
public static Type[] GetExportedTypes(Assembly assembly) public static Type[] GetExportedTypes(this Assembly assembly)
{ {
Requires.NotNull(assembly, nameof(assembly)); Requires.NotNull(assembly, nameof(assembly));
return assembly.GetExportedTypes(); return assembly.GetExportedTypes();
} }
public static Module[] GetModules(Assembly assembly) public static Module[] GetModules(this Assembly assembly)
{ {
Requires.NotNull(assembly, nameof(assembly)); Requires.NotNull(assembly, nameof(assembly));
return assembly.GetModules(); return assembly.GetModules();
} }
public static Type[] GetTypes(Assembly assembly) public static Type[] GetTypes(this Assembly assembly)
{ {
Requires.NotNull(assembly, nameof(assembly)); Requires.NotNull(assembly, nameof(assembly));
return assembly.GetTypes(); return assembly.GetTypes();
@ -237,37 +237,37 @@ namespace System.Reflection
public static class EventInfoExtensions public static class EventInfoExtensions
{ {
public static MethodInfo GetAddMethod(EventInfo eventInfo) public static MethodInfo GetAddMethod(this EventInfo eventInfo)
{ {
Requires.NotNull(eventInfo, nameof(eventInfo)); Requires.NotNull(eventInfo, nameof(eventInfo));
return eventInfo.GetAddMethod(); return eventInfo.GetAddMethod();
} }
public static MethodInfo GetAddMethod(EventInfo eventInfo, bool nonPublic) public static MethodInfo GetAddMethod(this EventInfo eventInfo, bool nonPublic)
{ {
Requires.NotNull(eventInfo, nameof(eventInfo)); Requires.NotNull(eventInfo, nameof(eventInfo));
return eventInfo.GetAddMethod(nonPublic); return eventInfo.GetAddMethod(nonPublic);
} }
public static MethodInfo GetRaiseMethod(EventInfo eventInfo) public static MethodInfo GetRaiseMethod(this EventInfo eventInfo)
{ {
Requires.NotNull(eventInfo, nameof(eventInfo)); Requires.NotNull(eventInfo, nameof(eventInfo));
return eventInfo.GetRaiseMethod(); return eventInfo.GetRaiseMethod();
} }
public static MethodInfo GetRaiseMethod(EventInfo eventInfo, bool nonPublic) public static MethodInfo GetRaiseMethod(this EventInfo eventInfo, bool nonPublic)
{ {
Requires.NotNull(eventInfo, nameof(eventInfo)); Requires.NotNull(eventInfo, nameof(eventInfo));
return eventInfo.GetRaiseMethod(nonPublic); return eventInfo.GetRaiseMethod(nonPublic);
} }
public static MethodInfo GetRemoveMethod(EventInfo eventInfo) public static MethodInfo GetRemoveMethod(this EventInfo eventInfo)
{ {
Requires.NotNull(eventInfo, nameof(eventInfo)); Requires.NotNull(eventInfo, nameof(eventInfo));
return eventInfo.GetRemoveMethod(); return eventInfo.GetRemoveMethod();
} }
public static MethodInfo GetRemoveMethod(EventInfo eventInfo, bool nonPublic) public static MethodInfo GetRemoveMethod(this EventInfo eventInfo, bool nonPublic)
{ {
Requires.NotNull(eventInfo, nameof(eventInfo)); Requires.NotNull(eventInfo, nameof(eventInfo));
return eventInfo.GetRemoveMethod(nonPublic); return eventInfo.GetRemoveMethod(nonPublic);
@ -337,7 +337,7 @@ namespace System.Reflection
public static class MethodInfoExtensions public static class MethodInfoExtensions
{ {
public static MethodInfo GetBaseDefinition(MethodInfo method) public static MethodInfo GetBaseDefinition(this MethodInfo method)
{ {
Requires.NotNull(method, nameof(method)); Requires.NotNull(method, nameof(method));
return method.GetBaseDefinition(); return method.GetBaseDefinition();
@ -361,37 +361,37 @@ namespace System.Reflection
public static class PropertyInfoExtensions public static class PropertyInfoExtensions
{ {
public static MethodInfo[] GetAccessors(PropertyInfo property) public static MethodInfo[] GetAccessors(this PropertyInfo property)
{ {
Requires.NotNull(property, nameof(property)); Requires.NotNull(property, nameof(property));
return property.GetAccessors(); return property.GetAccessors();
} }
public static MethodInfo[] GetAccessors(PropertyInfo property, bool nonPublic) public static MethodInfo[] GetAccessors(this PropertyInfo property, bool nonPublic)
{ {
Requires.NotNull(property, nameof(property)); Requires.NotNull(property, nameof(property));
return property.GetAccessors(nonPublic); return property.GetAccessors(nonPublic);
} }
public static MethodInfo GetGetMethod(PropertyInfo property) public static MethodInfo GetGetMethod(this PropertyInfo property)
{ {
Requires.NotNull(property, nameof(property)); Requires.NotNull(property, nameof(property));
return property.GetGetMethod(); return property.GetGetMethod();
} }
public static MethodInfo GetGetMethod(PropertyInfo property, bool nonPublic) public static MethodInfo GetGetMethod(this PropertyInfo property, bool nonPublic)
{ {
Requires.NotNull(property, nameof(property)); Requires.NotNull(property, nameof(property));
return property.GetGetMethod(nonPublic); return property.GetGetMethod(nonPublic);
} }
public static MethodInfo GetSetMethod(PropertyInfo property) public static MethodInfo GetSetMethod(this PropertyInfo property)
{ {
Requires.NotNull(property, nameof(property)); Requires.NotNull(property, nameof(property));
return property.GetSetMethod(); return property.GetSetMethod();
} }
public static MethodInfo GetSetMethod(PropertyInfo property, bool nonPublic) public static MethodInfo GetSetMethod(this PropertyInfo property, bool nonPublic)
{ {
Requires.NotNull(property, nameof(property)); Requires.NotNull(property, nameof(property));
return property.GetSetMethod(nonPublic); return property.GetSetMethod(nonPublic);

View File

@ -20,11 +20,9 @@
// THE SOFTWARE. // THE SOFTWARE.
// //
#if !FULL_AOT_RUNTIME
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComImportAttribute))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComImportAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DispatchWrapper))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DispatchWrapper))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ErrorWrapper))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ErrorWrapper))]
#endif
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DataMisalignedException))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DataMisalignedException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DllNotFoundException))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DllNotFoundException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Missing))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Missing))]

View File

@ -20,28 +20,30 @@
// THE SOFTWARE. // THE SOFTWARE.
// //
using System.Runtime.InteropServices;
namespace System.Security namespace System.Security
{ {
public static class SecureStringMarshal public static class SecureStringMarshal
{ {
public static IntPtr SecureStringToCoTaskMemAnsi (SecureString s) public static IntPtr SecureStringToCoTaskMemAnsi (SecureString s)
{ {
throw new NotImplementedException (); return Marshal.SecureStringToCoTaskMemAnsi (s);
} }
public static IntPtr SecureStringToCoTaskMemUnicode (SecureString s) public static IntPtr SecureStringToCoTaskMemUnicode (SecureString s)
{ {
throw new NotImplementedException (); return Marshal.SecureStringToCoTaskMemUnicode (s);
} }
public static IntPtr SecureStringToGlobalAllocAnsi (SecureString s) public static IntPtr SecureStringToGlobalAllocAnsi (SecureString s)
{ {
throw new NotImplementedException (); return Marshal.SecureStringToGlobalAllocAnsi (s);
} }
public static IntPtr SecureStringToGlobalAllocUnicode (SecureString s) public static IntPtr SecureStringToGlobalAllocUnicode (SecureString s)
{ {
throw new NotImplementedException (); return Marshal.SecureStringToGlobalAllocUnicode (s);
} }
} }
} }

View File

@ -37,208 +37,180 @@ namespace System.ServiceProcess
{ {
public class ServiceController : IDisposable public class ServiceController : IDisposable
{ {
[MonoTODO]
public bool CanPauseAndContinue public bool CanPauseAndContinue
{ {
get get
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
} }
[MonoTODO]
public bool CanShutdown public bool CanShutdown
{ {
get get
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
} }
[MonoTODO]
public bool CanStop public bool CanStop
{ {
get get
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
} }
[MonoTODO]
public ServiceController[] DependentServices public ServiceController[] DependentServices
{ {
get get
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
} }
[MonoTODO]
public string DisplayName public string DisplayName
{ {
get get
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
} }
[MonoTODO]
public string MachineName public string MachineName
{ {
get get
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
} }
[MonoTODO]
public SafeHandle ServiceHandle public SafeHandle ServiceHandle
{ {
get get
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
} }
[MonoTODO]
public string ServiceName public string ServiceName
{ {
get get
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
} }
[MonoTODO]
public ServiceController[] ServicesDependedOn public ServiceController[] ServicesDependedOn
{ {
get get
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
} }
[MonoTODO]
public ServiceType ServiceType public ServiceType ServiceType
{ {
get get
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
} }
[MonoTODO]
public ServiceStartMode StartType public ServiceStartMode StartType
{ {
get get
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
} }
[MonoTODO]
public ServiceControllerStatus Status public ServiceControllerStatus Status
{ {
get get
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
} }
[MonoTODO]
public ServiceController (string name) public ServiceController (string name)
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public ServiceController (string name, string machineName) public ServiceController (string name, string machineName)
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public void Continue () public void Continue ()
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public void Dispose () public void Dispose ()
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
protected virtual void Dispose (bool disposing) protected virtual void Dispose (bool disposing)
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public static ServiceController[] GetDevices () public static ServiceController[] GetDevices ()
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public static ServiceController[] GetDevices (string machineName) public static ServiceController[] GetDevices (string machineName)
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public static ServiceController[] GetServices () public static ServiceController[] GetServices ()
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public static ServiceController[] GetServices (string machineName) public static ServiceController[] GetServices (string machineName)
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public void Pause () public void Pause ()
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public void Refresh () public void Refresh ()
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public void Start () public void Start ()
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public void Start (string[] args) public void Start (string[] args)
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public void Stop () public void Stop ()
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public void WaitForStatus (ServiceControllerStatus desiredStatus) public void WaitForStatus (ServiceControllerStatus desiredStatus)
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public void WaitForStatus (ServiceControllerStatus desiredStatus, TimeSpan timeout) public void WaitForStatus (ServiceControllerStatus desiredStatus, TimeSpan timeout)
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
} }
} }

View File

@ -36,22 +36,19 @@ namespace System.ServiceProcess
{ {
public class TimeoutException : Exception public class TimeoutException : Exception
{ {
[MonoTODO]
public TimeoutException () public TimeoutException ()
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public TimeoutException (string message) public TimeoutException (string message)
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
[MonoTODO]
public TimeoutException (string message, Exception innerException) public TimeoutException (string message, Exception innerException)
{ {
throw new NotImplementedException (); throw new PlatformNotSupportedException ();
} }
} }
} }

View File

@ -36,40 +36,52 @@ namespace System.Threading
{ {
public static class ThreadingAclExtensions public static class ThreadingAclExtensions
{ {
[MonoTODO] public static EventWaitHandleSecurity GetAccessControl (this EventWaitHandle handle)
public static EventWaitHandleSecurity GetAccessControl (EventWaitHandle handle)
{ {
throw new NotImplementedException (); if (handle == null)
throw new ArgumentNullException (nameof (handle));
return handle.GetAccessControl ();
} }
[MonoTODO] public static void SetAccessControl (this EventWaitHandle handle, EventWaitHandleSecurity eventSecurity)
public static void SetAccessControl (EventWaitHandle handle, EventWaitHandleSecurity eventSecurity)
{ {
throw new NotImplementedException (); if (handle == null)
throw new ArgumentNullException (nameof (handle));
handle.SetAccessControl (eventSecurity);
} }
[MonoTODO] public static MutexSecurity GetAccessControl (this Mutex mutex)
public static MutexSecurity GetAccessControl (Mutex mutex)
{ {
throw new NotImplementedException (); if (mutex == null)
throw new ArgumentNullException (nameof (mutex));
return mutex.GetAccessControl ();
} }
[MonoTODO] public static void SetAccessControl (this Mutex mutex, MutexSecurity mutexSecurity)
public static void SetAccessControl (Mutex mutex, MutexSecurity mutexSecurity)
{ {
throw new NotImplementedException (); if (mutex == null)
throw new ArgumentNullException (nameof (mutex));
mutex.SetAccessControl (mutexSecurity);
} }
[MonoTODO] public static SemaphoreSecurity GetAccessControl (this Semaphore semaphore)
public static SemaphoreSecurity GetAccessControl (Semaphore semaphore)
{ {
throw new NotImplementedException (); if (semaphore == null)
throw new ArgumentNullException (nameof (semaphore));
return semaphore.GetAccessControl ();
} }
[MonoTODO] public static void SetAccessControl (this Semaphore semaphore, SemaphoreSecurity semaphoreSecurity)
public static void SetAccessControl (Semaphore semaphore, SemaphoreSecurity semaphoreSecurity)
{ {
throw new NotImplementedException (); if (semaphore == null)
throw new ArgumentNullException (nameof (semaphore));
semaphore.SetAccessControl (semaphoreSecurity);
} }
} }
} }

View File

@ -24,7 +24,7 @@ System.Security.Cryptography.Encryption.Aes System.Security.Cryptography.Encrypt
System.Security.Cryptography.Hashing.Algorithms System.Security.Cryptography.RSA System.Security.Cryptography.RandomNumberGenerator \ System.Security.Cryptography.Hashing.Algorithms System.Security.Cryptography.RSA System.Security.Cryptography.RandomNumberGenerator \
System.Security.Principal.Windows System.Threading.Thread System.Threading.ThreadPool \ System.Security.Principal.Windows System.Threading.Thread System.Threading.ThreadPool \
System.Xml.XPath System.Xml.XmlDocument System.Xml.Xsl.Primitives Microsoft.Win32.Registry.AccessControl System.Diagnostics.StackTrace System.Globalization.Extensions \ System.Xml.XPath System.Xml.XmlDocument System.Xml.Xsl.Primitives Microsoft.Win32.Registry.AccessControl System.Diagnostics.StackTrace System.Globalization.Extensions \
System.IO.FileSystem.AccessControl System.Private.CoreLib.InteropServices System.Reflection.TypeExtensions \ System.IO.FileSystem.AccessControl System.Reflection.TypeExtensions \
System.Security.SecureString System.Threading.AccessControl System.Threading.Overlapped System.Xml.XPath.XDocument \ System.Security.SecureString System.Threading.AccessControl System.Threading.Overlapped System.Xml.XPath.XDocument \
System.Security.Cryptography.Primitives System.Text.Encoding.CodePages System.IO.FileSystem.Watcher \ System.Security.Cryptography.Primitives System.Text.Encoding.CodePages System.IO.FileSystem.Watcher \
System.Security.Cryptography.ProtectedData System.ServiceProcess.ServiceController System.IO.Pipes System.Security.Cryptography.ProtectedData System.ServiceProcess.ServiceController System.IO.Pipes

View File

@ -38,6 +38,8 @@ using Mono.Data.Tds.Protocol;
using System; using System;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Collections; using System.Collections;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@ -1426,6 +1428,25 @@ namespace System.Data.SqlClient
throw new NotImplementedException (); throw new NotImplementedException ();
} }
override public Task<T> GetFieldValueAsync<T> (int i, CancellationToken cancellationToken)
{
return base.GetFieldValueAsync<T> (i, cancellationToken);
}
override public Stream GetStream (int i)
{
return base.GetStream (i);
}
override public TextReader GetTextReader (int i)
{
return base.GetTextReader (i);
}
override public Task<bool> IsDBNullAsync (int i, CancellationToken cancellationToken)
{
return base.IsDBNullAsync (i, cancellationToken);
}
#endregion // Methods #endregion // Methods
} }
} }

View File

@ -46,7 +46,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany (Consts.MonoCompany)] [assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)] [assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)] [assembly: AssemblyCopyright (Consts.MonoCopyright)]
[assembly: AssemblyVersion (Consts.FxVersion)] [assembly: AssemblyVersion ("4.0.0.0")]
[assembly: SatelliteContractVersion (Consts.FxVersion)] [assembly: SatelliteContractVersion (Consts.FxVersion)]
[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)] [assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
[assembly: AssemblyFileVersion (Consts.FxFileVersion)] [assembly: AssemblyFileVersion (Consts.FxFileVersion)]

View File

@ -45,15 +45,15 @@ namespace System.Security.Cryptography.Pkcs {
_params = new byte [0]; _params = new byte [0];
} }
public AlgorithmIdentifier (Oid algorithm) public AlgorithmIdentifier (Oid oid)
{ {
_oid = algorithm; _oid = oid;
_params = new byte [0]; _params = new byte [0];
} }
public AlgorithmIdentifier (Oid algorithm, int keyLength) public AlgorithmIdentifier (Oid oid, int keyLength)
{ {
_oid = algorithm; _oid = oid;
_length = keyLength; _length = keyLength;
_params = new byte [0]; _params = new byte [0];
} }

View File

@ -53,14 +53,14 @@ namespace System.Security.Cryptography.Pkcs {
{ {
} }
public ContentInfo (Oid oid, byte[] content) public ContentInfo (Oid contentType, byte[] content)
{ {
if (oid == null) if (contentType == null)
throw new ArgumentNullException ("oid"); throw new ArgumentNullException ("contentType");
if (content == null) if (content == null)
throw new ArgumentNullException ("content"); throw new ArgumentNullException ("content");
_oid = oid; _oid = contentType;
_content = content; _content = content;
} }

View File

@ -61,12 +61,12 @@ namespace System.Security.Cryptography.Pkcs {
_uattribs = new CryptographicAttributeObjectCollection (); _uattribs = new CryptographicAttributeObjectCollection ();
} }
public EnvelopedCms (ContentInfo content) : this () public EnvelopedCms (ContentInfo contentInfo) : this ()
{ {
if (content == null) if (contentInfo == null)
throw new ArgumentNullException ("content"); throw new ArgumentNullException ("contentInfo");
_content = content; _content = contentInfo;
} }
public EnvelopedCms (ContentInfo contentInfo, AlgorithmIdentifier encryptionAlgorithm) public EnvelopedCms (ContentInfo contentInfo, AlgorithmIdentifier encryptionAlgorithm)

View File

@ -45,9 +45,9 @@ namespace System.ServiceModel.Channels
return new DefaultAddressHeader (value); return new DefaultAddressHeader (value);
} }
public static AddressHeader CreateAddressHeader (object value, XmlObjectSerializer formatter) public static AddressHeader CreateAddressHeader (object value, XmlObjectSerializer serializer)
{ {
return new DefaultAddressHeader (value, formatter); return new DefaultAddressHeader (value, serializer);
} }
public static AddressHeader CreateAddressHeader (string name, string ns, object value) public static AddressHeader CreateAddressHeader (string name, string ns, object value)
@ -56,11 +56,11 @@ namespace System.ServiceModel.Channels
} }
public static AddressHeader CreateAddressHeader (string name, string ns, object value, public static AddressHeader CreateAddressHeader (string name, string ns, object value,
XmlObjectSerializer formatter) XmlObjectSerializer serializer)
{ {
if (formatter == null) if (serializer == null)
throw new ArgumentNullException ("formatter"); throw new ArgumentNullException ("serializer");
return new DefaultAddressHeader (name, ns, value, formatter); return new DefaultAddressHeader (name, ns, value, serializer);
} }
public override bool Equals (object obj) public override bool Equals (object obj)
@ -93,9 +93,9 @@ namespace System.ServiceModel.Channels
return GetValue<T> (new DataContractSerializer (typeof (T))); return GetValue<T> (new DataContractSerializer (typeof (T)));
} }
public T GetValue<T> (XmlObjectSerializer formatter) public T GetValue<T> (XmlObjectSerializer serializer)
{ {
return (T) formatter.ReadObject (GetAddressHeaderReader ()); return (T) serializer.ReadObject (GetAddressHeaderReader ());
} }
protected abstract void OnWriteAddressHeaderContents (XmlDictionaryWriter writer); protected abstract void OnWriteAddressHeaderContents (XmlDictionaryWriter writer);

View File

@ -47,8 +47,8 @@ namespace System.ServiceModel.Channels
{ {
} }
public AddressHeaderCollection (IEnumerable<AddressHeader> headers) public AddressHeaderCollection (IEnumerable<AddressHeader> addressHeaders)
: base (GetList (headers)) : base (GetList (addressHeaders))
{ {
} }

View File

@ -44,17 +44,17 @@ namespace System.ServiceModel.Channels
BindingElementCollection elements; // for internal use BindingElementCollection elements; // for internal use
public BindingContext (CustomBinding binding, public BindingContext (CustomBinding binding,
BindingParameterCollection parms) BindingParameterCollection parameters)
{ {
if (binding == null) if (binding == null)
throw new ArgumentNullException ("binding"); throw new ArgumentNullException ("binding");
if (parms == null) if (parameters == null)
throw new ArgumentNullException ("parms"); throw new ArgumentNullException ("parameters");
this.binding = binding; this.binding = binding;
parameters = new BindingParameterCollection (); this.parameters = new BindingParameterCollection ();
foreach (var item in parms) foreach (var item in parameters)
parameters.Add (item); this.parameters.Add (item);
this.elements = new BindingElementCollection (); this.elements = new BindingElementCollection ();
foreach (var item in binding.Elements) foreach (var item in binding.Elements)
this.elements.Add (item); this.elements.Add (item);

View File

@ -40,7 +40,7 @@ namespace System.ServiceModel.Channels
} }
[MonoTODO] [MonoTODO]
protected BindingElement (BindingElement other) protected BindingElement (BindingElement elementToBeCloned)
{ {
} }

View File

@ -38,14 +38,14 @@ namespace System.ServiceModel.Channels
{ {
} }
public BindingElementCollection (BindingElement [] bindings) public BindingElementCollection (BindingElement [] elements)
{ {
AddRange (bindings); AddRange (elements);
} }
public BindingElementCollection (IEnumerable<BindingElement> bindings) public BindingElementCollection (IEnumerable<BindingElement> elements)
{ {
foreach (BindingElement e in bindings) foreach (BindingElement e in elements)
Add (e); Add (e);
} }

View File

@ -39,9 +39,9 @@ namespace System.ServiceModel.Channels
{ {
ChannelManagerBase manager; ChannelManagerBase manager;
protected ChannelBase (ChannelManagerBase manager) protected ChannelBase (ChannelManagerBase channelManager)
{ {
this.manager = manager; this.manager = channelManager;
} }
protected internal override TimeSpan DefaultCloseTimeout { protected internal override TimeSpan DefaultCloseTimeout {

View File

@ -98,29 +98,29 @@ namespace System.ServiceModel.Channels
} }
public TChannel CreateChannel ( public TChannel CreateChannel (
EndpointAddress remoteAddress) EndpointAddress address)
{ {
if (remoteAddress == null) if (address == null)
throw new ArgumentNullException ("remoteAddress"); throw new ArgumentNullException ("address");
return CreateChannel (remoteAddress, remoteAddress.Uri); return CreateChannel (address, address.Uri);
} }
public TChannel CreateChannel ( public TChannel CreateChannel (
EndpointAddress remoteAddress, Uri via) EndpointAddress address, Uri via)
{ {
if (remoteAddress == null) if (address == null)
throw new ArgumentNullException ("remoteAddress"); throw new ArgumentNullException ("address");
if (via == null) if (via == null)
throw new ArgumentNullException ("via"); throw new ArgumentNullException ("via");
ValidateCreateChannel (); ValidateCreateChannel ();
var ch = OnCreateChannel (remoteAddress, via); var ch = OnCreateChannel (address, via);
channels.Add (ch); channels.Add (ch);
return ch; return ch;
} }
protected abstract TChannel OnCreateChannel ( protected abstract TChannel OnCreateChannel (
EndpointAddress remoteAddress, Uri via); EndpointAddress address, Uri via);
protected override void OnAbort () protected override void OnAbort ()
{ {

View File

@ -68,19 +68,19 @@ namespace System.ServiceModel.Channels
security = binding as ISecurityCapabilities; security = binding as ISecurityCapabilities;
} }
public CustomBinding (params BindingElement [] binding) public CustomBinding (params BindingElement [] bindingElementsInTopDownChannelStackOrder)
: this ("CustomBinding", default_ns, binding) : this ("CustomBinding", default_ns, bindingElementsInTopDownChannelStackOrder)
{ {
} }
public CustomBinding (IEnumerable<BindingElement> bindingElements) public CustomBinding (IEnumerable<BindingElement> bindingElementsInTopDownChannelStackOrder)
: this (bindingElements, "CustomBinding", default_ns) : this (bindingElementsInTopDownChannelStackOrder, "CustomBinding", default_ns)
{ {
} }
public CustomBinding (string name, string ns, public CustomBinding (string name, string ns,
params BindingElement [] binding) params BindingElement [] bindingElementsInTopDownChannelStackOrder)
: this (binding, name, ns) : this (bindingElementsInTopDownChannelStackOrder, name, ns)
{ {
} }

View File

@ -47,20 +47,20 @@ namespace System.ServiceModel.Channels
[MonoTODO] [MonoTODO]
protected abstract bool OnTryCreateException ( protected abstract bool OnTryCreateException (
Message message, MessageFault fault, out Exception error); Message message, MessageFault fault, out Exception exception);
[MonoTODO] [MonoTODO]
protected abstract bool OnTryCreateFaultMessage ( protected abstract bool OnTryCreateFaultMessage (
Exception error, out Message message); Exception exception, out Message message);
public bool TryCreateException (Message message, MessageFault fault, out Exception error) public bool TryCreateException (Message message, MessageFault fault, out Exception exception)
{ {
return OnTryCreateException (message, fault, out error); return OnTryCreateException (message, fault, out exception);
} }
public bool TryCreateFaultMessage (Exception error, out Message message) public bool TryCreateFaultMessage (Exception exception, out Message message)
{ {
return OnTryCreateFaultMessage (error, out message); return OnTryCreateFaultMessage (exception, out message);
} }
} }

View File

@ -67,28 +67,28 @@ namespace System.ServiceModel.Channels
} }
protected HttpTransportBindingElement ( protected HttpTransportBindingElement (
HttpTransportBindingElement other) HttpTransportBindingElement elementToBeCloned)
: base (other) : base (elementToBeCloned)
{ {
allow_cookies = other.allow_cookies; allow_cookies = elementToBeCloned.allow_cookies;
bypass_proxy_on_local = other.bypass_proxy_on_local; bypass_proxy_on_local = elementToBeCloned.bypass_proxy_on_local;
unsafe_ntlm_auth = other.unsafe_ntlm_auth; unsafe_ntlm_auth = elementToBeCloned.unsafe_ntlm_auth;
use_default_proxy = other.use_default_proxy; use_default_proxy = elementToBeCloned.use_default_proxy;
keep_alive_enabled = other.keep_alive_enabled; keep_alive_enabled = elementToBeCloned.keep_alive_enabled;
max_buffer_size = other.max_buffer_size; max_buffer_size = elementToBeCloned.max_buffer_size;
host_cmp_mode = other.host_cmp_mode; host_cmp_mode = elementToBeCloned.host_cmp_mode;
proxy_address = other.proxy_address; proxy_address = elementToBeCloned.proxy_address;
realm = other.realm; realm = elementToBeCloned.realm;
transfer_mode = other.transfer_mode; transfer_mode = elementToBeCloned.transfer_mode;
// FIXME: it does not look safe // FIXME: it does not look safe
timeouts = other.timeouts; timeouts = elementToBeCloned.timeouts;
auth_scheme = other.auth_scheme; auth_scheme = elementToBeCloned.auth_scheme;
proxy_auth_scheme = other.proxy_auth_scheme; proxy_auth_scheme = elementToBeCloned.proxy_auth_scheme;
DecompressionEnabled = other.DecompressionEnabled; DecompressionEnabled = elementToBeCloned.DecompressionEnabled;
LegacyExtendedProtectionPolicy = other.LegacyExtendedProtectionPolicy; LegacyExtendedProtectionPolicy = elementToBeCloned.LegacyExtendedProtectionPolicy;
ExtendedProtectionPolicy = other.ExtendedProtectionPolicy; ExtendedProtectionPolicy = elementToBeCloned.ExtendedProtectionPolicy;
cookie_manager = other.cookie_manager; cookie_manager = elementToBeCloned.cookie_manager;
} }
[DefaultValue (AuthenticationSchemes.Anonymous)] [DefaultValue (AuthenticationSchemes.Anonymous)]

View File

@ -47,10 +47,10 @@ namespace System.ServiceModel.Channels
} }
protected HttpsTransportBindingElement ( protected HttpsTransportBindingElement (
HttpsTransportBindingElement other) HttpsTransportBindingElement elementToBeCloned)
: base (other) : base (elementToBeCloned)
{ {
req_cli_cert = other.req_cli_cert; req_cli_cert = elementToBeCloned.req_cli_cert;
} }
public bool RequireClientCertificate { public bool RequireClientCertificate {

View File

@ -98,10 +98,10 @@ namespace System.ServiceModel.Channels
return OnGetBody<T> (GetReaderAtBodyContents ()); return OnGetBody<T> (GetReaderAtBodyContents ());
} }
public T GetBody<T> (XmlObjectSerializer xmlFormatter) public T GetBody<T> (XmlObjectSerializer serializer)
{ {
// FIXME: Somehow use OnGetBody() here as well? // FIXME: Somehow use OnGetBody() here as well?
return (T)xmlFormatter.ReadObject (GetReaderAtBodyContents ()); return (T)serializer.ReadObject (GetReaderAtBodyContents ());
} }
protected virtual T OnGetBody<T> (XmlDictionaryReader reader) protected virtual T OnGetBody<T> (XmlDictionaryReader reader)
@ -369,13 +369,13 @@ namespace System.ServiceModel.Channels
// 5) // 5)
public static Message CreateMessage (MessageVersion version, public static Message CreateMessage (MessageVersion version,
string action, object body, XmlObjectSerializer xmlFormatter) string action, object body, XmlObjectSerializer serializer)
{ {
return body == null ? return body == null ?
CreateMessage (version, action) : CreateMessage (version, action) :
CreateMessage ( CreateMessage (
version, action, version, action,
new XmlObjectSerializerBodyWriter (body, xmlFormatter)); new XmlObjectSerializerBodyWriter (body, serializer));
} }
// 6) // 6)

View File

@ -42,9 +42,9 @@ namespace System.ServiceModel.Channels
[MonoTODO] [MonoTODO]
public public
MessageEncodingBindingElement (MessageEncodingBindingElement source) MessageEncodingBindingElement (MessageEncodingBindingElement elementToBeCloned)
{ {
MessageVersion = source.MessageVersion; MessageVersion = elementToBeCloned.MessageVersion;
} }
public abstract MessageEncoderFactory public abstract MessageEncoderFactory
@ -52,11 +52,11 @@ namespace System.ServiceModel.Channels
public abstract MessageVersion MessageVersion { get; set; } public abstract MessageVersion MessageVersion { get; set; }
public override T GetProperty<T> (BindingContext ctx) public override T GetProperty<T> (BindingContext context)
{ {
if (typeof (T) == typeof (MessageVersion)) if (typeof (T) == typeof (MessageVersion))
return (T) (object) MessageVersion; return (T) (object) MessageVersion;
return ctx.GetInnerProperty<T> (); return context.GetInnerProperty<T> ();
} }
#if !NET_2_1 && !XAMMAC_4_5 #if !NET_2_1 && !XAMMAC_4_5

View File

@ -397,12 +397,12 @@ namespace System.ServiceModel.Channels
return GetDetail<T> (new DataContractSerializer (typeof (T))); return GetDetail<T> (new DataContractSerializer (typeof (T)));
} }
public T GetDetail<T> (XmlObjectSerializer formatter) public T GetDetail<T> (XmlObjectSerializer serializer)
{ {
if (!HasDetail) if (!HasDetail)
throw new InvalidOperationException ("This message does not have details."); throw new InvalidOperationException ("This message does not have details.");
return (T) formatter.ReadObject (GetReaderAtDetailContents ()); return (T) serializer.ReadObject (GetReaderAtDetailContents ());
} }
public XmlDictionaryReader GetReaderAtDetailContents () public XmlDictionaryReader GetReaderAtDetailContents ()

View File

@ -59,56 +59,56 @@ namespace System.ServiceModel.Channels
return CreateHeader (name, ns, value, default_must_understand); return CreateHeader (name, ns, value, default_must_understand);
} }
public static MessageHeader CreateHeader (string name, string ns, object value, bool must_understand) public static MessageHeader CreateHeader (string name, string ns, object value, bool mustUnderstand)
{ {
return CreateHeader (name, ns, value, must_understand, default_actor); return CreateHeader (name, ns, value, mustUnderstand, default_actor);
} }
public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer formatter) public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer serializer)
{ {
return CreateHeader (name, ns, value, formatter, default_must_understand, return CreateHeader (name, ns, value, serializer, default_must_understand,
default_actor, default_relay); default_actor, default_relay);
} }
public static MessageHeader CreateHeader (string name, string ns, object value, public static MessageHeader CreateHeader (string name, string ns, object value,
bool must_understand, string actor) bool mustUnderstand, string actor)
{ {
return CreateHeader (name, ns, value, must_understand, actor, default_relay); return CreateHeader (name, ns, value, mustUnderstand, actor, default_relay);
} }
public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer formatter, public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer serializer,
bool must_understand) bool mustUnderstand)
{ {
return CreateHeader (name, ns, value, formatter, must_understand, default_actor, default_relay); return CreateHeader (name, ns, value, serializer, mustUnderstand, default_actor, default_relay);
} }
public static MessageHeader CreateHeader (string name, string ns, object value, public static MessageHeader CreateHeader (string name, string ns, object value,
bool must_understand, string actor, bool relay) bool mustUnderstand, string actor, bool relay)
{ {
return CreateHeader (name, ns, value, new DataContractSerializer (value.GetType ()), return CreateHeader (name, ns, value, new DataContractSerializer (value.GetType ()),
must_understand, actor, relay); mustUnderstand, actor, relay);
} }
public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer formatter, public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer serializer,
bool must_understand, string actor) bool mustUnderstand, string actor)
{ {
return CreateHeader (name, ns, value, formatter, must_understand, actor, default_relay); return CreateHeader (name, ns, value, serializer, mustUnderstand, actor, default_relay);
} }
public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer formatter, public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer serializer,
bool must_understand, string actor, bool relay) bool mustUnderstand, string actor, bool relay)
{ {
// FIXME: how to get IsReferenceParameter ? // FIXME: how to get IsReferenceParameter ?
return new DefaultMessageHeader (name, ns, value, formatter, default_is_ref, must_understand, actor, relay); return new DefaultMessageHeader (name, ns, value, serializer, default_is_ref, mustUnderstand, actor, relay);
} }
public virtual bool IsMessageVersionSupported (MessageVersion version) public virtual bool IsMessageVersionSupported (MessageVersion messageVersion)
{ {
if (version.Envelope == EnvelopeVersion.Soap12) if (messageVersion.Envelope == EnvelopeVersion.Soap12)
if (Actor == EnvelopeVersion.Soap11.NextDestinationActorValue) if (Actor == EnvelopeVersion.Soap11.NextDestinationActorValue)
return false; return false;
if (version.Envelope == EnvelopeVersion.Soap11) if (messageVersion.Envelope == EnvelopeVersion.Soap11)
if (Actor == EnvelopeVersion.Soap12.NextDestinationActorValue || if (Actor == EnvelopeVersion.Soap12.NextDestinationActorValue ||
Actor == EnvelopeVersion.Soap12UltimateReceiver) Actor == EnvelopeVersion.Soap12UltimateReceiver)
return false; return false;
@ -117,9 +117,9 @@ namespace System.ServiceModel.Channels
return true; return true;
} }
protected abstract void OnWriteHeaderContents (XmlDictionaryWriter writer, MessageVersion version); protected abstract void OnWriteHeaderContents (XmlDictionaryWriter writer, MessageVersion messageVersion);
protected virtual void OnWriteStartHeader (XmlDictionaryWriter writer, MessageVersion version) protected virtual void OnWriteStartHeader (XmlDictionaryWriter writer, MessageVersion messageVersion)
{ {
var dic = Constants.SoapDictionary; var dic = Constants.SoapDictionary;
XmlDictionaryString name, ns; XmlDictionaryString name, ns;
@ -128,7 +128,7 @@ namespace System.ServiceModel.Channels
writer.WriteStartElement (prefix, name, ns); writer.WriteStartElement (prefix, name, ns);
else else
writer.WriteStartElement (prefix, this.Name, this.Namespace); writer.WriteStartElement (prefix, this.Name, this.Namespace);
WriteHeaderAttributes (writer, version); WriteHeaderAttributes (writer, messageVersion);
} }
public override string ToString () public override string ToString ()
@ -143,58 +143,58 @@ namespace System.ServiceModel.Channels
return sb.ToString (); return sb.ToString ();
} }
public void WriteHeader (XmlDictionaryWriter writer, MessageVersion version) public void WriteHeader (XmlDictionaryWriter writer, MessageVersion messageVersion)
{ {
if (writer == null) if (writer == null)
throw new ArgumentNullException ("writer is null."); throw new ArgumentNullException ("writer is null.");
if (version == null) if (messageVersion == null)
throw new ArgumentNullException ("version is null."); throw new ArgumentNullException ("messageVersion is null.");
if (version.Envelope == EnvelopeVersion.None) if (messageVersion.Envelope == EnvelopeVersion.None)
return; return;
WriteStartHeader (writer, version); WriteStartHeader (writer, messageVersion);
WriteHeaderContents (writer, version); WriteHeaderContents (writer, messageVersion);
writer.WriteEndElement (); writer.WriteEndElement ();
} }
public void WriteHeader (XmlWriter writer, MessageVersion version) public void WriteHeader (XmlWriter writer, MessageVersion messageVersion)
{ {
WriteHeader (XmlDictionaryWriter.CreateDictionaryWriter (writer), version); WriteHeader (XmlDictionaryWriter.CreateDictionaryWriter (writer), messageVersion);
} }
protected void WriteHeaderAttributes (XmlDictionaryWriter writer, MessageVersion version) protected void WriteHeaderAttributes (XmlDictionaryWriter writer, MessageVersion messageVersion)
{ {
var dic = Constants.SoapDictionary; var dic = Constants.SoapDictionary;
if (Id != null) if (Id != null)
writer.WriteAttributeString ("u", dic.Add ("Id"), dic.Add (Constants.WsuNamespace), Id); writer.WriteAttributeString ("u", dic.Add ("Id"), dic.Add (Constants.WsuNamespace), Id);
if (!String.IsNullOrEmpty (Actor)) { if (!String.IsNullOrEmpty (Actor)) {
if (version.Envelope == EnvelopeVersion.Soap11) if (messageVersion.Envelope == EnvelopeVersion.Soap11)
writer.WriteAttributeString ("s", dic.Add ("actor"), dic.Add (version.Envelope.Namespace), Actor); writer.WriteAttributeString ("s", dic.Add ("actor"), dic.Add (messageVersion.Envelope.Namespace), Actor);
if (version.Envelope == EnvelopeVersion.Soap12) if (messageVersion.Envelope == EnvelopeVersion.Soap12)
writer.WriteAttributeString ("s", dic.Add ("role"), dic.Add (version.Envelope.Namespace), Actor); writer.WriteAttributeString ("s", dic.Add ("role"), dic.Add (messageVersion.Envelope.Namespace), Actor);
} }
// mustUnderstand is the same across SOAP 1.1 and 1.2 // mustUnderstand is the same across SOAP 1.1 and 1.2
if (MustUnderstand == true) if (MustUnderstand == true)
writer.WriteAttributeString ("s", dic.Add ("mustUnderstand"), dic.Add (version.Envelope.Namespace), "1"); writer.WriteAttributeString ("s", dic.Add ("mustUnderstand"), dic.Add (messageVersion.Envelope.Namespace), "1");
// relay is only available on SOAP 1.2 // relay is only available on SOAP 1.2
if (Relay == true && version.Envelope == EnvelopeVersion.Soap12) if (Relay == true && messageVersion.Envelope == EnvelopeVersion.Soap12)
writer.WriteAttributeString ("s", dic.Add ("relay"), dic.Add (version.Envelope.Namespace), "true"); writer.WriteAttributeString ("s", dic.Add ("relay"), dic.Add (messageVersion.Envelope.Namespace), "true");
} }
public void WriteHeaderContents (XmlDictionaryWriter writer, MessageVersion version) public void WriteHeaderContents (XmlDictionaryWriter writer, MessageVersion messageVersion)
{ {
this.OnWriteHeaderContents (writer, version); this.OnWriteHeaderContents (writer, messageVersion);
} }
public void WriteStartHeader (XmlDictionaryWriter writer, MessageVersion version) public void WriteStartHeader (XmlDictionaryWriter writer, MessageVersion messageVersion)
{ {
this.OnWriteStartHeader (writer, version); this.OnWriteStartHeader (writer, messageVersion);
} }
public override string Actor { get { return default_actor; }} public override string Actor { get { return default_actor; }}

View File

@ -72,9 +72,9 @@ namespace System.ServiceModel.Channels
l.Add (header); l.Add (header);
} }
public void CopyHeaderFrom (Message m, int index) public void CopyHeaderFrom (Message message, int headerIndex)
{ {
CopyHeaderFrom (m.Headers, index); CopyHeaderFrom (message.Headers, headerIndex);
} }
public void Clear () public void Clear ()
@ -82,25 +82,25 @@ namespace System.ServiceModel.Channels
l.Clear (); l.Clear ();
} }
public void CopyHeaderFrom (MessageHeaders headers, int index) public void CopyHeaderFrom (MessageHeaders collection, int headerIndex)
{ {
l.Add (headers [index]); l.Add (collection [headerIndex]);
} }
public void CopyHeadersFrom (Message m) public void CopyHeadersFrom (Message message)
{ {
CopyHeadersFrom (m.Headers); CopyHeadersFrom (message.Headers);
} }
public void CopyHeadersFrom (MessageHeaders headers) public void CopyHeadersFrom (MessageHeaders collection)
{ {
foreach (MessageHeaderInfo h in headers) foreach (MessageHeaderInfo h in collection)
l.Add (h); l.Add (h);
} }
public void CopyTo (MessageHeaderInfo [] dst, int index) public void CopyTo (MessageHeaderInfo [] array, int index)
{ {
l.CopyTo (dst, index); l.CopyTo (array, index);
} }
public int FindHeader (string name, string ns) public int FindHeader (string name, string ns)
@ -203,11 +203,11 @@ namespace System.ServiceModel.Channels
return GetHeader<T> (idx, serializer); return GetHeader<T> (idx, serializer);
} }
public XmlDictionaryReader GetReaderAtHeader (int index) public XmlDictionaryReader GetReaderAtHeader (int headerIndex)
{ {
if (index >= l.Count) if (headerIndex >= l.Count)
throw new ArgumentOutOfRangeException (String.Format ("Index is out of range. Current header count is {0}", index)); throw new ArgumentOutOfRangeException (String.Format ("Index is out of range. Current header count is {0}", l.Count));
MessageHeader item = (MessageHeader) l [index]; MessageHeader item = (MessageHeader) l [headerIndex];
XmlReader reader = XmlReader reader =
item is MessageHeader.XmlMessageHeader ? item is MessageHeader.XmlMessageHeader ?
@ -231,9 +231,9 @@ namespace System.ServiceModel.Channels
throw new NotImplementedException (); throw new NotImplementedException ();
} }
public void Insert (int index, MessageHeader header) public void Insert (int headerIndex, MessageHeader header)
{ {
l.Insert (index, header); l.Insert (headerIndex, header);
} }
public void RemoveAll (string name, string ns) public void RemoveAll (string name, string ns)
@ -251,9 +251,9 @@ namespace System.ServiceModel.Channels
l.RemoveAt (l.Count - 1); l.RemoveAt (l.Count - 1);
} }
public void RemoveAt (int index) public void RemoveAt (int headerIndex)
{ {
l.RemoveAt (index); l.RemoveAt (headerIndex);
} }
IEnumerator IEnumerable.GetEnumerator () IEnumerator IEnumerable.GetEnumerator ()
@ -261,48 +261,48 @@ namespace System.ServiceModel.Channels
return ((IEnumerable) l).GetEnumerator (); return ((IEnumerable) l).GetEnumerator ();
} }
public void WriteHeader (int index, XmlDictionaryWriter writer) public void WriteHeader (int headerIndex, XmlDictionaryWriter writer)
{ {
if (version.Envelope == EnvelopeVersion.None) if (version.Envelope == EnvelopeVersion.None)
return; return;
WriteStartHeader (index, writer); WriteStartHeader (headerIndex, writer);
WriteHeaderContents (index, writer); WriteHeaderContents (headerIndex, writer);
writer.WriteEndElement (); writer.WriteEndElement ();
} }
public void WriteHeader (int index, XmlWriter writer) public void WriteHeader (int headerIndex, XmlWriter writer)
{ {
WriteHeader (index, XmlDictionaryWriter.CreateDictionaryWriter (writer)); WriteHeader (headerIndex, XmlDictionaryWriter.CreateDictionaryWriter (writer));
} }
public void WriteHeaderContents (int index, XmlDictionaryWriter writer) public void WriteHeaderContents (int headerIndex, XmlDictionaryWriter writer)
{ {
if (index > l.Count) if (headerIndex > l.Count)
throw new ArgumentOutOfRangeException ("There is no header at position " + index + "."); throw new ArgumentOutOfRangeException ("There is no header at position " + headerIndex + ".");
MessageHeader h = l [index] as MessageHeader; MessageHeader h = l [headerIndex] as MessageHeader;
h.WriteHeaderContents (writer, version); h.WriteHeaderContents (writer, version);
} }
public void WriteHeaderContents (int index, XmlWriter writer) public void WriteHeaderContents (int headerIndex, XmlWriter writer)
{ {
WriteHeaderContents (index, XmlDictionaryWriter.CreateDictionaryWriter (writer)); WriteHeaderContents (headerIndex, XmlDictionaryWriter.CreateDictionaryWriter (writer));
} }
public void WriteStartHeader (int index, XmlDictionaryWriter writer) public void WriteStartHeader (int headerIndex, XmlDictionaryWriter writer)
{ {
if (index > l.Count) if (headerIndex > l.Count)
throw new ArgumentOutOfRangeException ("There is no header at position " + index + "."); throw new ArgumentOutOfRangeException ("There is no header at position " + headerIndex + ".");
MessageHeader h = l [index] as MessageHeader; MessageHeader h = l [headerIndex] as MessageHeader;
h.WriteStartHeader (writer, version); h.WriteStartHeader (writer, version);
} }
public void WriteStartHeader (int index, XmlWriter writer) public void WriteStartHeader (int headerIndex, XmlWriter writer)
{ {
WriteStartHeader (index, XmlDictionaryWriter.CreateDictionaryWriter (writer)); WriteStartHeader (headerIndex, XmlDictionaryWriter.CreateDictionaryWriter (writer));
} }
public string Action { public string Action {

View File

@ -53,36 +53,36 @@ namespace System.ServiceModel.Channels {
this.addressing = addressing; this.addressing = addressing;
} }
public static MessageVersion CreateVersion (EnvelopeVersion envelope_version) public static MessageVersion CreateVersion (EnvelopeVersion envelopeVersion)
{ {
return CreateVersion (envelope_version, return CreateVersion (envelopeVersion,
AddressingVersion.WSAddressing10); AddressingVersion.WSAddressing10);
} }
public static MessageVersion CreateVersion (EnvelopeVersion envelope_version, public static MessageVersion CreateVersion (EnvelopeVersion envelopeVersion,
AddressingVersion addressing_version) AddressingVersion addressingVersion)
{ {
if (envelope_version == EnvelopeVersion.None && addressing_version == AddressingVersion.None) if (envelopeVersion == EnvelopeVersion.None && addressingVersion == AddressingVersion.None)
return None; return None;
if (envelope_version == EnvelopeVersion.Soap11 && addressing_version == AddressingVersion.None) if (envelopeVersion == EnvelopeVersion.Soap11 && addressingVersion == AddressingVersion.None)
return Soap11; return Soap11;
if (envelope_version == EnvelopeVersion.Soap12 && addressing_version == AddressingVersion.WSAddressing10) if (envelopeVersion == EnvelopeVersion.Soap12 && addressingVersion == AddressingVersion.WSAddressing10)
return Soap12WSAddressing10; return Soap12WSAddressing10;
if (envelope_version == EnvelopeVersion.Soap12 && addressing_version == AddressingVersion.None) if (envelopeVersion == EnvelopeVersion.Soap12 && addressingVersion == AddressingVersion.None)
return Soap12; return Soap12;
if (envelope_version == EnvelopeVersion.Soap11 && addressing_version == AddressingVersion.WSAddressing10) if (envelopeVersion == EnvelopeVersion.Soap11 && addressingVersion == AddressingVersion.WSAddressing10)
return Soap11WSAddressing10; return Soap11WSAddressing10;
if (envelope_version == EnvelopeVersion.Soap11 && addressing_version == AddressingVersion.WSAddressingAugust2004) if (envelopeVersion == EnvelopeVersion.Soap11 && addressingVersion == AddressingVersion.WSAddressingAugust2004)
return Soap11WSAddressingAugust2004; return Soap11WSAddressingAugust2004;
if (envelope_version == EnvelopeVersion.Soap12 && addressing_version == AddressingVersion.WSAddressingAugust2004) if (envelopeVersion == EnvelopeVersion.Soap12 && addressingVersion == AddressingVersion.WSAddressingAugust2004)
return Soap12WSAddressingAugust2004; return Soap12WSAddressingAugust2004;
throw new ArgumentException (string.Format ("EnvelopeVersion {0} cannot be used with AddressingVersion {1}", envelope_version, addressing_version)); throw new ArgumentException (string.Format ("EnvelopeVersion {0} cannot be used with AddressingVersion {1}", envelopeVersion, addressingVersion));
} }
public override bool Equals (object value) public override bool Equals (object obj)
{ {
MessageVersion other = value as MessageVersion; MessageVersion other = obj as MessageVersion;
if (other == null) if (other == null)
return false; return false;

View File

@ -531,29 +531,29 @@ namespace System.ServiceModel.Channels
#endif #endif
public static SecurityBindingElement public static SecurityBindingElement
CreateSecureConversationBindingElement (SecurityBindingElement binding) CreateSecureConversationBindingElement (SecurityBindingElement bootstrapSecurity)
{ {
return CreateSecureConversationBindingElement (binding, false); return CreateSecureConversationBindingElement (bootstrapSecurity, false);
} }
public static SecurityBindingElement public static SecurityBindingElement
CreateSecureConversationBindingElement ( CreateSecureConversationBindingElement (
SecurityBindingElement binding, bool requireCancellation) SecurityBindingElement bootstrapSecurity, bool requireCancellation)
{ {
return CreateSecureConversationBindingElement (binding, requireCancellation, null); return CreateSecureConversationBindingElement (bootstrapSecurity, requireCancellation, null);
} }
public static SecurityBindingElement public static SecurityBindingElement
CreateSecureConversationBindingElement ( CreateSecureConversationBindingElement (
SecurityBindingElement binding, bool requireCancellation, SecurityBindingElement bootstrapSecurity, bool requireCancellation,
ChannelProtectionRequirements protectionRequirements) ChannelProtectionRequirements bootstrapProtectionRequirements)
{ {
#if !NET_2_1 && !XAMMAC_4_5 #if !NET_2_1 && !XAMMAC_4_5
SymmetricSecurityBindingElement be = SymmetricSecurityBindingElement be =
new SymmetricSecurityBindingElement (); new SymmetricSecurityBindingElement ();
be.ProtectionTokenParameters = be.ProtectionTokenParameters =
new SecureConversationSecurityTokenParameters ( new SecureConversationSecurityTokenParameters (
binding, requireCancellation, protectionRequirements); bootstrapSecurity, requireCancellation, bootstrapProtectionRequirements);
return be; return be;
#else #else
throw new NotImplementedException (); throw new NotImplementedException ();

View File

@ -53,12 +53,12 @@ namespace System.ServiceModel.Channels
} }
protected TcpTransportBindingElement ( protected TcpTransportBindingElement (
TcpTransportBindingElement other) TcpTransportBindingElement elementToBeCloned)
: base (other) : base (elementToBeCloned)
{ {
listen_backlog = other.listen_backlog; listen_backlog = elementToBeCloned.listen_backlog;
port_sharing_enabled = other.port_sharing_enabled; port_sharing_enabled = elementToBeCloned.port_sharing_enabled;
pool.CopyPropertiesFrom (other.pool); pool.CopyPropertiesFrom (elementToBeCloned.pool);
} }
public TcpConnectionPoolSettings ConnectionPoolSettings { public TcpConnectionPoolSettings ConnectionPoolSettings {

View File

@ -48,12 +48,12 @@ namespace System.ServiceModel.Channels
} }
protected TransportBindingElement ( protected TransportBindingElement (
TransportBindingElement other) TransportBindingElement elementToBeCloned)
: base (other) : base (elementToBeCloned)
{ {
manual_addressing = other.manual_addressing; manual_addressing = elementToBeCloned.manual_addressing;
max_buffer_pool_size = other.max_buffer_pool_size; max_buffer_pool_size = elementToBeCloned.max_buffer_pool_size;
max_recv_message_size = other.max_recv_message_size; max_recv_message_size = elementToBeCloned.max_recv_message_size;
} }
public virtual bool ManualAddressing { public virtual bool ManualAddressing {

View File

@ -51,17 +51,17 @@ namespace System.ServiceModel.Description
} }
[MonoTODO] [MonoTODO]
protected ClientCredentials (ClientCredentials source) protected ClientCredentials (ClientCredentials other)
{ {
userpass = source.userpass.Clone (); userpass = other.userpass.Clone ();
digest = source.digest.Clone (); digest = other.digest.Clone ();
initiator = source.initiator.Clone (); initiator = other.initiator.Clone ();
recipient = source.recipient.Clone (); recipient = other.recipient.Clone ();
windows = source.windows.Clone (); windows = other.windows.Clone ();
#if !NET_2_1 #if !NET_2_1
issued_token = source.issued_token.Clone (); issued_token = other.issued_token.Clone ();
peer = source.peer.Clone (); peer = other.peer.Clone ();
support_interactive = source.support_interactive; support_interactive = other.support_interactive;
#endif #endif
} }
@ -159,10 +159,10 @@ namespace System.ServiceModel.Description
[MonoTODO] [MonoTODO]
public virtual void ApplyClientBehavior ( public virtual void ApplyClientBehavior (
ServiceEndpoint endpoint, ClientRuntime behavior) ServiceEndpoint serviceEndpoint, ClientRuntime behavior)
{ {
if (endpoint == null) if (serviceEndpoint == null)
throw new ArgumentNullException ("endpoint"); throw new ArgumentNullException ("serviceEndpoint");
if (behavior == null) if (behavior == null)
throw new ArgumentNullException ("behavior"); throw new ArgumentNullException ("behavior");

View File

@ -35,22 +35,22 @@ namespace System.ServiceModel.Description
public interface IContractBehavior public interface IContractBehavior
{ {
void AddBindingParameters ( void AddBindingParameters (
ContractDescription description, ContractDescription contractDescription,
ServiceEndpoint endpoint, ServiceEndpoint endpoint,
BindingParameterCollection parameters); BindingParameterCollection bindingParameters);
void ApplyClientBehavior ( void ApplyClientBehavior (
ContractDescription description, ContractDescription contractDescription,
ServiceEndpoint endpoint, ServiceEndpoint endpoint,
ClientRuntime proxy); ClientRuntime clientRuntime);
void ApplyDispatchBehavior ( void ApplyDispatchBehavior (
ContractDescription description, ContractDescription contractDescription,
ServiceEndpoint endpoint, ServiceEndpoint endpoint,
DispatchRuntime dispatch); DispatchRuntime dispatchRuntime);
void Validate ( void Validate (
ContractDescription description, ContractDescription contractDescription,
ServiceEndpoint endpoint); ServiceEndpoint endpoint);
} }
} }

View File

@ -34,11 +34,11 @@ namespace System.ServiceModel.Description
public interface IEndpointBehavior public interface IEndpointBehavior
{ {
void AddBindingParameters (ServiceEndpoint endpoint, void AddBindingParameters (ServiceEndpoint endpoint,
BindingParameterCollection parameters); BindingParameterCollection bindingParameters);
void ApplyDispatchBehavior (ServiceEndpoint serviceEndpoint, void ApplyDispatchBehavior (ServiceEndpoint endpoint,
EndpointDispatcher dispatcher); EndpointDispatcher endpointDispatcher);
void ApplyClientBehavior (ServiceEndpoint serviceEndpoint, void ApplyClientBehavior (ServiceEndpoint endpoint,
ClientRuntime behavior); ClientRuntime clientRuntime);
void Validate (ServiceEndpoint serviceEndpoint); void Validate (ServiceEndpoint endpoint);
} }
} }

View File

@ -34,18 +34,18 @@ namespace System.ServiceModel.Description
public interface IOperationBehavior public interface IOperationBehavior
{ {
void AddBindingParameters ( void AddBindingParameters (
OperationDescription description, OperationDescription operationDescription,
BindingParameterCollection parameters); BindingParameterCollection bindingParameters);
void ApplyDispatchBehavior ( void ApplyDispatchBehavior (
OperationDescription description, OperationDescription operationDescription,
DispatchOperation dispatch); DispatchOperation dispatchOperation);
void ApplyClientBehavior ( void ApplyClientBehavior (
OperationDescription description, OperationDescription operationDescription,
ClientOperation proxy); ClientOperation clientOperation);
void Validate ( void Validate (
OperationDescription description); OperationDescription operationDescription);
} }
} }

View File

@ -31,7 +31,7 @@ namespace System.ServiceModel.Dispatcher
{ {
public interface IClientMessageFormatter public interface IClientMessageFormatter
{ {
object DeserializeReply (Message message, object [] paremeters); object DeserializeReply (Message message, object [] parameters);
Message SerializeRequest (MessageVersion version, object [] inputs); Message SerializeRequest (MessageVersion messageVersion, object [] parameters);
} }
} }

View File

@ -31,7 +31,7 @@ namespace System.ServiceModel.Dispatcher
{ {
public interface IClientMessageInspector public interface IClientMessageInspector
{ {
void AfterReceiveReply (ref Message message, object correlationState); void AfterReceiveReply (ref Message reply, object correlationState);
object BeforeSendRequest (ref Message message, IClientChannel channel); object BeforeSendRequest (ref Message request, IClientChannel channel);
} }
} }

View File

@ -75,30 +75,30 @@ namespace System.ServiceModel.Security.Tokens
} }
public SecureConversationSecurityTokenParameters ( public SecureConversationSecurityTokenParameters (
SecurityBindingElement element) SecurityBindingElement bootstrapSecurityBindingElement)
: this (element, true) : this (bootstrapSecurityBindingElement, true)
{ {
} }
public SecureConversationSecurityTokenParameters ( public SecureConversationSecurityTokenParameters (
SecurityBindingElement element, SecurityBindingElement bootstrapSecurityBindingElement,
bool requireCancellation) bool requireCancellation)
: this (element, requireCancellation, null) : this (bootstrapSecurityBindingElement, requireCancellation, null)
{ {
} }
#if !MOBILE && !XAMMAC_4_5 #if !MOBILE && !XAMMAC_4_5
public SecureConversationSecurityTokenParameters ( public SecureConversationSecurityTokenParameters (
SecurityBindingElement element, SecurityBindingElement bootstrapSecurityBindingElement,
bool requireCancellation, bool requireCancellation,
ChannelProtectionRequirements requirements) ChannelProtectionRequirements bootstrapProtectionRequirements)
{ {
this.element = element; this.element = bootstrapSecurityBindingElement;
this.cancellable = requireCancellation; this.cancellable = requireCancellation;
if (requirements == null) if (bootstrapProtectionRequirements == null)
this.requirements = new ChannelProtectionRequirements (default_channel_protection_requirements); this.requirements = new ChannelProtectionRequirements (default_channel_protection_requirements);
else else
this.requirements = new ChannelProtectionRequirements (requirements); this.requirements = new ChannelProtectionRequirements (bootstrapProtectionRequirements);
} }
#else #else
internal SecureConversationSecurityTokenParameters ( internal SecureConversationSecurityTokenParameters (

View File

@ -35,8 +35,8 @@ namespace System.ServiceModel
public class ActionNotSupportedException : CommunicationException public class ActionNotSupportedException : CommunicationException
{ {
public ActionNotSupportedException () : base () {} public ActionNotSupportedException () : base () {}
public ActionNotSupportedException (string msg) : base (msg) {} public ActionNotSupportedException (string message) : base (message) {}
public ActionNotSupportedException (string msg, Exception inner) : base (msg, inner) {} public ActionNotSupportedException (string message, Exception innerException) : base (message, innerException) {}
protected ActionNotSupportedException (SerializationInfo info, StreamingContext context) : protected ActionNotSupportedException (SerializationInfo info, StreamingContext context) :
base (info, context) {} base (info, context) {}
} }

View File

@ -85,9 +85,9 @@ namespace System.ServiceModel
get { return Endpoint.Binding.OpenTimeout; } get { return Endpoint.Binding.OpenTimeout; }
} }
protected virtual void ApplyConfiguration (string endpointConfig) protected virtual void ApplyConfiguration (string configurationName)
{ {
if (endpointConfig == null) if (configurationName == null)
return; return;
#if NET_2_1 || XAMMAC_4_5 #if NET_2_1 || XAMMAC_4_5
@ -96,22 +96,22 @@ namespace System.ServiceModel
var cfg = new SilverlightClientConfigLoader ().Load (XmlReader.Create ("ServiceReferences.ClientConfig")); var cfg = new SilverlightClientConfigLoader ().Load (XmlReader.Create ("ServiceReferences.ClientConfig"));
SilverlightClientConfigLoader.ServiceEndpointConfiguration se = null; SilverlightClientConfigLoader.ServiceEndpointConfiguration se = null;
if (endpointConfig == "*") if (configurationName == "*")
se = cfg.GetServiceEndpointConfiguration (Endpoint.Contract.Name); se = cfg.GetServiceEndpointConfiguration (Endpoint.Contract.Name);
if (se == null) if (se == null)
se = cfg.GetServiceEndpointConfiguration (endpointConfig); se = cfg.GetServiceEndpointConfiguration (configurationName);
if (se.Binding != null && Endpoint.Binding == null) if (se.Binding != null && Endpoint.Binding == null)
Endpoint.Binding = se.Binding; Endpoint.Binding = se.Binding;
else // ignore it else // ignore it
Console.WriteLine ("WARNING: Configured binding not found in configuration {0}", endpointConfig); Console.WriteLine ("WARNING: Configured binding not found in configuration {0}", configurationName);
if (se.Address != null && Endpoint.Address == null) if (se.Address != null && Endpoint.Address == null)
Endpoint.Address = se.Address; Endpoint.Address = se.Address;
else // ignore it else // ignore it
Console.WriteLine ("WARNING: Configured endpoint address not found in configuration {0}", endpointConfig); Console.WriteLine ("WARNING: Configured endpoint address not found in configuration {0}", configurationName);
} catch (Exception) { } catch (Exception) {
// ignore it. // ignore it.
Console.WriteLine ("WARNING: failed to load endpoint configuration for {0}", endpointConfig); Console.WriteLine ("WARNING: failed to load endpoint configuration for {0}", configurationName);
} }
#else #else
@ -120,7 +120,7 @@ namespace System.ServiceModel
ChannelEndpointElement endpoint = null; ChannelEndpointElement endpoint = null;
foreach (ChannelEndpointElement el in client.Endpoints) { foreach (ChannelEndpointElement el in client.Endpoints) {
if (el.Contract == contractName && (endpointConfig == el.Name || endpointConfig == "*")) { if (el.Contract == contractName && (configurationName == el.Name || configurationName == "*")) {
if (endpoint != null) if (endpoint != null)
throw new InvalidOperationException (String.Format ("More then one endpoint matching contract {0} was found.", contractName)); throw new InvalidOperationException (String.Format ("More then one endpoint matching contract {0} was found.", contractName));
endpoint = el; endpoint = el;
@ -128,7 +128,7 @@ namespace System.ServiceModel
} }
if (endpoint == null) if (endpoint == null)
throw new InvalidOperationException (String.Format ("Client endpoint configuration '{0}' was not found in {1} endpoints.", endpointConfig, client.Endpoints.Count)); throw new InvalidOperationException (String.Format ("Client endpoint configuration '{0}' was not found in {1} endpoints.", configurationName, client.Endpoints.Count));
var binding = String.IsNullOrEmpty (endpoint.Binding) ? null : ConfigUtil.CreateBinding (endpoint.Binding, endpoint.BindingConfiguration); var binding = String.IsNullOrEmpty (endpoint.Binding) ? null : ConfigUtil.CreateBinding (endpoint.Binding, endpoint.BindingConfiguration);
var contractType = ConfigUtil.GetTypeFromConfigString (endpoint.Contract, NamedConfigCategory.Contract); var contractType = ConfigUtil.GetTypeFromConfigString (endpoint.Contract, NamedConfigCategory.Contract);
@ -298,23 +298,23 @@ namespace System.ServiceModel
} }
protected void InitializeEndpoint ( protected void InitializeEndpoint (
string endpointConfigurationName, string configurationName,
EndpointAddress remoteAddress) EndpointAddress remoteAddress)
{ {
InitializeEndpoint (CreateDescription ()); InitializeEndpoint (CreateDescription ());
if (remoteAddress != null) if (remoteAddress != null)
service_endpoint.Address = remoteAddress; service_endpoint.Address = remoteAddress;
ApplyConfiguration (endpointConfigurationName); ApplyConfiguration (configurationName);
} }
protected void InitializeEndpoint (Binding binding, protected void InitializeEndpoint (Binding binding,
EndpointAddress remoteAddress) EndpointAddress address)
{ {
InitializeEndpoint (CreateDescription ()); InitializeEndpoint (CreateDescription ());
if (binding != null) if (binding != null)
service_endpoint.Binding = binding; service_endpoint.Binding = binding;
if (remoteAddress != null) if (address != null)
service_endpoint.Address = remoteAddress; service_endpoint.Address = address;
} }
protected void InitializeEndpoint (ServiceEndpoint endpoint) protected void InitializeEndpoint (ServiceEndpoint endpoint)

View File

@ -46,12 +46,12 @@ namespace System.ServiceModel
{ {
} }
protected ChannelFactory (Type type) protected ChannelFactory (Type channelType)
{ {
if (type == null) if (channelType == null)
throw new ArgumentNullException ("type"); throw new ArgumentNullException ("channelType");
if (!type.IsInterface) if (!channelType.IsInterface)
throw new InvalidOperationException ("The type argument to the generic ChannelFactory constructor must be an interface type."); throw new InvalidOperationException ("The channelType argument to the generic ChannelFactory constructor must be an interface type.");
InitializeEndpoint (CreateDescription ()); InitializeEndpoint (CreateDescription ());
} }

View File

@ -34,8 +34,8 @@ namespace System.ServiceModel {
public class CommunicationException : SystemException public class CommunicationException : SystemException
{ {
public CommunicationException () : base () {} public CommunicationException () : base () {}
public CommunicationException (string msg) : base (msg) {} public CommunicationException (string message) : base (message) {}
public CommunicationException (string msg, Exception inner) : base (msg, inner) {} public CommunicationException (string message, Exception innerException) : base (message, innerException) {}
protected CommunicationException (SerializationInfo info, StreamingContext context) protected CommunicationException (SerializationInfo info, StreamingContext context)
: base (info, context) {} : base (info, context) {}
} }

View File

@ -34,9 +34,9 @@ namespace System.ServiceModel {
public class CommunicationObjectAbortedException : CommunicationException public class CommunicationObjectAbortedException : CommunicationException
{ {
public CommunicationObjectAbortedException () : base () {} public CommunicationObjectAbortedException () : base () {}
public CommunicationObjectAbortedException (string msg) : base (msg) {} public CommunicationObjectAbortedException (string message) : base (message) {}
public CommunicationObjectAbortedException (string msg, Exception inner) public CommunicationObjectAbortedException (string message, Exception innerException)
: base (msg, inner) {} : base (message, innerException) {}
protected CommunicationObjectAbortedException (SerializationInfo info, protected CommunicationObjectAbortedException (SerializationInfo info,
StreamingContext context) StreamingContext context)
: base (info, context) {} : base (info, context) {}

View File

@ -34,9 +34,9 @@ namespace System.ServiceModel {
public class CommunicationObjectFaultedException : CommunicationException public class CommunicationObjectFaultedException : CommunicationException
{ {
public CommunicationObjectFaultedException () : base () {} public CommunicationObjectFaultedException () : base () {}
public CommunicationObjectFaultedException (string msg) : base (msg) {} public CommunicationObjectFaultedException (string message) : base (message) {}
public CommunicationObjectFaultedException (string msg, Exception inner) public CommunicationObjectFaultedException (string message, Exception innerException)
: base (msg, inner) {} : base (message, innerException) {}
protected CommunicationObjectFaultedException (SerializationInfo info, StreamingContext context) protected CommunicationObjectFaultedException (SerializationInfo info, StreamingContext context)
: base (info, context) {} : base (info, context) {}
} }

View File

@ -45,12 +45,12 @@ namespace System.ServiceModel
Initialize (identity); Initialize (identity);
} }
public DnsEndpointIdentity (string dns) public DnsEndpointIdentity (string dnsName)
: this (Claim.CreateDnsClaim (dns)) : this (Claim.CreateDnsClaim (dnsName))
{ {
} }
#else #else
public DnsEndpointIdentity (string dns) public DnsEndpointIdentity (string dnsName)
{ {
throw new NotImplementedException (); throw new NotImplementedException ();
} }

View File

@ -34,71 +34,71 @@ namespace System.ServiceModel
{ {
public class DuplexClientBase<TChannel> : ClientBase<TChannel> where TChannel : class public class DuplexClientBase<TChannel> : ClientBase<TChannel> where TChannel : class
{ {
protected DuplexClientBase (object instance) protected DuplexClientBase (object callbackInstance)
: this (new InstanceContext (instance), (Binding) null, null) : this (new InstanceContext (callbackInstance), (Binding) null, null)
{ {
} }
protected DuplexClientBase (object instance, protected DuplexClientBase (object callbackInstance,
Binding binding, EndpointAddress address) Binding binding, EndpointAddress remoteAddress)
: this (new InstanceContext (instance), binding, address) : this (new InstanceContext (callbackInstance), binding, remoteAddress)
{ {
} }
protected DuplexClientBase (object instance, protected DuplexClientBase (object callbackInstance,
string configurationName) string endpointConfigurationName)
: this (new InstanceContext (instance), configurationName) : this (new InstanceContext (callbackInstance), endpointConfigurationName)
{ {
} }
protected DuplexClientBase (object instance, protected DuplexClientBase (object callbackInstance,
string bindingConfigurationName, EndpointAddress address) string bindingConfigurationName, EndpointAddress remoteAddress)
: this (new InstanceContext (instance), bindingConfigurationName, address) : this (new InstanceContext (callbackInstance), bindingConfigurationName, remoteAddress)
{ {
} }
protected DuplexClientBase (object instance, protected DuplexClientBase (object callbackInstance,
string endpointConfigurationName, string remoteAddress) string endpointConfigurationName, string remoteAddress)
: this (new InstanceContext (instance), endpointConfigurationName, remoteAddress) : this (new InstanceContext (callbackInstance), endpointConfigurationName, remoteAddress)
{ {
} }
protected DuplexClientBase (InstanceContext instance) protected DuplexClientBase (InstanceContext callbackInstance)
: base (instance) : base (callbackInstance)
{ {
} }
protected DuplexClientBase (InstanceContext instance, protected DuplexClientBase (InstanceContext callbackInstance,
Binding binding, EndpointAddress address) Binding binding, EndpointAddress remoteAddress)
: base (instance, binding, address) : base (callbackInstance, binding, remoteAddress)
{ {
} }
protected DuplexClientBase (InstanceContext instance, protected DuplexClientBase (InstanceContext callbackInstance,
string configurationName) string endpointConfigurationName)
: base (instance, configurationName) : base (callbackInstance, endpointConfigurationName)
{ {
} }
protected DuplexClientBase (InstanceContext instance, protected DuplexClientBase (InstanceContext callbackInstance,
string endpointConfigurationName, string remoteAddress) string endpointConfigurationName, string remoteAddress)
: base (instance, endpointConfigurationName, remoteAddress) : base (callbackInstance, endpointConfigurationName, remoteAddress)
{ {
} }
protected DuplexClientBase (InstanceContext instance, protected DuplexClientBase (InstanceContext callbackInstance,
string configurationName, EndpointAddress address) string endpointConfigurationName, EndpointAddress address)
: base (instance, configurationName, address) : base (callbackInstance, endpointConfigurationName, address)
{ {
} }
protected DuplexClientBase (object instance, ServiceEndpoint endpoint) protected DuplexClientBase (object callbackInstance, ServiceEndpoint endpoint)
: this (new InstanceContext (instance), endpoint) : this (new InstanceContext (callbackInstance), endpoint)
{ {
} }
protected DuplexClientBase (InstanceContext instance, ServiceEndpoint endpoint) protected DuplexClientBase (InstanceContext callbackInstance, ServiceEndpoint endpoint)
: base (instance, endpoint) : base (callbackInstance, endpoint)
{ {
} }

View File

@ -70,11 +70,11 @@ namespace System.ServiceModel
{ {
} }
public EndpointAddress (Uri uri, params AddressHeader [] headers) public EndpointAddress (Uri uri, params AddressHeader [] addressHeaders)
: this (uri, null, new AddressHeaderCollection (headers), null, null) {} : this (uri, null, new AddressHeaderCollection (addressHeaders), null, null) {}
public EndpointAddress (Uri uri, EndpointIdentity identity, params AddressHeader [] headers) public EndpointAddress (Uri uri, EndpointIdentity identity, params AddressHeader [] addressHeaders)
: this (uri, identity, new AddressHeaderCollection (headers), null, null) {} : this (uri, identity, new AddressHeaderCollection (addressHeaders), null, null) {}
public EndpointAddress (Uri uri, EndpointIdentity identity, AddressHeaderCollection headers) public EndpointAddress (Uri uri, EndpointIdentity identity, AddressHeaderCollection headers)
: this (uri, identity, headers, null, null) {} : this (uri, identity, headers, null, null) {}

View File

@ -34,8 +34,8 @@ namespace System.ServiceModel {
public class EndpointNotFoundException : CommunicationException public class EndpointNotFoundException : CommunicationException
{ {
public EndpointNotFoundException () : base () {} public EndpointNotFoundException () : base () {}
public EndpointNotFoundException (string msg) : base (msg) {} public EndpointNotFoundException (string message) : base (message) {}
public EndpointNotFoundException (string msg, Exception inner) : base (msg, inner) {} public EndpointNotFoundException (string message, Exception innerException) : base (message, innerException) {}
protected EndpointNotFoundException (SerializationInfo info, StreamingContext context) : protected EndpointNotFoundException (SerializationInfo info, StreamingContext context) :
base (info, context) {} base (info, context) {}
} }

View File

@ -42,16 +42,16 @@ namespace System.ServiceModel
{ {
} }
public FaultCode (string name, FaultCode subcode) public FaultCode (string name, FaultCode subCode)
: this (name, String.Empty, subcode) : this (name, String.Empty, subCode)
{ {
} }
public FaultCode (string name, string ns, FaultCode subcode) public FaultCode (string name, string ns, FaultCode subCode)
{ {
this.name = name; this.name = name;
this.ns = ns; this.ns = ns;
this.subcode = subcode; this.subcode = subCode;
} }
public bool IsPredefinedFault { public bool IsPredefinedFault {
@ -78,9 +78,9 @@ namespace System.ServiceModel
get { return subcode; } get { return subcode; }
} }
public static FaultCode CreateReceiverFaultCode (FaultCode subcode) public static FaultCode CreateReceiverFaultCode (FaultCode subCode)
{ {
return new FaultCode ("Receiver", subcode); return new FaultCode ("Receiver", subCode);
} }
public static FaultCode CreateReceiverFaultCode (string name, string ns) public static FaultCode CreateReceiverFaultCode (string name, string ns)
@ -88,9 +88,9 @@ namespace System.ServiceModel
return CreateReceiverFaultCode (new FaultCode (name, ns)); return CreateReceiverFaultCode (new FaultCode (name, ns));
} }
public static FaultCode CreateSenderFaultCode (FaultCode subcode) public static FaultCode CreateSenderFaultCode (FaultCode subCode)
{ {
return new FaultCode ("Sender", subcode); return new FaultCode ("Sender", subCode);
} }
public static FaultCode CreateSenderFaultCode (string name, string ns) public static FaultCode CreateSenderFaultCode (string name, string ns)

View File

@ -100,7 +100,7 @@ namespace System.ServiceModel
} }
[MonoTODO] [MonoTODO]
public static FaultException CreateFault (MessageFault fault, params Type [] details) public static FaultException CreateFault (MessageFault messageFault, params Type [] faultDetailTypes)
{ {
throw new NotImplementedException (); throw new NotImplementedException ();
} }

View File

@ -34,8 +34,8 @@ namespace System.ServiceModel {
public class InvalidMessageContractException : SystemException public class InvalidMessageContractException : SystemException
{ {
public InvalidMessageContractException () : base () {} public InvalidMessageContractException () : base () {}
public InvalidMessageContractException (string msg) : base (msg) {} public InvalidMessageContractException (string message) : base (message) {}
public InvalidMessageContractException (string msg, Exception inner) : base (msg, inner) {} public InvalidMessageContractException (string message, Exception innerException) : base (message, innerException) {}
protected InvalidMessageContractException (SerializationInfo info, StreamingContext context) : protected InvalidMessageContractException (SerializationInfo info, StreamingContext context) :
base (info, context) {} base (info, context) {}
} }

View File

@ -35,8 +35,8 @@ namespace System.ServiceModel {
public class MessageHeaderException : ProtocolException public class MessageHeaderException : ProtocolException
{ {
public MessageHeaderException () : this ("Message header exception") {} public MessageHeaderException () : this ("Message header exception") {}
public MessageHeaderException (string msg) : this (msg, null) {} public MessageHeaderException (string message) : this (message, null) {}
public MessageHeaderException (string msg, Exception inner) : base (msg, inner) {} public MessageHeaderException (string message, Exception innerException) : base (message, innerException) {}
protected MessageHeaderException (SerializationInfo info, StreamingContext context) : protected MessageHeaderException (SerializationInfo info, StreamingContext context) :
base (info, context) base (info, context)
{ {

View File

@ -53,10 +53,10 @@ namespace System.ServiceModel
{ {
} }
public MessageHeader (T content, bool must_understand, string actor, bool relay) public MessageHeader (T content, bool mustUnderstand, string actor, bool relay)
{ {
this.content = content; this.content = content;
this.must_understand = must_understand; this.must_understand = mustUnderstand;
this.actor = actor; this.actor = actor;
this.relay = relay; this.relay = relay;
} }

View File

@ -34,9 +34,9 @@ namespace System.ServiceModel {
public class ProtocolException : CommunicationException public class ProtocolException : CommunicationException
{ {
public ProtocolException () : base () {} public ProtocolException () : base () {}
public ProtocolException (string msg) : base (msg) {} public ProtocolException (string message) : base (message) {}
public ProtocolException (string msg, Exception inner) public ProtocolException (string message, Exception innerException)
: base (msg, inner) {} : base (message, innerException) {}
protected ProtocolException (SerializationInfo info, protected ProtocolException (SerializationInfo info,
StreamingContext context) StreamingContext context)
: base (info, context) {} : base (info, context) {}

View File

@ -34,9 +34,9 @@ namespace System.ServiceModel {
public class QuotaExceededException : SystemException public class QuotaExceededException : SystemException
{ {
public QuotaExceededException () : base () {} public QuotaExceededException () : base () {}
public QuotaExceededException (string msg) : base (msg) {} public QuotaExceededException (string message) : base (message) {}
public QuotaExceededException (string msg, Exception inner) public QuotaExceededException (string message, Exception innerException)
: base (msg, inner) {} : base (message, innerException) {}
protected QuotaExceededException (SerializationInfo info, protected QuotaExceededException (SerializationInfo info,
StreamingContext context) StreamingContext context)
: base (info, context) {} : base (info, context) {}

View File

@ -34,9 +34,9 @@ namespace System.ServiceModel {
public class ServerTooBusyException : CommunicationException public class ServerTooBusyException : CommunicationException
{ {
public ServerTooBusyException () : base () {} public ServerTooBusyException () : base () {}
public ServerTooBusyException (string msg) : base (msg) {} public ServerTooBusyException (string message) : base (message) {}
public ServerTooBusyException (string msg, Exception inner) public ServerTooBusyException (string message, Exception innerException)
: base (msg, inner) {} : base (message, innerException) {}
protected ServerTooBusyException (SerializationInfo info, protected ServerTooBusyException (SerializationInfo info,
StreamingContext context) StreamingContext context)
: base (info, context) {} : base (info, context) {}

View File

@ -34,9 +34,9 @@ namespace System.ServiceModel {
public class ServiceActivationException : CommunicationException public class ServiceActivationException : CommunicationException
{ {
public ServiceActivationException () : base () {} public ServiceActivationException () : base () {}
public ServiceActivationException (string msg) : base (msg) {} public ServiceActivationException (string message) : base (message) {}
public ServiceActivationException (string msg, Exception inner) public ServiceActivationException (string message, Exception innerException)
: base (msg, inner) {} : base (message, innerException) {}
protected ServiceActivationException (SerializationInfo info, protected ServiceActivationException (SerializationInfo info,
StreamingContext context) StreamingContext context)
: base (info, context) {} : base (info, context) {}

View File

@ -45,12 +45,12 @@ namespace System.ServiceModel
Initialize (identity); Initialize (identity);
} }
public SpnEndpointIdentity (string spn) public SpnEndpointIdentity (string spnName)
: this (Claim.CreateSpnClaim (spn)) : this (Claim.CreateSpnClaim (spnName))
{ {
} }
#else #else
public SpnEndpointIdentity (string spn) public SpnEndpointIdentity (string spnName)
{ {
throw new NotImplementedException (); throw new NotImplementedException ();
} }

View File

@ -45,12 +45,12 @@ namespace System.ServiceModel
Initialize (identity); Initialize (identity);
} }
public UpnEndpointIdentity (string upn) public UpnEndpointIdentity (string upnName)
: this (Claim.CreateUpnClaim (upn)) : this (Claim.CreateUpnClaim (upnName))
{ {
} }
#else #else
public UpnEndpointIdentity (string upn) public UpnEndpointIdentity (string upnName)
{ {
throw new NotImplementedException (); throw new NotImplementedException ();
} }

View File

@ -52,13 +52,13 @@ namespace System.IO.Compression
bool disposed; bool disposed;
DeflateStreamNative native; DeflateStreamNative native;
public DeflateStream (Stream compressedStream, CompressionMode mode) : public DeflateStream (Stream stream, CompressionMode mode) :
this (compressedStream, mode, false, false) this (stream, mode, false, false)
{ {
} }
public DeflateStream (Stream compressedStream, CompressionMode mode, bool leaveOpen) : public DeflateStream (Stream stream, CompressionMode mode, bool leaveOpen) :
this (compressedStream, mode, leaveOpen, false) this (stream, mode, leaveOpen, false)
{ {
} }
@ -124,23 +124,23 @@ namespace System.IO.Compression
} }
} }
public override int Read (byte[] dest, int dest_offset, int count) public override int Read (byte[] array, int offset, int count)
{ {
if (disposed) if (disposed)
throw new ObjectDisposedException (GetType ().FullName); throw new ObjectDisposedException (GetType ().FullName);
if (dest == null) if (array == null)
throw new ArgumentNullException ("Destination array is null."); throw new ArgumentNullException ("Destination array is null.");
if (!CanRead) if (!CanRead)
throw new InvalidOperationException ("Stream does not support reading."); throw new InvalidOperationException ("Stream does not support reading.");
int len = dest.Length; int len = array.Length;
if (dest_offset < 0 || count < 0) if (offset < 0 || count < 0)
throw new ArgumentException ("Dest or count is negative."); throw new ArgumentException ("Dest or count is negative.");
if (dest_offset > len) if (offset > len)
throw new ArgumentException ("destination offset is beyond array size"); throw new ArgumentException ("destination offset is beyond array size");
if ((dest_offset + count) > len) if ((offset + count) > len)
throw new ArgumentException ("Reading would overrun buffer"); throw new ArgumentException ("Reading would overrun buffer");
return ReadInternal (dest, dest_offset, count); return ReadInternal (array, offset, count);
} }
unsafe void WriteInternal (byte[] array, int offset, int count) unsafe void WriteInternal (byte[] array, int offset, int count)
@ -154,16 +154,16 @@ namespace System.IO.Compression
} }
} }
public override void Write (byte[] src, int src_offset, int count) public override void Write (byte[] array, int offset, int count)
{ {
if (disposed) if (disposed)
throw new ObjectDisposedException (GetType ().FullName); throw new ObjectDisposedException (GetType ().FullName);
if (src == null) if (array == null)
throw new ArgumentNullException ("src"); throw new ArgumentNullException ("array");
if (src_offset < 0) if (offset < 0)
throw new ArgumentOutOfRangeException ("src_offset"); throw new ArgumentOutOfRangeException ("offset");
if (count < 0) if (count < 0)
throw new ArgumentOutOfRangeException ("count"); throw new ArgumentOutOfRangeException ("count");
@ -171,10 +171,10 @@ namespace System.IO.Compression
if (!CanWrite) if (!CanWrite)
throw new NotSupportedException ("Stream does not support writing"); throw new NotSupportedException ("Stream does not support writing");
if (src_offset > src.Length - count) if (offset > array.Length - count)
throw new ArgumentException ("Buffer too small. count/offset wrong."); throw new ArgumentException ("Buffer too small. count/offset wrong.");
WriteInternal (src, src_offset, count); WriteInternal (array, offset, count);
} }
public override void Flush () public override void Flush ()

View File

@ -70,21 +70,21 @@ namespace System.IO.Compression {
base.Dispose (disposing); base.Dispose (disposing);
} }
public override int Read (byte[] dest, int dest_offset, int count) public override int Read (byte[] array, int offset, int count)
{ {
if (deflateStream == null) if (deflateStream == null)
throw new ObjectDisposedException (GetType ().FullName); throw new ObjectDisposedException (GetType ().FullName);
return deflateStream.Read(dest, dest_offset, count); return deflateStream.Read(array, offset, count);
} }
public override void Write (byte[] src, int src_offset, int count) public override void Write (byte[] array, int offset, int count)
{ {
if (deflateStream == null) if (deflateStream == null)
throw new ObjectDisposedException (GetType ().FullName); throw new ObjectDisposedException (GetType ().FullName);
deflateStream.Write (src, src_offset, count); deflateStream.Write (array, offset, count);
} }
public override void Flush() public override void Flush()

View File

@ -1 +1 @@
f894f490612fc2b6ff9f185bd113be8941234c9b 3dd17d0c16ba42ad68b52821e4491c8eafe06c04

View File

@ -34,16 +34,16 @@ namespace System.Security.AccessControl {
public sealed class SemaphoreAccessRule : AccessRule public sealed class SemaphoreAccessRule : AccessRule
{ {
public SemaphoreAccessRule (IdentityReference identity, public SemaphoreAccessRule (IdentityReference identity,
SemaphoreRights semaphoreRights, SemaphoreRights eventRights,
AccessControlType type) AccessControlType type)
: base (identity, (int)semaphoreRights, false, InheritanceFlags.None, PropagationFlags.None, type) : base (identity, (int)eventRights, false, InheritanceFlags.None, PropagationFlags.None, type)
{ {
} }
public SemaphoreAccessRule (string identity, public SemaphoreAccessRule (string identity,
SemaphoreRights semaphoreRights, SemaphoreRights eventRights,
AccessControlType type) AccessControlType type)
: this (new NTAccount (identity), semaphoreRights, type) : this (new NTAccount (identity), eventRights, type)
{ {
} }

View File

@ -35,9 +35,9 @@ namespace System.Security.AccessControl {
: AuditRule : AuditRule
{ {
public SemaphoreAuditRule (IdentityReference identity, public SemaphoreAuditRule (IdentityReference identity,
SemaphoreRights semaphoreRights, SemaphoreRights eventRights,
AuditFlags flags) AuditFlags flags)
: base (identity, (int)semaphoreRights, false, InheritanceFlags.None, PropagationFlags.None, flags) : base (identity, (int)eventRights, false, InheritanceFlags.None, PropagationFlags.None, flags)
{ {
} }

View File

@ -94,14 +94,14 @@ namespace System.Security.Cryptography.X509Certificates {
// methods // methods
public override void CopyFrom (AsnEncodedData encodedData) public override void CopyFrom (AsnEncodedData asnEncodedData)
{ {
if (encodedData == null) if (asnEncodedData == null)
throw new ArgumentNullException ("encodedData"); throw new ArgumentNullException ("asnEncodedData");
X509Extension ex = (encodedData as X509Extension); X509Extension ex = (asnEncodedData as X509Extension);
if (ex == null) if (ex == null)
throw new ArgumentException (Locale.GetText ("Wrong type."), "encodedData"); throw new ArgumentException (Locale.GetText ("Wrong type."), "asnEncodedData");
if (ex._oid == null) if (ex._oid == null)
_oid = new Oid (oid, friendlyName); _oid = new Oid (oid, friendlyName);

View File

@ -159,14 +159,14 @@ namespace System.Security.Cryptography.X509Certificates {
// methods // methods
public override void CopyFrom (AsnEncodedData encodedData) public override void CopyFrom (AsnEncodedData asnEncodedData)
{ {
if (encodedData == null) if (asnEncodedData == null)
throw new ArgumentNullException ("encodedData"); throw new ArgumentNullException ("asnEncodedData");
X509Extension ex = (encodedData as X509Extension); X509Extension ex = (asnEncodedData as X509Extension);
if (ex == null) if (ex == null)
throw new ArgumentException (Locale.GetText ("Wrong type."), "encodedData"); throw new ArgumentException (Locale.GetText ("Wrong type."), "asnEncodedData");
if (ex._oid == null) if (ex._oid == null)
_oid = new Oid (oid, friendlyName); _oid = new Oid (oid, friendlyName);

View File

@ -37,10 +37,10 @@ using System;
using System.Security; using System.Security;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using System.Runtime.InteropServices.ComTypes;
using System.Runtime.ConstrainedExecution; using System.Runtime.ConstrainedExecution;
#if !FULL_AOT_RUNTIME #if !FULL_AOT_RUNTIME
using System.Runtime.InteropServices.ComTypes;
using Mono.Interop; using Mono.Interop;
#endif #endif
@ -197,9 +197,11 @@ namespace System.Runtime.InteropServices
return CreateAggregatedObject (pOuter, (object)o); return CreateAggregatedObject (pOuter, (object)o);
} }
#if !FULL_AOT_RUNTIME
public static object CreateWrapperOfType (object o, Type t) public static object CreateWrapperOfType (object o, Type t)
{ {
#if FULL_AOT_RUNTIME
throw new PlatformNotSupportedException ();
#else
__ComObject co = o as __ComObject; __ComObject co = o as __ComObject;
if (co == null) if (co == null)
throw new ArgumentException ("o must derive from __ComObject", "o"); throw new ArgumentException ("o must derive from __ComObject", "o");
@ -213,12 +215,12 @@ namespace System.Runtime.InteropServices
} }
return ComInteropProxy.GetProxy (co.IUnknown, t).GetTransparentProxy (); return ComInteropProxy.GetProxy (co.IUnknown, t).GetTransparentProxy ();
#endif
} }
public static TWrapper CreateWrapperOfType<T, TWrapper> (T o) { public static TWrapper CreateWrapperOfType<T, TWrapper> (T o) {
return (TWrapper)CreateWrapperOfType ((object)o, typeof (TWrapper)); return (TWrapper)CreateWrapperOfType ((object)o, typeof (TWrapper));
} }
#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)] [MethodImplAttribute(MethodImplOptions.InternalCall)]
[ComVisible (true)] [ComVisible (true)]
@ -335,15 +337,16 @@ namespace System.Runtime.InteropServices
return GetCCW (o, T); return GetCCW (o, T);
} }
#endif #endif
#endif // !FULL_AOT_RUNTIME
public static IntPtr GetComInterfaceForObject (object o, Type T) public static IntPtr GetComInterfaceForObject (object o, Type T)
{ {
#if !MOBILE #if MOBILE
throw new PlatformNotSupportedException ();
#else
IntPtr pItf = GetComInterfaceForObjectInternal (o, T); IntPtr pItf = GetComInterfaceForObjectInternal (o, T);
AddRef (pItf); AddRef (pItf);
return pItf; return pItf;
#else
throw new NotImplementedException ();
#endif #endif
} }
@ -357,6 +360,7 @@ namespace System.Runtime.InteropServices
return GetComInterfaceForObject ((object)o, typeof (T)); return GetComInterfaceForObject ((object)o, typeof (T));
} }
#if !FULL_AOT_RUNTIME
[MonoTODO] [MonoTODO]
public static IntPtr GetComInterfaceForObjectInContext (object o, Type t) public static IntPtr GetComInterfaceForObjectInContext (object o, Type t)
{ {
@ -395,12 +399,6 @@ namespace System.Runtime.InteropServices
throw new NotImplementedException (); throw new NotImplementedException ();
} }
[MonoTODO]
public static int GetExceptionCode()
{
throw new NotImplementedException ();
}
[MonoTODO] [MonoTODO]
[ComVisible (true)] [ComVisible (true)]
public static IntPtr GetExceptionPointers() public static IntPtr GetExceptionPointers()
@ -417,26 +415,35 @@ namespace System.Runtime.InteropServices
} }
#endif // !FULL_AOT_RUNTIME #endif // !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME public static int GetExceptionCode ()
{
throw new PlatformNotSupportedException ();
}
public static int GetHRForException (Exception e) public static int GetHRForException (Exception e)
{ {
if (e == null) return 0;
#if FEATURE_COMINTEROP #if FEATURE_COMINTEROP
var errorInfo = new ManagedErrorInfo(e); var errorInfo = new ManagedErrorInfo(e);
SetErrorInfo (0, errorInfo); SetErrorInfo (0, errorInfo);
#endif
return e._HResult; return e._HResult;
#else
return -1;
#endif
} }
[MonoTODO] [MonoTODO]
[ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)] [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
public static int GetHRForLastWin32Error() public static int GetHRForLastWin32Error()
{ {
#if FULL_AOT_RUNTIME
throw new PlatformNotSupportedException ();
#else
throw new NotImplementedException (); throw new NotImplementedException ();
#endif
} }
#if !FULL_AOT_RUNTIME
[MethodImplAttribute (MethodImplOptions.InternalCall)] [MethodImplAttribute (MethodImplOptions.InternalCall)]
private extern static IntPtr GetIDispatchForObjectInternal (object o); private extern static IntPtr GetIDispatchForObjectInternal (object o);
@ -460,17 +467,6 @@ namespace System.Runtime.InteropServices
throw new NotImplementedException (); throw new NotImplementedException ();
} }
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private extern static IntPtr GetIUnknownForObjectInternal (object o);
public static IntPtr GetIUnknownForObject (object o)
{
IntPtr pUnk = GetIUnknownForObjectInternal (o);
// Internal method does not AddRef
AddRef (pUnk);
return pUnk;
}
[MonoTODO] [MonoTODO]
public static IntPtr GetIUnknownForObjectInContext (object o) public static IntPtr GetIUnknownForObjectInContext (object o)
{ {
@ -490,25 +486,48 @@ namespace System.Runtime.InteropServices
throw new NotImplementedException (); throw new NotImplementedException ();
} }
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private extern static IntPtr GetIUnknownForObjectInternal (object o);
#endif // !FULL_AOT_RUNTIME
public static IntPtr GetIUnknownForObject (object o)
{
#if FULL_AOT_RUNTIME
throw new PlatformNotSupportedException ();
#else
IntPtr pUnk = GetIUnknownForObjectInternal (o);
// Internal method does not AddRef
AddRef (pUnk);
return pUnk;
#endif
}
public static void GetNativeVariantForObject (object obj, IntPtr pDstNativeVariant) public static void GetNativeVariantForObject (object obj, IntPtr pDstNativeVariant)
{ {
#if FULL_AOT_RUNTIME
throw new PlatformNotSupportedException ();
#else
Variant vt = new Variant(); Variant vt = new Variant();
vt.SetValue(obj); vt.SetValue(obj);
Marshal.StructureToPtr(vt, pDstNativeVariant, false); Marshal.StructureToPtr(vt, pDstNativeVariant, false);
#endif
} }
public static void GetNativeVariantForObject<T> (T obj, IntPtr pDstNativeVariant) { public static void GetNativeVariantForObject<T> (T obj, IntPtr pDstNativeVariant) {
GetNativeVariantForObject ((object)obj, pDstNativeVariant); GetNativeVariantForObject ((object)obj, pDstNativeVariant);
} }
#if !MOBILE #if !MOBILE && !FULL_AOT_RUNTIME
[MethodImplAttribute (MethodImplOptions.InternalCall)] [MethodImplAttribute (MethodImplOptions.InternalCall)]
private static extern object GetObjectForCCW (IntPtr pUnk); private static extern object GetObjectForCCW (IntPtr pUnk);
#endif #endif
public static object GetObjectForIUnknown (IntPtr pUnk) public static object GetObjectForIUnknown (IntPtr pUnk)
{ {
#if !MOBILE #if MOBILE || FULL_AOT_RUNTIME
throw new PlatformNotSupportedException ();
#else
object obj = GetObjectForCCW (pUnk); object obj = GetObjectForCCW (pUnk);
// was not a CCW // was not a CCW
if (obj == null) { if (obj == null) {
@ -516,24 +535,34 @@ namespace System.Runtime.InteropServices
obj = proxy.GetTransparentProxy (); obj = proxy.GetTransparentProxy ();
} }
return obj; return obj;
#else
throw new NotImplementedException ();
#endif #endif
} }
public static object GetObjectForNativeVariant (IntPtr pSrcNativeVariant) public static object GetObjectForNativeVariant (IntPtr pSrcNativeVariant)
{ {
#if FULL_AOT_RUNTIME
throw new PlatformNotSupportedException ();
#else
Variant vt = (Variant)Marshal.PtrToStructure(pSrcNativeVariant, typeof(Variant)); Variant vt = (Variant)Marshal.PtrToStructure(pSrcNativeVariant, typeof(Variant));
return vt.GetValue(); return vt.GetValue();
#endif
} }
public static T GetObjectForNativeVariant<T> (IntPtr pSrcNativeVariant) { public static T GetObjectForNativeVariant<T> (IntPtr pSrcNativeVariant)
{
#if FULL_AOT_RUNTIME
throw new PlatformNotSupportedException ();
#else
Variant vt = (Variant)Marshal.PtrToStructure(pSrcNativeVariant, typeof(Variant)); Variant vt = (Variant)Marshal.PtrToStructure(pSrcNativeVariant, typeof(Variant));
return (T)vt.GetValue(); return (T)vt.GetValue();
#endif
} }
public static object[] GetObjectsForNativeVariants (IntPtr aSrcNativeVariant, int cVars) public static object[] GetObjectsForNativeVariants (IntPtr aSrcNativeVariant, int cVars)
{ {
#if FULL_AOT_RUNTIME
throw new PlatformNotSupportedException ();
#else
if (cVars < 0) if (cVars < 0)
throw new ArgumentOutOfRangeException ("cVars", "cVars cannot be a negative number."); throw new ArgumentOutOfRangeException ("cVars", "cVars cannot be a negative number.");
object[] objects = new object[cVars]; object[] objects = new object[cVars];
@ -541,9 +570,14 @@ namespace System.Runtime.InteropServices
objects[i] = GetObjectForNativeVariant ((IntPtr)(aSrcNativeVariant.ToInt64 () + objects[i] = GetObjectForNativeVariant ((IntPtr)(aSrcNativeVariant.ToInt64 () +
i * SizeOf (typeof(Variant)))); i * SizeOf (typeof(Variant))));
return objects; return objects;
#endif
} }
public static T[] GetObjectsForNativeVariants<T> (IntPtr aSrcNativeVariant, int cVars) { public static T[] GetObjectsForNativeVariants<T> (IntPtr aSrcNativeVariant, int cVars)
{
#if FULL_AOT_RUNTIME
throw new PlatformNotSupportedException ();
#else
if (cVars < 0) if (cVars < 0)
throw new ArgumentOutOfRangeException ("cVars", "cVars cannot be a negative number."); throw new ArgumentOutOfRangeException ("cVars", "cVars cannot be a negative number.");
T[] objects = new T[cVars]; T[] objects = new T[cVars];
@ -551,14 +585,20 @@ namespace System.Runtime.InteropServices
objects[i] = GetObjectForNativeVariant<T> ((IntPtr)(aSrcNativeVariant.ToInt64 () + objects[i] = GetObjectForNativeVariant<T> ((IntPtr)(aSrcNativeVariant.ToInt64 () +
i * SizeOf (typeof(Variant)))); i * SizeOf (typeof(Variant))));
return objects; return objects;
#endif
} }
[MonoTODO] [MonoTODO]
public static int GetStartComSlot (Type t) public static int GetStartComSlot (Type t)
{ {
#if FULL_AOT_RUNTIME
throw new PlatformNotSupportedException ();
#else
throw new NotImplementedException (); throw new NotImplementedException ();
#endif
} }
#if !FULL_AOT_RUNTIME
[MonoTODO] [MonoTODO]
[Obsolete ("This method has been deprecated")] [Obsolete ("This method has been deprecated")]
public static Thread GetThreadFromFiberCookie (int cookie) public static Thread GetThreadFromFiberCookie (int cookie)
@ -585,12 +625,6 @@ namespace System.Runtime.InteropServices
throw new NotImplementedException (); throw new NotImplementedException ();
} }
public static Type GetTypeFromCLSID (Guid clsid)
{
throw new NotImplementedException ();
}
#if !FULL_AOT_RUNTIME
[Obsolete] [Obsolete]
[MonoTODO] [MonoTODO]
public static string GetTypeInfoName (UCOMITypeInfo pTI) public static string GetTypeInfoName (UCOMITypeInfo pTI)
@ -598,11 +632,6 @@ namespace System.Runtime.InteropServices
throw new NotImplementedException (); throw new NotImplementedException ();
} }
public static string GetTypeInfoName (ITypeInfo typeInfo)
{
throw new NotImplementedException ();
}
[Obsolete] [Obsolete]
[MonoTODO] [MonoTODO]
public static Guid GetTypeLibGuid (UCOMITypeLib pTLB) public static Guid GetTypeLibGuid (UCOMITypeLib pTLB)
@ -654,12 +683,6 @@ namespace System.Runtime.InteropServices
throw new NotImplementedException (); throw new NotImplementedException ();
} }
public static object GetUniqueObjectForIUnknown (IntPtr unknown)
{
throw new NotImplementedException ();
}
#endif
[MonoTODO] [MonoTODO]
[Obsolete ("This method has been deprecated")] [Obsolete ("This method has been deprecated")]
public static IntPtr GetUnmanagedThunkForManagedMethodPtr (IntPtr pfnMethodToWrap, IntPtr pbSignature, int cbSignature) public static IntPtr GetUnmanagedThunkForManagedMethodPtr (IntPtr pfnMethodToWrap, IntPtr pbSignature, int cbSignature)
@ -667,16 +690,6 @@ namespace System.Runtime.InteropServices
throw new NotImplementedException (); throw new NotImplementedException ();
} }
#if !MOBILE
[MethodImplAttribute (MethodImplOptions.InternalCall)]
public extern static bool IsComObject (object o);
#else
public static bool IsComObject (object o)
{
throw new NotImplementedException ();
}
#endif
[MonoTODO] [MonoTODO]
public static bool IsTypeVisibleFromCom (Type t) public static bool IsTypeVisibleFromCom (Type t)
{ {
@ -688,6 +701,31 @@ namespace System.Runtime.InteropServices
{ {
throw new NotImplementedException (); throw new NotImplementedException ();
} }
#endif // !FULL_AOT_RUNTIME
public static Type GetTypeFromCLSID (Guid clsid)
{
throw new PlatformNotSupportedException ();
}
public static string GetTypeInfoName (ITypeInfo typeInfo)
{
throw new PlatformNotSupportedException ();
}
public static object GetUniqueObjectForIUnknown (IntPtr unknown)
{
throw new PlatformNotSupportedException ();
}
#if !MOBILE
[MethodImplAttribute (MethodImplOptions.InternalCall)]
public extern static bool IsComObject (object o);
#else
public static bool IsComObject (object o)
{
throw new PlatformNotSupportedException ();
}
#endif #endif
[MethodImplAttribute(MethodImplOptions.InternalCall)] [MethodImplAttribute(MethodImplOptions.InternalCall)]
@ -950,16 +988,22 @@ namespace System.Runtime.InteropServices
#if !FULL_AOT_RUNTIME #if !FULL_AOT_RUNTIME
[MethodImplAttribute (MethodImplOptions.InternalCall)] [MethodImplAttribute (MethodImplOptions.InternalCall)]
private extern static int ReleaseComObjectInternal (object co); private extern static int ReleaseComObjectInternal (object co);
#endif
public static int ReleaseComObject (object o) public static int ReleaseComObject (object o)
{ {
#if FULL_AOT_RUNTIME
throw new PlatformNotSupportedException ();
#else
if (o == null) if (o == null)
throw new ArgumentException ("Value cannot be null.", "o"); throw new ArgumentException ("Value cannot be null.", "o");
if (!IsComObject (o)) if (!IsComObject (o))
throw new ArgumentException ("Value must be a Com object.", "o"); throw new ArgumentException ("Value must be a Com object.", "o");
return ReleaseComObjectInternal (o); return ReleaseComObjectInternal (o);
#endif
} }
#if !FULL_AOT_RUNTIME
[Obsolete] [Obsolete]
[MonoTODO] [MonoTODO]
public static void ReleaseThreadCache() public static void ReleaseThreadCache()
@ -1630,13 +1674,11 @@ namespace System.Runtime.InteropServices
#endif #endif
} }
#if !FULL_AOT_RUNTIME
public static int FinalReleaseComObject (object o) public static int FinalReleaseComObject (object o)
{ {
while (ReleaseComObject (o) != 0); while (ReleaseComObject (o) != 0);
return 0; return 0;
} }
#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)] [MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern Delegate GetDelegateForFunctionPointerInternal (IntPtr ptr, Type t); private static extern Delegate GetDelegateForFunctionPointerInternal (IntPtr ptr, Type t);

View File

@ -260,6 +260,15 @@ namespace MonoTests.System.Runtime.InteropServices
} }
} }
#endif #endif
[Test]
public void GetHRForException ()
{
Assert.AreEqual (0, Marshal.GetHRForException (null));
Assert.IsTrue (Marshal.GetHRForException (new Exception ()) < 0);
Assert.AreEqual (12345, Marshal.GetHRForException (new IOException ("test message", 12345)));
}
[Test] // bug #319009 [Test] // bug #319009
public void StringToHGlobalUni () public void StringToHGlobalUni ()
{ {

View File

@ -1057,24 +1057,21 @@ namespace MonoTests.System.Threading.Tasks
var token = source.Token; var token = source.Token;
var evt = new ManualResetEventSlim (); var evt = new ManualResetEventSlim ();
bool result = false; bool result = false;
bool thrown = false;
var task = Task.Factory.StartNew (() => evt.Wait (100)); var task = Task.Factory.StartNew (() => { Assert.IsTrue (evt.Wait (2000), "#1"); });
var cont = task.ContinueWith (t => result = true, token, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); var cont = task.ContinueWith (t => result = true, token, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
source.Cancel(); source.Cancel();
evt.Set (); evt.Set ();
task.Wait (100); Assert.IsTrue (task.Wait (2000), "#2");
try { try {
cont.Wait (100); Assert.IsFalse (cont.Wait (4000), "#3");
} catch (Exception ex) { } catch (AggregateException ex) {
thrown = true;
} }
Assert.IsTrue (task.IsCompleted); Assert.IsTrue (task.IsCompleted, "#4");
Assert.IsTrue (cont.IsCanceled); Assert.IsTrue (cont.IsCanceled, "#5");
Assert.IsFalse (result); Assert.IsFalse (result, "#6");
Assert.IsTrue (thrown);
} }
[Test] [Test]

View File

@ -64,21 +64,13 @@ namespace System.Threading
[SecuritySafeCritical] [SecuritySafeCritical]
get get
{ {
#if MONO
throw new NotImplementedException ();
#else
object obj = ExecutionContext.GetLocalValue(this); object obj = ExecutionContext.GetLocalValue(this);
return (obj == null) ? default(T) : (T)obj; return (obj == null) ? default(T) : (T)obj;
#endif
} }
[SecuritySafeCritical] [SecuritySafeCritical]
set set
{ {
#if MONO
throw new NotImplementedException ();
#else
ExecutionContext.SetLocalValue(this, value, m_valueChangedHandler != null); ExecutionContext.SetLocalValue(this, value, m_valueChangedHandler != null);
#endif
} }
} }

View File

@ -1 +1 @@
0c5ef03337e59385daaf2228b3602c0d70f132ac a03412e4144d551461b4f8b21d25f3258a2ec5f1

View File

@ -1 +1 @@
45f2e6ab0ada965bc6c4dc56f52568cd0359cc6b 8ad53def268a4750474dee2731ef4039642458aa

View File

@ -1 +1 @@
b0e49e89c4b7142b252ffb56d7ba8e094bf4b545 4ed6e201e6785a6e9e44a113d2be4c9fd569673c

View File

@ -1 +1 @@
505251ddf7c1902e9323cdc7755ca109aa15ab5e 9d728aa18a9d89c58a94469c86f374658f784ccd

View File

@ -645,10 +645,7 @@ namespace System.Runtime.InteropServices{
#endif #endif
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = false)] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = false)]
[System.Runtime.InteropServices.ComVisible(true)] [System.Runtime.InteropServices.ComVisible(true)]
#if !MONOTOUCH public sealed class ComImportAttribute : Attribute
public
#endif
sealed class ComImportAttribute : Attribute
{ {
internal static Attribute GetCustomAttribute(RuntimeType type) internal static Attribute GetCustomAttribute(RuntimeType type)
{ {

View File

@ -12,7 +12,7 @@
** **
** **
=============================================================================*/ =============================================================================*/
#if !FULL_AOT_RUNTIME
namespace System.Runtime.InteropServices { namespace System.Runtime.InteropServices {
using System; using System;
@ -31,11 +31,15 @@ namespace System.Runtime.InteropServices {
{ {
if (obj != null) if (obj != null)
{ {
#if FULL_AOT_RUNTIME
throw new PlatformNotSupportedException ();
#else
// Make sure this guy has an IDispatch // Make sure this guy has an IDispatch
IntPtr pdisp = Marshal.GetIDispatchForObject(obj); IntPtr pdisp = Marshal.GetIDispatchForObject(obj);
// If we got here without throwing an exception, the QI for IDispatch succeeded. // If we got here without throwing an exception, the QI for IDispatch succeeded.
Marshal.Release(pdisp); Marshal.Release(pdisp);
#endif
} }
m_WrappedObject = obj; m_WrappedObject = obj;
} }
@ -51,4 +55,3 @@ namespace System.Runtime.InteropServices {
private Object m_WrappedObject; private Object m_WrappedObject;
} }
} }
#endif

View File

@ -12,7 +12,7 @@
** **
** **
=============================================================================*/ =============================================================================*/
#if !FULL_AOT_RUNTIME
namespace System.Runtime.InteropServices { namespace System.Runtime.InteropServices {
using System; using System;
@ -54,4 +54,3 @@ namespace System.Runtime.InteropServices {
private int m_ErrorCode; private int m_ErrorCode;
} }
} }
#endif

9
mcs/errors/cs0246-36.cs Normal file
View File

@ -0,0 +1,9 @@
// CS0246: The type or namespace name `Foo' could not be found. Are you missing an assembly reference?
// Line: 8
class Crashy
{
void Call (System.Action<object> action) { }
public void DoCrash () => Call (f => f as Foo);
}

View File

@ -1595,6 +1595,15 @@ namespace Mono.CSharp {
if (res && errors != ec.Report.Errors) if (res && errors != ec.Report.Errors)
return null; return null;
if (block.IsAsync && block.Original.ParametersBlock.HasCapturedThis && ec.CurrentAnonymousMethod != null && ec.CurrentAnonymousMethod.block.IsAsync) {
//
// We'll do ldftn to load the fabricated m_X method but
// because we are inside struct the method can be hoisted
// anywhere in the parent scope
//
ec.CurrentBlock.ParametersBlock.HasReferenceToStoreyForInstanceLambdas = true;
}
return res ? this : null; return res ? this : null;
} }
@ -1798,6 +1807,8 @@ namespace Mono.CSharp {
parent = storey = sm; parent = storey = sm;
} }
} }
} else if (src_block.ParametersBlock.HasReferenceToStoreyForInstanceLambdas) {
src_block.ParametersBlock.StateMachine.AddParentStoreyReference (ec, storey);
} }
modifiers = storey != null ? Modifiers.INTERNAL : Modifiers.PRIVATE; modifiers = storey != null ? Modifiers.INTERNAL : Modifiers.PRIVATE;

View File

@ -1 +1 @@
02ae36b34c16802d921a2476f4a1ab3d750052c3 2a9aa97fed0e62be46728b7c4dccb871de0ff0cc

View File

@ -1 +1 @@
ad08d02b5db754d3948bdb8ad9c4b690011c1aff 7f54b33eeb599c16146c7adfcc0c2e12b3d5beaf

View File

@ -0,0 +1,28 @@
using System;
using System.Threading.Tasks;
public class Test
{
static async Task<string> AsyncWithDeepTry ()
{
try {
await Task.Yield ();
try {
await Task.Yield ();
} catch {
}
} catch {
await Task.Yield ();
} finally {
}
return null;
}
static void Main ()
{
AsyncWithDeepTry ().Wait ();
}
}

View File

@ -0,0 +1,51 @@
using System;
using System.Threading.Tasks;
class X
{
public static void Main ()
{
new X ().Test ();
}
void Test ()
{
object v1 = null;
Action a = () =>
{
if (v1 == null)
{
object v2 = null;
Action a2 = () =>
{
Console.WriteLine (v2);
};
Action a3 = async () =>
{
// This scope needs to access to Scope which can do ldftn on instance method
{
Func<Task> a4 = async () =>
{
await Foo ();
};
}
await Task.Yield ();
};
a3 ();
}
};
a ();
}
async Task Foo ()
{
await Task.FromResult (1);
}
}

View File

@ -1 +1 @@
c0e3e51ded0d42e24d7370dbaa3dccae45d71340 720ef10c534ff81a6c9296b3f09a50987144d5a9

View File

@ -263,11 +263,10 @@
<FileWrites Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" /> <FileWrites Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" />
</ItemGroup> </ItemGroup>
<Target Name="GenerateTargetFrameworkMonikerAttribute" <Target Name="_GenerateTargetFrameworkMonikerAttribute"
DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths" DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths"
Inputs="$(MSBuildToolsPath)\Microsoft.Common.targets" Inputs="$(MSBuildToolsPath)\Microsoft.Common.targets"
Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)" Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)">
Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
<WriteLinesToFile <WriteLinesToFile
File="$(TargetFrameworkMonikerAssemblyAttributesPath)" File="$(TargetFrameworkMonikerAssemblyAttributesPath)"
@ -276,6 +275,11 @@
ContinueOnError="true" ContinueOnError="true"
Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''" Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''"
/> />
</Target>
<Target Name="GenerateTargetFrameworkMonikerAttribute"
DependsOnTargets="_GenerateTargetFrameworkMonikerAttribute"
Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
<ItemGroup Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''"> <ItemGroup Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''">
<Compile Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/> <Compile Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/>

View File

@ -265,11 +265,10 @@
<FileWrites Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" /> <FileWrites Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" />
</ItemGroup> </ItemGroup>
<Target Name="GenerateTargetFrameworkMonikerAttribute" <Target Name="_GenerateTargetFrameworkMonikerAttribute"
DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths" DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths"
Inputs="$(MSBuildToolsPath)\Microsoft.Common.targets" Inputs="$(MSBuildToolsPath)\Microsoft.Common.targets"
Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)" Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)">
Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
<WriteLinesToFile <WriteLinesToFile
File="$(TargetFrameworkMonikerAssemblyAttributesPath)" File="$(TargetFrameworkMonikerAssemblyAttributesPath)"
@ -278,6 +277,11 @@
ContinueOnError="true" ContinueOnError="true"
Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''" Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''"
/> />
</Target>
<Target Name="GenerateTargetFrameworkMonikerAttribute"
DependsOnTargets="_GenerateTargetFrameworkMonikerAttribute"
Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
<ItemGroup Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''"> <ItemGroup Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''">
<Compile Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/> <Compile Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/>

View File

@ -263,11 +263,10 @@
<FileWrites Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" /> <FileWrites Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" />
</ItemGroup> </ItemGroup>
<Target Name="GenerateTargetFrameworkMonikerAttribute" <Target Name="_GenerateTargetFrameworkMonikerAttribute"
DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths" DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths"
Inputs="$(MSBuildToolsPath)\Microsoft.Common.targets" Inputs="$(MSBuildToolsPath)\Microsoft.Common.targets"
Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)" Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)">
Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
<WriteLinesToFile <WriteLinesToFile
File="$(TargetFrameworkMonikerAssemblyAttributesPath)" File="$(TargetFrameworkMonikerAssemblyAttributesPath)"
@ -276,6 +275,11 @@
ContinueOnError="true" ContinueOnError="true"
Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''" Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''"
/> />
</Target>
<Target Name="GenerateTargetFrameworkMonikerAttribute"
DependsOnTargets="_GenerateTargetFrameworkMonikerAttribute"
Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
<ItemGroup Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''"> <ItemGroup Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''">
<Compile Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/> <Compile Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/>

Some files were not shown because too many files have changed in this diff Show More