Imported Upstream version 4.6.0.182
Former-commit-id: 439c182e520038bf50777ca2fe684f216ae28552
This commit is contained in:
parent
c911219690
commit
804b15604f
@ -36,22 +36,28 @@ namespace Microsoft.Win32
|
||||
{
|
||||
public static class RegistryAclExtensions
|
||||
{
|
||||
[MonoTODO]
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (key == null)
|
||||
throw new ArgumentNullException (nameof (key));
|
||||
|
||||
key.SetAccessControl (registrySecurity);
|
||||
}
|
||||
}
|
||||
}
|
@ -37,36 +37,54 @@ namespace System.Diagnostics
|
||||
[MonoTODO]
|
||||
public static IntPtr GetNativeImageBase (this StackFrame stackFrame)
|
||||
{
|
||||
if (stackFrame == null)
|
||||
throw new ArgumentNullException (nameof (stackFrame));
|
||||
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static IntPtr GetNativeIP (this StackFrame stackFrame)
|
||||
{
|
||||
if (stackFrame == null)
|
||||
throw new ArgumentNullException (nameof (stackFrame));
|
||||
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static bool HasNativeImage (this StackFrame stackFrame)
|
||||
{
|
||||
if (stackFrame == null)
|
||||
throw new ArgumentNullException (nameof (stackFrame));
|
||||
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static bool HasMethod (this StackFrame stackFrame)
|
||||
{
|
||||
if (stackFrame == null)
|
||||
throw new ArgumentNullException (nameof (stackFrame));
|
||||
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static bool HasILOffset (this StackFrame stackFrame)
|
||||
{
|
||||
if (stackFrame == null)
|
||||
throw new ArgumentNullException (nameof (stackFrame));
|
||||
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static bool HasSource (this StackFrame stackFrame)
|
||||
{
|
||||
if (stackFrame == null)
|
||||
throw new ArgumentNullException (nameof (stackFrame));
|
||||
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
@ -33,28 +33,36 @@ namespace System
|
||||
{
|
||||
public static class StringNormalizationExtensions
|
||||
{
|
||||
[MonoTODO]
|
||||
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)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (value == null)
|
||||
throw new ArgumentNullException (nameof (value));
|
||||
|
||||
return value.IsNormalized (normalizationForm);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
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)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (value == null)
|
||||
throw new ArgumentNullException (nameof (value));
|
||||
|
||||
return value.Normalize (normalizationForm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,56 +28,74 @@
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Security.AccessControl;
|
||||
|
||||
namespace System.IO
|
||||
{
|
||||
public static partial class FileSystemAclExtensions
|
||||
public static class FileSystemAclExtensions
|
||||
{
|
||||
[MonoTODO]
|
||||
public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo)
|
||||
public static DirectorySecurity GetAccessControl(this DirectoryInfo directoryInfo)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (directoryInfo == null)
|
||||
throw new ArgumentNullException (nameof (directoryInfo));
|
||||
|
||||
return directoryInfo.GetAccessControl ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.AccessControlSections includeSections)
|
||||
public static DirectorySecurity GetAccessControl(this DirectoryInfo directoryInfo, AccessControlSections includeSections)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (directoryInfo == null)
|
||||
throw new ArgumentNullException (nameof (directoryInfo));
|
||||
|
||||
return directoryInfo.GetAccessControl (includeSections);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo)
|
||||
public static FileSecurity GetAccessControl(this FileInfo fileInfo)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (fileInfo == null)
|
||||
throw new ArgumentNullException (nameof (fileInfo));
|
||||
|
||||
return fileInfo.GetAccessControl ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.AccessControlSections includeSections)
|
||||
public static FileSecurity GetAccessControl(this FileInfo fileInfo, AccessControlSections includeSections)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (fileInfo == null)
|
||||
throw new ArgumentNullException (nameof (fileInfo));
|
||||
|
||||
return fileInfo.GetAccessControl (includeSections);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileStream fileStream)
|
||||
public static FileSecurity GetAccessControl(this FileStream fileStream)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (fileStream == null)
|
||||
throw new ArgumentNullException (nameof (fileStream));
|
||||
|
||||
return fileStream.GetAccessControl ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static void SetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.DirectorySecurity directorySecurity)
|
||||
public static void SetAccessControl(this DirectoryInfo directoryInfo, DirectorySecurity directorySecurity)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (directoryInfo == null)
|
||||
throw new ArgumentNullException (nameof (directoryInfo));
|
||||
|
||||
directoryInfo.SetAccessControl (directorySecurity);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static void SetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.FileSecurity fileSecurity)
|
||||
public static void SetAccessControl(this FileInfo fileInfo, FileSecurity fileSecurity)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (fileInfo == null)
|
||||
throw new ArgumentNullException (nameof (fileInfo));
|
||||
|
||||
fileInfo.SetAccessControl (fileSecurity);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static void SetAccessControl(this System.IO.FileStream fileStream, System.Security.AccessControl.FileSecurity fileSecurity)
|
||||
public static void SetAccessControl(this FileStream fileStream, FileSecurity fileSecurity)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (fileStream == null)
|
||||
throw new ArgumentNullException (nameof (fileStream));
|
||||
|
||||
fileStream.SetAccessControl (fileSecurity);
|
||||
}
|
||||
}
|
||||
}
|
@ -28,12 +28,12 @@ namespace System.Net.Sockets
|
||||
state: socket);
|
||||
}
|
||||
|
||||
public static Task ConnectAsync(this Socket socket, EndPoint remoteEndPoint)
|
||||
public static Task ConnectAsync(this Socket socket, EndPoint remoteEP)
|
||||
{
|
||||
return Task.Factory.FromAsync(
|
||||
(targetEndPoint, callback, state) => ((Socket)state).BeginConnect(targetEndPoint, callback, state),
|
||||
asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
|
||||
remoteEndPoint,
|
||||
remoteEP,
|
||||
state: socket);
|
||||
}
|
||||
|
||||
@ -229,7 +229,7 @@ namespace System.Net.Sockets
|
||||
this Socket socket,
|
||||
ArraySegment<byte> buffer,
|
||||
SocketFlags socketFlags,
|
||||
EndPoint remoteEndPoint)
|
||||
EndPoint remoteEP)
|
||||
{
|
||||
return Task<int>.Factory.FromAsync(
|
||||
(targetBuffer, flags, endPoint, callback, state) => ((Socket)state).BeginSendTo(
|
||||
@ -243,7 +243,7 @@ namespace System.Net.Sockets
|
||||
asyncResult => ((Socket)asyncResult.AsyncState).EndSendTo(asyncResult),
|
||||
buffer,
|
||||
socketFlags,
|
||||
remoteEndPoint,
|
||||
remoteEP,
|
||||
state: socket);
|
||||
}
|
||||
}
|
||||
|
@ -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")]
|
@ -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
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
@ -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))]
|
@ -30,7 +30,7 @@ using System.Runtime.CompilerServices;
|
||||
[assembly: AssemblyCompany ("Xamarin, Inc.")]
|
||||
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
|
||||
[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: AssemblyFileVersion ("4.0.0.0")]
|
||||
[assembly: AssemblyDelaySign (true)]
|
||||
|
@ -30,7 +30,7 @@ using System.Runtime.CompilerServices;
|
||||
[assembly: AssemblyCompany ("Xamarin, Inc.")]
|
||||
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
|
||||
[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: AssemblyFileVersion ("4.0.0.0")]
|
||||
[assembly: AssemblyDelaySign (true)]
|
||||
|
@ -30,7 +30,7 @@ using System.Runtime.CompilerServices;
|
||||
[assembly: AssemblyCompany ("Xamarin, Inc.")]
|
||||
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
|
||||
[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: AssemblyFileVersion ("4.0.0.0")]
|
||||
[assembly: AssemblyDelaySign (true)]
|
||||
|
@ -15,199 +15,199 @@ namespace System.Reflection
|
||||
{
|
||||
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));
|
||||
return type.GetConstructor(types);
|
||||
}
|
||||
|
||||
public static ConstructorInfo[] GetConstructors(Type type)
|
||||
public static ConstructorInfo[] GetConstructors(this Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
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));
|
||||
return type.GetConstructors(bindingAttr);
|
||||
}
|
||||
|
||||
public static MemberInfo[] GetDefaultMembers(Type type)
|
||||
public static MemberInfo[] GetDefaultMembers(this Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
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));
|
||||
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));
|
||||
return type.GetEvent(name, bindingAttr);
|
||||
}
|
||||
|
||||
public static EventInfo[] GetEvents(Type type)
|
||||
public static EventInfo[] GetEvents(this Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
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));
|
||||
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));
|
||||
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));
|
||||
return type.GetField(name, bindingAttr);
|
||||
}
|
||||
|
||||
public static FieldInfo[] GetFields(Type type)
|
||||
public static FieldInfo[] GetFields(this Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
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));
|
||||
return type.GetFields(bindingAttr);
|
||||
}
|
||||
|
||||
public static Type[] GetGenericArguments(Type type)
|
||||
public static Type[] GetGenericArguments(this Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetGenericArguments();
|
||||
}
|
||||
|
||||
public static Type[] GetInterfaces(Type type)
|
||||
public static Type[] GetInterfaces(this Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
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));
|
||||
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));
|
||||
return type.GetMember(name, bindingAttr);
|
||||
}
|
||||
|
||||
public static MemberInfo[] GetMembers(Type type)
|
||||
public static MemberInfo[] GetMembers(this Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
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));
|
||||
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));
|
||||
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));
|
||||
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));
|
||||
return type.GetMethod(name, types);
|
||||
}
|
||||
|
||||
public static MethodInfo[] GetMethods(Type type)
|
||||
public static MethodInfo[] GetMethods(this Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
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));
|
||||
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));
|
||||
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));
|
||||
return type.GetNestedTypes(bindingAttr);
|
||||
}
|
||||
|
||||
public static PropertyInfo[] GetProperties(Type type)
|
||||
public static PropertyInfo[] GetProperties(this Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
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));
|
||||
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));
|
||||
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));
|
||||
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));
|
||||
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));
|
||||
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));
|
||||
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));
|
||||
return type.IsInstanceOfType(o);
|
||||
@ -216,19 +216,19 @@ namespace System.Reflection
|
||||
|
||||
public static class AssemblyExtensions
|
||||
{
|
||||
public static Type[] GetExportedTypes(Assembly assembly)
|
||||
public static Type[] GetExportedTypes(this Assembly assembly)
|
||||
{
|
||||
Requires.NotNull(assembly, nameof(assembly));
|
||||
return assembly.GetExportedTypes();
|
||||
}
|
||||
|
||||
public static Module[] GetModules(Assembly assembly)
|
||||
public static Module[] GetModules(this Assembly assembly)
|
||||
{
|
||||
Requires.NotNull(assembly, nameof(assembly));
|
||||
return assembly.GetModules();
|
||||
}
|
||||
|
||||
public static Type[] GetTypes(Assembly assembly)
|
||||
public static Type[] GetTypes(this Assembly assembly)
|
||||
{
|
||||
Requires.NotNull(assembly, nameof(assembly));
|
||||
return assembly.GetTypes();
|
||||
@ -237,37 +237,37 @@ namespace System.Reflection
|
||||
|
||||
public static class EventInfoExtensions
|
||||
{
|
||||
public static MethodInfo GetAddMethod(EventInfo eventInfo)
|
||||
public static MethodInfo GetAddMethod(this EventInfo eventInfo)
|
||||
{
|
||||
Requires.NotNull(eventInfo, nameof(eventInfo));
|
||||
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));
|
||||
return eventInfo.GetAddMethod(nonPublic);
|
||||
}
|
||||
|
||||
public static MethodInfo GetRaiseMethod(EventInfo eventInfo)
|
||||
public static MethodInfo GetRaiseMethod(this EventInfo eventInfo)
|
||||
{
|
||||
Requires.NotNull(eventInfo, nameof(eventInfo));
|
||||
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));
|
||||
return eventInfo.GetRaiseMethod(nonPublic);
|
||||
}
|
||||
|
||||
public static MethodInfo GetRemoveMethod(EventInfo eventInfo)
|
||||
public static MethodInfo GetRemoveMethod(this EventInfo eventInfo)
|
||||
{
|
||||
Requires.NotNull(eventInfo, nameof(eventInfo));
|
||||
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));
|
||||
return eventInfo.GetRemoveMethod(nonPublic);
|
||||
@ -337,7 +337,7 @@ namespace System.Reflection
|
||||
|
||||
public static class MethodInfoExtensions
|
||||
{
|
||||
public static MethodInfo GetBaseDefinition(MethodInfo method)
|
||||
public static MethodInfo GetBaseDefinition(this MethodInfo method)
|
||||
{
|
||||
Requires.NotNull(method, nameof(method));
|
||||
return method.GetBaseDefinition();
|
||||
@ -361,37 +361,37 @@ namespace System.Reflection
|
||||
|
||||
public static class PropertyInfoExtensions
|
||||
{
|
||||
public static MethodInfo[] GetAccessors(PropertyInfo property)
|
||||
public static MethodInfo[] GetAccessors(this PropertyInfo property)
|
||||
{
|
||||
Requires.NotNull(property, nameof(property));
|
||||
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));
|
||||
return property.GetAccessors(nonPublic);
|
||||
}
|
||||
|
||||
public static MethodInfo GetGetMethod(PropertyInfo property)
|
||||
public static MethodInfo GetGetMethod(this PropertyInfo property)
|
||||
{
|
||||
Requires.NotNull(property, nameof(property));
|
||||
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));
|
||||
return property.GetGetMethod(nonPublic);
|
||||
}
|
||||
|
||||
public static MethodInfo GetSetMethod(PropertyInfo property)
|
||||
public static MethodInfo GetSetMethod(this PropertyInfo property)
|
||||
{
|
||||
Requires.NotNull(property, nameof(property));
|
||||
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));
|
||||
return property.GetSetMethod(nonPublic);
|
||||
|
@ -20,11 +20,9 @@
|
||||
// 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.DispatchWrapper))]
|
||||
[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.DllNotFoundException))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Missing))]
|
||||
|
@ -20,28 +20,30 @@
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Security
|
||||
{
|
||||
public static class SecureStringMarshal
|
||||
{
|
||||
public static IntPtr SecureStringToCoTaskMemAnsi (SecureString s)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
return Marshal.SecureStringToCoTaskMemAnsi (s);
|
||||
}
|
||||
|
||||
public static IntPtr SecureStringToCoTaskMemUnicode (SecureString s)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
return Marshal.SecureStringToCoTaskMemUnicode (s);
|
||||
}
|
||||
|
||||
public static IntPtr SecureStringToGlobalAllocAnsi (SecureString s)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
return Marshal.SecureStringToGlobalAllocAnsi (s);
|
||||
}
|
||||
|
||||
public static IntPtr SecureStringToGlobalAllocUnicode (SecureString s)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
return Marshal.SecureStringToGlobalAllocUnicode (s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,208 +37,180 @@ namespace System.ServiceProcess
|
||||
{
|
||||
public class ServiceController : IDisposable
|
||||
{
|
||||
[MonoTODO]
|
||||
public bool CanPauseAndContinue
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool CanShutdown
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool CanStop
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public ServiceController[] DependentServices
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string DisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string MachineName
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public SafeHandle ServiceHandle
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public string ServiceName
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public ServiceController[] ServicesDependedOn
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public ServiceType ServiceType
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public ServiceStartMode StartType
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public ServiceControllerStatus Status
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public ServiceController (string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public ServiceController (string name, string machineName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Continue ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Dispose ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual void Dispose (bool disposing)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static ServiceController[] GetDevices ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static ServiceController[] GetDevices (string machineName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static ServiceController[] GetServices ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static ServiceController[] GetServices (string machineName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Pause ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Refresh ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Start ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Start (string[] args)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void Stop ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void WaitForStatus (ServiceControllerStatus desiredStatus)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public void WaitForStatus (ServiceControllerStatus desiredStatus, TimeSpan timeout)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,22 +36,19 @@ namespace System.ServiceProcess
|
||||
{
|
||||
public class TimeoutException : Exception
|
||||
{
|
||||
[MonoTODO]
|
||||
public TimeoutException ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public TimeoutException (string message)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public TimeoutException (string message, Exception innerException)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,40 +36,52 @@ namespace System.Threading
|
||||
{
|
||||
public static class ThreadingAclExtensions
|
||||
{
|
||||
[MonoTODO]
|
||||
public static EventWaitHandleSecurity GetAccessControl (EventWaitHandle handle)
|
||||
public static EventWaitHandleSecurity GetAccessControl (this EventWaitHandle handle)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (handle == null)
|
||||
throw new ArgumentNullException (nameof (handle));
|
||||
|
||||
return handle.GetAccessControl ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static void SetAccessControl (EventWaitHandle handle, EventWaitHandleSecurity eventSecurity)
|
||||
public static void SetAccessControl (this EventWaitHandle handle, EventWaitHandleSecurity eventSecurity)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (handle == null)
|
||||
throw new ArgumentNullException (nameof (handle));
|
||||
|
||||
handle.SetAccessControl (eventSecurity);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static MutexSecurity GetAccessControl (Mutex mutex)
|
||||
public static MutexSecurity GetAccessControl (this Mutex mutex)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (mutex == null)
|
||||
throw new ArgumentNullException (nameof (mutex));
|
||||
|
||||
return mutex.GetAccessControl ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static void SetAccessControl (Mutex mutex, MutexSecurity mutexSecurity)
|
||||
public static void SetAccessControl (this Mutex mutex, MutexSecurity mutexSecurity)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (mutex == null)
|
||||
throw new ArgumentNullException (nameof (mutex));
|
||||
|
||||
mutex.SetAccessControl (mutexSecurity);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static SemaphoreSecurity GetAccessControl (Semaphore semaphore)
|
||||
public static SemaphoreSecurity GetAccessControl (this Semaphore semaphore)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (semaphore == null)
|
||||
throw new ArgumentNullException (nameof (semaphore));
|
||||
|
||||
return semaphore.GetAccessControl ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static void SetAccessControl (Semaphore semaphore, SemaphoreSecurity semaphoreSecurity)
|
||||
public static void SetAccessControl (this Semaphore semaphore, SemaphoreSecurity semaphoreSecurity)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
if (semaphore == null)
|
||||
throw new ArgumentNullException (nameof (semaphore));
|
||||
|
||||
semaphore.SetAccessControl (semaphoreSecurity);
|
||||
}
|
||||
}
|
||||
}
|
@ -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.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.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.Cryptography.Primitives System.Text.Encoding.CodePages System.IO.FileSystem.Watcher \
|
||||
System.Security.Cryptography.ProtectedData System.ServiceProcess.ServiceController System.IO.Pipes
|
||||
|
@ -38,6 +38,8 @@ using Mono.Data.Tds.Protocol;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
@ -1426,6 +1428,25 @@ namespace System.Data.SqlClient
|
||||
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
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyCompany (Consts.MonoCompany)]
|
||||
[assembly: AssemblyProduct (Consts.MonoProduct)]
|
||||
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
|
||||
[assembly: AssemblyVersion (Consts.FxVersion)]
|
||||
[assembly: AssemblyVersion ("4.0.0.0")]
|
||||
[assembly: SatelliteContractVersion (Consts.FxVersion)]
|
||||
[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
|
||||
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
|
||||
|
@ -45,15 +45,15 @@ namespace System.Security.Cryptography.Pkcs {
|
||||
_params = new byte [0];
|
||||
}
|
||||
|
||||
public AlgorithmIdentifier (Oid algorithm)
|
||||
public AlgorithmIdentifier (Oid oid)
|
||||
{
|
||||
_oid = algorithm;
|
||||
_oid = oid;
|
||||
_params = new byte [0];
|
||||
}
|
||||
|
||||
public AlgorithmIdentifier (Oid algorithm, int keyLength)
|
||||
public AlgorithmIdentifier (Oid oid, int keyLength)
|
||||
{
|
||||
_oid = algorithm;
|
||||
_oid = oid;
|
||||
_length = keyLength;
|
||||
_params = new byte [0];
|
||||
}
|
||||
|
@ -53,14 +53,14 @@ namespace System.Security.Cryptography.Pkcs {
|
||||
{
|
||||
}
|
||||
|
||||
public ContentInfo (Oid oid, byte[] content)
|
||||
public ContentInfo (Oid contentType, byte[] content)
|
||||
{
|
||||
if (oid == null)
|
||||
throw new ArgumentNullException ("oid");
|
||||
if (contentType == null)
|
||||
throw new ArgumentNullException ("contentType");
|
||||
if (content == null)
|
||||
throw new ArgumentNullException ("content");
|
||||
|
||||
_oid = oid;
|
||||
_oid = contentType;
|
||||
_content = content;
|
||||
}
|
||||
|
||||
|
@ -61,12 +61,12 @@ namespace System.Security.Cryptography.Pkcs {
|
||||
_uattribs = new CryptographicAttributeObjectCollection ();
|
||||
}
|
||||
|
||||
public EnvelopedCms (ContentInfo content) : this ()
|
||||
public EnvelopedCms (ContentInfo contentInfo) : this ()
|
||||
{
|
||||
if (content == null)
|
||||
throw new ArgumentNullException ("content");
|
||||
if (contentInfo == null)
|
||||
throw new ArgumentNullException ("contentInfo");
|
||||
|
||||
_content = content;
|
||||
_content = contentInfo;
|
||||
}
|
||||
|
||||
public EnvelopedCms (ContentInfo contentInfo, AlgorithmIdentifier encryptionAlgorithm)
|
||||
|
@ -45,9 +45,9 @@ namespace System.ServiceModel.Channels
|
||||
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)
|
||||
@ -56,11 +56,11 @@ namespace System.ServiceModel.Channels
|
||||
}
|
||||
|
||||
public static AddressHeader CreateAddressHeader (string name, string ns, object value,
|
||||
XmlObjectSerializer formatter)
|
||||
XmlObjectSerializer serializer)
|
||||
{
|
||||
if (formatter == null)
|
||||
throw new ArgumentNullException ("formatter");
|
||||
return new DefaultAddressHeader (name, ns, value, formatter);
|
||||
if (serializer == null)
|
||||
throw new ArgumentNullException ("serializer");
|
||||
return new DefaultAddressHeader (name, ns, value, serializer);
|
||||
}
|
||||
|
||||
public override bool Equals (object obj)
|
||||
@ -93,9 +93,9 @@ namespace System.ServiceModel.Channels
|
||||
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);
|
||||
|
@ -47,8 +47,8 @@ namespace System.ServiceModel.Channels
|
||||
{
|
||||
}
|
||||
|
||||
public AddressHeaderCollection (IEnumerable<AddressHeader> headers)
|
||||
: base (GetList (headers))
|
||||
public AddressHeaderCollection (IEnumerable<AddressHeader> addressHeaders)
|
||||
: base (GetList (addressHeaders))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -44,17 +44,17 @@ namespace System.ServiceModel.Channels
|
||||
BindingElementCollection elements; // for internal use
|
||||
|
||||
public BindingContext (CustomBinding binding,
|
||||
BindingParameterCollection parms)
|
||||
BindingParameterCollection parameters)
|
||||
{
|
||||
if (binding == null)
|
||||
throw new ArgumentNullException ("binding");
|
||||
if (parms == null)
|
||||
throw new ArgumentNullException ("parms");
|
||||
if (parameters == null)
|
||||
throw new ArgumentNullException ("parameters");
|
||||
|
||||
this.binding = binding;
|
||||
parameters = new BindingParameterCollection ();
|
||||
foreach (var item in parms)
|
||||
parameters.Add (item);
|
||||
this.parameters = new BindingParameterCollection ();
|
||||
foreach (var item in parameters)
|
||||
this.parameters.Add (item);
|
||||
this.elements = new BindingElementCollection ();
|
||||
foreach (var item in binding.Elements)
|
||||
this.elements.Add (item);
|
||||
|
@ -40,7 +40,7 @@ namespace System.ServiceModel.Channels
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected BindingElement (BindingElement other)
|
||||
protected BindingElement (BindingElement elementToBeCloned)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -39,9 +39,9 @@ namespace System.ServiceModel.Channels
|
||||
{
|
||||
ChannelManagerBase manager;
|
||||
|
||||
protected ChannelBase (ChannelManagerBase manager)
|
||||
protected ChannelBase (ChannelManagerBase channelManager)
|
||||
{
|
||||
this.manager = manager;
|
||||
this.manager = channelManager;
|
||||
}
|
||||
|
||||
protected internal override TimeSpan DefaultCloseTimeout {
|
||||
|
@ -98,29 +98,29 @@ namespace System.ServiceModel.Channels
|
||||
}
|
||||
|
||||
public TChannel CreateChannel (
|
||||
EndpointAddress remoteAddress)
|
||||
EndpointAddress address)
|
||||
{
|
||||
if (remoteAddress == null)
|
||||
throw new ArgumentNullException ("remoteAddress");
|
||||
return CreateChannel (remoteAddress, remoteAddress.Uri);
|
||||
if (address == null)
|
||||
throw new ArgumentNullException ("address");
|
||||
return CreateChannel (address, address.Uri);
|
||||
}
|
||||
|
||||
public TChannel CreateChannel (
|
||||
EndpointAddress remoteAddress, Uri via)
|
||||
EndpointAddress address, Uri via)
|
||||
{
|
||||
if (remoteAddress == null)
|
||||
throw new ArgumentNullException ("remoteAddress");
|
||||
if (address == null)
|
||||
throw new ArgumentNullException ("address");
|
||||
if (via == null)
|
||||
throw new ArgumentNullException ("via");
|
||||
|
||||
ValidateCreateChannel ();
|
||||
var ch = OnCreateChannel (remoteAddress, via);
|
||||
var ch = OnCreateChannel (address, via);
|
||||
channels.Add (ch);
|
||||
return ch;
|
||||
}
|
||||
|
||||
protected abstract TChannel OnCreateChannel (
|
||||
EndpointAddress remoteAddress, Uri via);
|
||||
EndpointAddress address, Uri via);
|
||||
|
||||
protected override void OnAbort ()
|
||||
{
|
||||
|
@ -68,19 +68,19 @@ namespace System.ServiceModel.Channels
|
||||
security = binding as ISecurityCapabilities;
|
||||
}
|
||||
|
||||
public CustomBinding (params BindingElement [] binding)
|
||||
: this ("CustomBinding", default_ns, binding)
|
||||
public CustomBinding (params BindingElement [] bindingElementsInTopDownChannelStackOrder)
|
||||
: this ("CustomBinding", default_ns, bindingElementsInTopDownChannelStackOrder)
|
||||
{
|
||||
}
|
||||
|
||||
public CustomBinding (IEnumerable<BindingElement> bindingElements)
|
||||
: this (bindingElements, "CustomBinding", default_ns)
|
||||
public CustomBinding (IEnumerable<BindingElement> bindingElementsInTopDownChannelStackOrder)
|
||||
: this (bindingElementsInTopDownChannelStackOrder, "CustomBinding", default_ns)
|
||||
{
|
||||
}
|
||||
|
||||
public CustomBinding (string name, string ns,
|
||||
params BindingElement [] binding)
|
||||
: this (binding, name, ns)
|
||||
params BindingElement [] bindingElementsInTopDownChannelStackOrder)
|
||||
: this (bindingElementsInTopDownChannelStackOrder, name, ns)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -47,20 +47,20 @@ namespace System.ServiceModel.Channels
|
||||
|
||||
[MonoTODO]
|
||||
protected abstract bool OnTryCreateException (
|
||||
Message message, MessageFault fault, out Exception error);
|
||||
Message message, MessageFault fault, out Exception exception);
|
||||
|
||||
[MonoTODO]
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,28 +67,28 @@ namespace System.ServiceModel.Channels
|
||||
}
|
||||
|
||||
protected HttpTransportBindingElement (
|
||||
HttpTransportBindingElement other)
|
||||
: base (other)
|
||||
HttpTransportBindingElement elementToBeCloned)
|
||||
: base (elementToBeCloned)
|
||||
{
|
||||
allow_cookies = other.allow_cookies;
|
||||
bypass_proxy_on_local = other.bypass_proxy_on_local;
|
||||
unsafe_ntlm_auth = other.unsafe_ntlm_auth;
|
||||
use_default_proxy = other.use_default_proxy;
|
||||
keep_alive_enabled = other.keep_alive_enabled;
|
||||
max_buffer_size = other.max_buffer_size;
|
||||
host_cmp_mode = other.host_cmp_mode;
|
||||
proxy_address = other.proxy_address;
|
||||
realm = other.realm;
|
||||
transfer_mode = other.transfer_mode;
|
||||
allow_cookies = elementToBeCloned.allow_cookies;
|
||||
bypass_proxy_on_local = elementToBeCloned.bypass_proxy_on_local;
|
||||
unsafe_ntlm_auth = elementToBeCloned.unsafe_ntlm_auth;
|
||||
use_default_proxy = elementToBeCloned.use_default_proxy;
|
||||
keep_alive_enabled = elementToBeCloned.keep_alive_enabled;
|
||||
max_buffer_size = elementToBeCloned.max_buffer_size;
|
||||
host_cmp_mode = elementToBeCloned.host_cmp_mode;
|
||||
proxy_address = elementToBeCloned.proxy_address;
|
||||
realm = elementToBeCloned.realm;
|
||||
transfer_mode = elementToBeCloned.transfer_mode;
|
||||
// FIXME: it does not look safe
|
||||
timeouts = other.timeouts;
|
||||
auth_scheme = other.auth_scheme;
|
||||
proxy_auth_scheme = other.proxy_auth_scheme;
|
||||
timeouts = elementToBeCloned.timeouts;
|
||||
auth_scheme = elementToBeCloned.auth_scheme;
|
||||
proxy_auth_scheme = elementToBeCloned.proxy_auth_scheme;
|
||||
|
||||
DecompressionEnabled = other.DecompressionEnabled;
|
||||
LegacyExtendedProtectionPolicy = other.LegacyExtendedProtectionPolicy;
|
||||
ExtendedProtectionPolicy = other.ExtendedProtectionPolicy;
|
||||
cookie_manager = other.cookie_manager;
|
||||
DecompressionEnabled = elementToBeCloned.DecompressionEnabled;
|
||||
LegacyExtendedProtectionPolicy = elementToBeCloned.LegacyExtendedProtectionPolicy;
|
||||
ExtendedProtectionPolicy = elementToBeCloned.ExtendedProtectionPolicy;
|
||||
cookie_manager = elementToBeCloned.cookie_manager;
|
||||
}
|
||||
|
||||
[DefaultValue (AuthenticationSchemes.Anonymous)]
|
||||
|
@ -47,10 +47,10 @@ namespace System.ServiceModel.Channels
|
||||
}
|
||||
|
||||
protected HttpsTransportBindingElement (
|
||||
HttpsTransportBindingElement other)
|
||||
: base (other)
|
||||
HttpsTransportBindingElement elementToBeCloned)
|
||||
: base (elementToBeCloned)
|
||||
{
|
||||
req_cli_cert = other.req_cli_cert;
|
||||
req_cli_cert = elementToBeCloned.req_cli_cert;
|
||||
}
|
||||
|
||||
public bool RequireClientCertificate {
|
||||
|
@ -98,10 +98,10 @@ namespace System.ServiceModel.Channels
|
||||
return OnGetBody<T> (GetReaderAtBodyContents ());
|
||||
}
|
||||
|
||||
public T GetBody<T> (XmlObjectSerializer xmlFormatter)
|
||||
public T GetBody<T> (XmlObjectSerializer serializer)
|
||||
{
|
||||
// FIXME: Somehow use OnGetBody() here as well?
|
||||
return (T)xmlFormatter.ReadObject (GetReaderAtBodyContents ());
|
||||
return (T)serializer.ReadObject (GetReaderAtBodyContents ());
|
||||
}
|
||||
|
||||
protected virtual T OnGetBody<T> (XmlDictionaryReader reader)
|
||||
@ -369,13 +369,13 @@ namespace System.ServiceModel.Channels
|
||||
|
||||
// 5)
|
||||
public static Message CreateMessage (MessageVersion version,
|
||||
string action, object body, XmlObjectSerializer xmlFormatter)
|
||||
string action, object body, XmlObjectSerializer serializer)
|
||||
{
|
||||
return body == null ?
|
||||
CreateMessage (version, action) :
|
||||
CreateMessage (
|
||||
version, action,
|
||||
new XmlObjectSerializerBodyWriter (body, xmlFormatter));
|
||||
new XmlObjectSerializerBodyWriter (body, serializer));
|
||||
}
|
||||
|
||||
// 6)
|
||||
|
@ -42,9 +42,9 @@ namespace System.ServiceModel.Channels
|
||||
|
||||
[MonoTODO]
|
||||
public
|
||||
MessageEncodingBindingElement (MessageEncodingBindingElement source)
|
||||
MessageEncodingBindingElement (MessageEncodingBindingElement elementToBeCloned)
|
||||
{
|
||||
MessageVersion = source.MessageVersion;
|
||||
MessageVersion = elementToBeCloned.MessageVersion;
|
||||
}
|
||||
|
||||
public abstract MessageEncoderFactory
|
||||
@ -52,11 +52,11 @@ namespace System.ServiceModel.Channels
|
||||
|
||||
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))
|
||||
return (T) (object) MessageVersion;
|
||||
return ctx.GetInnerProperty<T> ();
|
||||
return context.GetInnerProperty<T> ();
|
||||
}
|
||||
|
||||
#if !NET_2_1 && !XAMMAC_4_5
|
||||
|
@ -397,12 +397,12 @@ namespace System.ServiceModel.Channels
|
||||
return GetDetail<T> (new DataContractSerializer (typeof (T)));
|
||||
}
|
||||
|
||||
public T GetDetail<T> (XmlObjectSerializer formatter)
|
||||
public T GetDetail<T> (XmlObjectSerializer serializer)
|
||||
{
|
||||
if (!HasDetail)
|
||||
throw new InvalidOperationException ("This message does not have details.");
|
||||
|
||||
return (T) formatter.ReadObject (GetReaderAtDetailContents ());
|
||||
return (T) serializer.ReadObject (GetReaderAtDetailContents ());
|
||||
}
|
||||
|
||||
public XmlDictionaryReader GetReaderAtDetailContents ()
|
||||
|
@ -59,56 +59,56 @@ namespace System.ServiceModel.Channels
|
||||
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);
|
||||
}
|
||||
|
||||
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,
|
||||
bool must_understand)
|
||||
public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer serializer,
|
||||
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,
|
||||
bool must_understand, string actor, bool relay)
|
||||
bool mustUnderstand, string actor, bool relay)
|
||||
{
|
||||
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,
|
||||
bool must_understand, string actor)
|
||||
public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer serializer,
|
||||
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,
|
||||
bool must_understand, string actor, bool relay)
|
||||
public static MessageHeader CreateHeader (string name, string ns, object value, XmlObjectSerializer serializer,
|
||||
bool mustUnderstand, string actor, bool relay)
|
||||
{
|
||||
// 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)
|
||||
return false;
|
||||
|
||||
if (version.Envelope == EnvelopeVersion.Soap11)
|
||||
if (messageVersion.Envelope == EnvelopeVersion.Soap11)
|
||||
if (Actor == EnvelopeVersion.Soap12.NextDestinationActorValue ||
|
||||
Actor == EnvelopeVersion.Soap12UltimateReceiver)
|
||||
return false;
|
||||
@ -117,9 +117,9 @@ namespace System.ServiceModel.Channels
|
||||
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;
|
||||
XmlDictionaryString name, ns;
|
||||
@ -128,7 +128,7 @@ namespace System.ServiceModel.Channels
|
||||
writer.WriteStartElement (prefix, name, ns);
|
||||
else
|
||||
writer.WriteStartElement (prefix, this.Name, this.Namespace);
|
||||
WriteHeaderAttributes (writer, version);
|
||||
WriteHeaderAttributes (writer, messageVersion);
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
@ -143,58 +143,58 @@ namespace System.ServiceModel.Channels
|
||||
return sb.ToString ();
|
||||
}
|
||||
|
||||
public void WriteHeader (XmlDictionaryWriter writer, MessageVersion version)
|
||||
public void WriteHeader (XmlDictionaryWriter writer, MessageVersion messageVersion)
|
||||
{
|
||||
if (writer == null)
|
||||
throw new ArgumentNullException ("writer is null.");
|
||||
|
||||
if (version == null)
|
||||
throw new ArgumentNullException ("version is null.");
|
||||
if (messageVersion == null)
|
||||
throw new ArgumentNullException ("messageVersion is null.");
|
||||
|
||||
if (version.Envelope == EnvelopeVersion.None)
|
||||
if (messageVersion.Envelope == EnvelopeVersion.None)
|
||||
return;
|
||||
|
||||
WriteStartHeader (writer, version);
|
||||
WriteHeaderContents (writer, version);
|
||||
WriteStartHeader (writer, messageVersion);
|
||||
WriteHeaderContents (writer, messageVersion);
|
||||
|
||||
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;
|
||||
if (Id != null)
|
||||
writer.WriteAttributeString ("u", dic.Add ("Id"), dic.Add (Constants.WsuNamespace), Id);
|
||||
if (!String.IsNullOrEmpty (Actor)) {
|
||||
if (version.Envelope == EnvelopeVersion.Soap11)
|
||||
writer.WriteAttributeString ("s", dic.Add ("actor"), dic.Add (version.Envelope.Namespace), Actor);
|
||||
if (messageVersion.Envelope == EnvelopeVersion.Soap11)
|
||||
writer.WriteAttributeString ("s", dic.Add ("actor"), dic.Add (messageVersion.Envelope.Namespace), Actor);
|
||||
|
||||
if (version.Envelope == EnvelopeVersion.Soap12)
|
||||
writer.WriteAttributeString ("s", dic.Add ("role"), dic.Add (version.Envelope.Namespace), Actor);
|
||||
if (messageVersion.Envelope == EnvelopeVersion.Soap12)
|
||||
writer.WriteAttributeString ("s", dic.Add ("role"), dic.Add (messageVersion.Envelope.Namespace), Actor);
|
||||
}
|
||||
|
||||
// mustUnderstand is the same across SOAP 1.1 and 1.2
|
||||
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
|
||||
if (Relay == true && version.Envelope == EnvelopeVersion.Soap12)
|
||||
writer.WriteAttributeString ("s", dic.Add ("relay"), dic.Add (version.Envelope.Namespace), "true");
|
||||
if (Relay == true && messageVersion.Envelope == EnvelopeVersion.Soap12)
|
||||
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; }}
|
||||
|
@ -72,9 +72,9 @@ namespace System.ServiceModel.Channels
|
||||
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 ()
|
||||
@ -82,25 +82,25 @@ namespace System.ServiceModel.Channels
|
||||
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);
|
||||
}
|
||||
|
||||
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)
|
||||
@ -203,11 +203,11 @@ namespace System.ServiceModel.Channels
|
||||
return GetHeader<T> (idx, serializer);
|
||||
}
|
||||
|
||||
public XmlDictionaryReader GetReaderAtHeader (int index)
|
||||
public XmlDictionaryReader GetReaderAtHeader (int headerIndex)
|
||||
{
|
||||
if (index >= l.Count)
|
||||
throw new ArgumentOutOfRangeException (String.Format ("Index is out of range. Current header count is {0}", index));
|
||||
MessageHeader item = (MessageHeader) l [index];
|
||||
if (headerIndex >= l.Count)
|
||||
throw new ArgumentOutOfRangeException (String.Format ("Index is out of range. Current header count is {0}", l.Count));
|
||||
MessageHeader item = (MessageHeader) l [headerIndex];
|
||||
|
||||
XmlReader reader =
|
||||
item is MessageHeader.XmlMessageHeader ?
|
||||
@ -231,9 +231,9 @@ namespace System.ServiceModel.Channels
|
||||
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)
|
||||
@ -251,9 +251,9 @@ namespace System.ServiceModel.Channels
|
||||
l.RemoveAt (l.Count - 1);
|
||||
}
|
||||
|
||||
public void RemoveAt (int index)
|
||||
public void RemoveAt (int headerIndex)
|
||||
{
|
||||
l.RemoveAt (index);
|
||||
l.RemoveAt (headerIndex);
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator ()
|
||||
@ -261,48 +261,48 @@ namespace System.ServiceModel.Channels
|
||||
return ((IEnumerable) l).GetEnumerator ();
|
||||
}
|
||||
|
||||
public void WriteHeader (int index, XmlDictionaryWriter writer)
|
||||
public void WriteHeader (int headerIndex, XmlDictionaryWriter writer)
|
||||
{
|
||||
if (version.Envelope == EnvelopeVersion.None)
|
||||
return;
|
||||
WriteStartHeader (index, writer);
|
||||
WriteHeaderContents (index, writer);
|
||||
WriteStartHeader (headerIndex, writer);
|
||||
WriteHeaderContents (headerIndex, writer);
|
||||
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)
|
||||
throw new ArgumentOutOfRangeException ("There is no header at position " + index + ".");
|
||||
if (headerIndex > l.Count)
|
||||
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);
|
||||
}
|
||||
|
||||
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)
|
||||
throw new ArgumentOutOfRangeException ("There is no header at position " + index + ".");
|
||||
if (headerIndex > l.Count)
|
||||
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);
|
||||
}
|
||||
|
||||
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 {
|
||||
|
@ -53,36 +53,36 @@ namespace System.ServiceModel.Channels {
|
||||
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);
|
||||
}
|
||||
|
||||
public static MessageVersion CreateVersion (EnvelopeVersion envelope_version,
|
||||
AddressingVersion addressing_version)
|
||||
public static MessageVersion CreateVersion (EnvelopeVersion envelopeVersion,
|
||||
AddressingVersion addressingVersion)
|
||||
{
|
||||
if (envelope_version == EnvelopeVersion.None && addressing_version == AddressingVersion.None)
|
||||
if (envelopeVersion == EnvelopeVersion.None && addressingVersion == AddressingVersion.None)
|
||||
return None;
|
||||
if (envelope_version == EnvelopeVersion.Soap11 && addressing_version == AddressingVersion.None)
|
||||
if (envelopeVersion == EnvelopeVersion.Soap11 && addressingVersion == AddressingVersion.None)
|
||||
return Soap11;
|
||||
if (envelope_version == EnvelopeVersion.Soap12 && addressing_version == AddressingVersion.WSAddressing10)
|
||||
if (envelopeVersion == EnvelopeVersion.Soap12 && addressingVersion == AddressingVersion.WSAddressing10)
|
||||
return Soap12WSAddressing10;
|
||||
|
||||
if (envelope_version == EnvelopeVersion.Soap12 && addressing_version == AddressingVersion.None)
|
||||
if (envelopeVersion == EnvelopeVersion.Soap12 && addressingVersion == AddressingVersion.None)
|
||||
return Soap12;
|
||||
if (envelope_version == EnvelopeVersion.Soap11 && addressing_version == AddressingVersion.WSAddressing10)
|
||||
if (envelopeVersion == EnvelopeVersion.Soap11 && addressingVersion == AddressingVersion.WSAddressing10)
|
||||
return Soap11WSAddressing10;
|
||||
if (envelope_version == EnvelopeVersion.Soap11 && addressing_version == AddressingVersion.WSAddressingAugust2004)
|
||||
if (envelopeVersion == EnvelopeVersion.Soap11 && addressingVersion == AddressingVersion.WSAddressingAugust2004)
|
||||
return Soap11WSAddressingAugust2004;
|
||||
if (envelope_version == EnvelopeVersion.Soap12 && addressing_version == AddressingVersion.WSAddressingAugust2004)
|
||||
if (envelopeVersion == EnvelopeVersion.Soap12 && addressingVersion == AddressingVersion.WSAddressingAugust2004)
|
||||
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)
|
||||
return false;
|
||||
|
@ -531,29 +531,29 @@ namespace System.ServiceModel.Channels
|
||||
#endif
|
||||
|
||||
public static SecurityBindingElement
|
||||
CreateSecureConversationBindingElement (SecurityBindingElement binding)
|
||||
CreateSecureConversationBindingElement (SecurityBindingElement bootstrapSecurity)
|
||||
{
|
||||
return CreateSecureConversationBindingElement (binding, false);
|
||||
return CreateSecureConversationBindingElement (bootstrapSecurity, false);
|
||||
}
|
||||
|
||||
public static SecurityBindingElement
|
||||
CreateSecureConversationBindingElement (
|
||||
SecurityBindingElement binding, bool requireCancellation)
|
||||
SecurityBindingElement bootstrapSecurity, bool requireCancellation)
|
||||
{
|
||||
return CreateSecureConversationBindingElement (binding, requireCancellation, null);
|
||||
return CreateSecureConversationBindingElement (bootstrapSecurity, requireCancellation, null);
|
||||
}
|
||||
|
||||
public static SecurityBindingElement
|
||||
CreateSecureConversationBindingElement (
|
||||
SecurityBindingElement binding, bool requireCancellation,
|
||||
ChannelProtectionRequirements protectionRequirements)
|
||||
SecurityBindingElement bootstrapSecurity, bool requireCancellation,
|
||||
ChannelProtectionRequirements bootstrapProtectionRequirements)
|
||||
{
|
||||
#if !NET_2_1 && !XAMMAC_4_5
|
||||
SymmetricSecurityBindingElement be =
|
||||
new SymmetricSecurityBindingElement ();
|
||||
be.ProtectionTokenParameters =
|
||||
new SecureConversationSecurityTokenParameters (
|
||||
binding, requireCancellation, protectionRequirements);
|
||||
bootstrapSecurity, requireCancellation, bootstrapProtectionRequirements);
|
||||
return be;
|
||||
#else
|
||||
throw new NotImplementedException ();
|
||||
|
@ -53,12 +53,12 @@ namespace System.ServiceModel.Channels
|
||||
}
|
||||
|
||||
protected TcpTransportBindingElement (
|
||||
TcpTransportBindingElement other)
|
||||
: base (other)
|
||||
TcpTransportBindingElement elementToBeCloned)
|
||||
: base (elementToBeCloned)
|
||||
{
|
||||
listen_backlog = other.listen_backlog;
|
||||
port_sharing_enabled = other.port_sharing_enabled;
|
||||
pool.CopyPropertiesFrom (other.pool);
|
||||
listen_backlog = elementToBeCloned.listen_backlog;
|
||||
port_sharing_enabled = elementToBeCloned.port_sharing_enabled;
|
||||
pool.CopyPropertiesFrom (elementToBeCloned.pool);
|
||||
}
|
||||
|
||||
public TcpConnectionPoolSettings ConnectionPoolSettings {
|
||||
|
@ -48,12 +48,12 @@ namespace System.ServiceModel.Channels
|
||||
}
|
||||
|
||||
protected TransportBindingElement (
|
||||
TransportBindingElement other)
|
||||
: base (other)
|
||||
TransportBindingElement elementToBeCloned)
|
||||
: base (elementToBeCloned)
|
||||
{
|
||||
manual_addressing = other.manual_addressing;
|
||||
max_buffer_pool_size = other.max_buffer_pool_size;
|
||||
max_recv_message_size = other.max_recv_message_size;
|
||||
manual_addressing = elementToBeCloned.manual_addressing;
|
||||
max_buffer_pool_size = elementToBeCloned.max_buffer_pool_size;
|
||||
max_recv_message_size = elementToBeCloned.max_recv_message_size;
|
||||
}
|
||||
|
||||
public virtual bool ManualAddressing {
|
||||
|
@ -51,17 +51,17 @@ namespace System.ServiceModel.Description
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected ClientCredentials (ClientCredentials source)
|
||||
protected ClientCredentials (ClientCredentials other)
|
||||
{
|
||||
userpass = source.userpass.Clone ();
|
||||
digest = source.digest.Clone ();
|
||||
initiator = source.initiator.Clone ();
|
||||
recipient = source.recipient.Clone ();
|
||||
windows = source.windows.Clone ();
|
||||
userpass = other.userpass.Clone ();
|
||||
digest = other.digest.Clone ();
|
||||
initiator = other.initiator.Clone ();
|
||||
recipient = other.recipient.Clone ();
|
||||
windows = other.windows.Clone ();
|
||||
#if !NET_2_1
|
||||
issued_token = source.issued_token.Clone ();
|
||||
peer = source.peer.Clone ();
|
||||
support_interactive = source.support_interactive;
|
||||
issued_token = other.issued_token.Clone ();
|
||||
peer = other.peer.Clone ();
|
||||
support_interactive = other.support_interactive;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -159,10 +159,10 @@ namespace System.ServiceModel.Description
|
||||
|
||||
[MonoTODO]
|
||||
public virtual void ApplyClientBehavior (
|
||||
ServiceEndpoint endpoint, ClientRuntime behavior)
|
||||
ServiceEndpoint serviceEndpoint, ClientRuntime behavior)
|
||||
{
|
||||
if (endpoint == null)
|
||||
throw new ArgumentNullException ("endpoint");
|
||||
if (serviceEndpoint == null)
|
||||
throw new ArgumentNullException ("serviceEndpoint");
|
||||
if (behavior == null)
|
||||
throw new ArgumentNullException ("behavior");
|
||||
|
||||
|
@ -35,22 +35,22 @@ namespace System.ServiceModel.Description
|
||||
public interface IContractBehavior
|
||||
{
|
||||
void AddBindingParameters (
|
||||
ContractDescription description,
|
||||
ContractDescription contractDescription,
|
||||
ServiceEndpoint endpoint,
|
||||
BindingParameterCollection parameters);
|
||||
BindingParameterCollection bindingParameters);
|
||||
|
||||
void ApplyClientBehavior (
|
||||
ContractDescription description,
|
||||
ContractDescription contractDescription,
|
||||
ServiceEndpoint endpoint,
|
||||
ClientRuntime proxy);
|
||||
ClientRuntime clientRuntime);
|
||||
|
||||
void ApplyDispatchBehavior (
|
||||
ContractDescription description,
|
||||
ContractDescription contractDescription,
|
||||
ServiceEndpoint endpoint,
|
||||
DispatchRuntime dispatch);
|
||||
DispatchRuntime dispatchRuntime);
|
||||
|
||||
void Validate (
|
||||
ContractDescription description,
|
||||
ContractDescription contractDescription,
|
||||
ServiceEndpoint endpoint);
|
||||
}
|
||||
}
|
||||
|
@ -34,11 +34,11 @@ namespace System.ServiceModel.Description
|
||||
public interface IEndpointBehavior
|
||||
{
|
||||
void AddBindingParameters (ServiceEndpoint endpoint,
|
||||
BindingParameterCollection parameters);
|
||||
void ApplyDispatchBehavior (ServiceEndpoint serviceEndpoint,
|
||||
EndpointDispatcher dispatcher);
|
||||
void ApplyClientBehavior (ServiceEndpoint serviceEndpoint,
|
||||
ClientRuntime behavior);
|
||||
void Validate (ServiceEndpoint serviceEndpoint);
|
||||
BindingParameterCollection bindingParameters);
|
||||
void ApplyDispatchBehavior (ServiceEndpoint endpoint,
|
||||
EndpointDispatcher endpointDispatcher);
|
||||
void ApplyClientBehavior (ServiceEndpoint endpoint,
|
||||
ClientRuntime clientRuntime);
|
||||
void Validate (ServiceEndpoint endpoint);
|
||||
}
|
||||
}
|
||||
|
@ -34,18 +34,18 @@ namespace System.ServiceModel.Description
|
||||
public interface IOperationBehavior
|
||||
{
|
||||
void AddBindingParameters (
|
||||
OperationDescription description,
|
||||
BindingParameterCollection parameters);
|
||||
OperationDescription operationDescription,
|
||||
BindingParameterCollection bindingParameters);
|
||||
|
||||
void ApplyDispatchBehavior (
|
||||
OperationDescription description,
|
||||
DispatchOperation dispatch);
|
||||
OperationDescription operationDescription,
|
||||
DispatchOperation dispatchOperation);
|
||||
|
||||
void ApplyClientBehavior (
|
||||
OperationDescription description,
|
||||
ClientOperation proxy);
|
||||
OperationDescription operationDescription,
|
||||
ClientOperation clientOperation);
|
||||
|
||||
void Validate (
|
||||
OperationDescription description);
|
||||
OperationDescription operationDescription);
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ namespace System.ServiceModel.Dispatcher
|
||||
{
|
||||
public interface IClientMessageFormatter
|
||||
{
|
||||
object DeserializeReply (Message message, object [] paremeters);
|
||||
Message SerializeRequest (MessageVersion version, object [] inputs);
|
||||
object DeserializeReply (Message message, object [] parameters);
|
||||
Message SerializeRequest (MessageVersion messageVersion, object [] parameters);
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ namespace System.ServiceModel.Dispatcher
|
||||
{
|
||||
public interface IClientMessageInspector
|
||||
{
|
||||
void AfterReceiveReply (ref Message message, object correlationState);
|
||||
object BeforeSendRequest (ref Message message, IClientChannel channel);
|
||||
void AfterReceiveReply (ref Message reply, object correlationState);
|
||||
object BeforeSendRequest (ref Message request, IClientChannel channel);
|
||||
}
|
||||
}
|
||||
|
@ -75,30 +75,30 @@ namespace System.ServiceModel.Security.Tokens
|
||||
}
|
||||
|
||||
public SecureConversationSecurityTokenParameters (
|
||||
SecurityBindingElement element)
|
||||
: this (element, true)
|
||||
SecurityBindingElement bootstrapSecurityBindingElement)
|
||||
: this (bootstrapSecurityBindingElement, true)
|
||||
{
|
||||
}
|
||||
|
||||
public SecureConversationSecurityTokenParameters (
|
||||
SecurityBindingElement element,
|
||||
SecurityBindingElement bootstrapSecurityBindingElement,
|
||||
bool requireCancellation)
|
||||
: this (element, requireCancellation, null)
|
||||
: this (bootstrapSecurityBindingElement, requireCancellation, null)
|
||||
{
|
||||
}
|
||||
|
||||
#if !MOBILE && !XAMMAC_4_5
|
||||
public SecureConversationSecurityTokenParameters (
|
||||
SecurityBindingElement element,
|
||||
SecurityBindingElement bootstrapSecurityBindingElement,
|
||||
bool requireCancellation,
|
||||
ChannelProtectionRequirements requirements)
|
||||
ChannelProtectionRequirements bootstrapProtectionRequirements)
|
||||
{
|
||||
this.element = element;
|
||||
this.element = bootstrapSecurityBindingElement;
|
||||
this.cancellable = requireCancellation;
|
||||
if (requirements == null)
|
||||
if (bootstrapProtectionRequirements == null)
|
||||
this.requirements = new ChannelProtectionRequirements (default_channel_protection_requirements);
|
||||
else
|
||||
this.requirements = new ChannelProtectionRequirements (requirements);
|
||||
this.requirements = new ChannelProtectionRequirements (bootstrapProtectionRequirements);
|
||||
}
|
||||
#else
|
||||
internal SecureConversationSecurityTokenParameters (
|
||||
|
@ -35,8 +35,8 @@ namespace System.ServiceModel
|
||||
public class ActionNotSupportedException : CommunicationException
|
||||
{
|
||||
public ActionNotSupportedException () : base () {}
|
||||
public ActionNotSupportedException (string msg) : base (msg) {}
|
||||
public ActionNotSupportedException (string msg, Exception inner) : base (msg, inner) {}
|
||||
public ActionNotSupportedException (string message) : base (message) {}
|
||||
public ActionNotSupportedException (string message, Exception innerException) : base (message, innerException) {}
|
||||
protected ActionNotSupportedException (SerializationInfo info, StreamingContext context) :
|
||||
base (info, context) {}
|
||||
}
|
||||
|
@ -85,9 +85,9 @@ namespace System.ServiceModel
|
||||
get { return Endpoint.Binding.OpenTimeout; }
|
||||
}
|
||||
|
||||
protected virtual void ApplyConfiguration (string endpointConfig)
|
||||
protected virtual void ApplyConfiguration (string configurationName)
|
||||
{
|
||||
if (endpointConfig == null)
|
||||
if (configurationName == null)
|
||||
return;
|
||||
|
||||
#if NET_2_1 || XAMMAC_4_5
|
||||
@ -96,22 +96,22 @@ namespace System.ServiceModel
|
||||
var cfg = new SilverlightClientConfigLoader ().Load (XmlReader.Create ("ServiceReferences.ClientConfig"));
|
||||
|
||||
SilverlightClientConfigLoader.ServiceEndpointConfiguration se = null;
|
||||
if (endpointConfig == "*")
|
||||
if (configurationName == "*")
|
||||
se = cfg.GetServiceEndpointConfiguration (Endpoint.Contract.Name);
|
||||
if (se == null)
|
||||
se = cfg.GetServiceEndpointConfiguration (endpointConfig);
|
||||
se = cfg.GetServiceEndpointConfiguration (configurationName);
|
||||
|
||||
if (se.Binding != null && Endpoint.Binding == null)
|
||||
Endpoint.Binding = se.Binding;
|
||||
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)
|
||||
Endpoint.Address = se.Address;
|
||||
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) {
|
||||
// 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
|
||||
|
||||
@ -120,7 +120,7 @@ namespace System.ServiceModel
|
||||
ChannelEndpointElement endpoint = null;
|
||||
|
||||
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)
|
||||
throw new InvalidOperationException (String.Format ("More then one endpoint matching contract {0} was found.", contractName));
|
||||
endpoint = el;
|
||||
@ -128,7 +128,7 @@ namespace System.ServiceModel
|
||||
}
|
||||
|
||||
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 contractType = ConfigUtil.GetTypeFromConfigString (endpoint.Contract, NamedConfigCategory.Contract);
|
||||
@ -298,23 +298,23 @@ namespace System.ServiceModel
|
||||
}
|
||||
|
||||
protected void InitializeEndpoint (
|
||||
string endpointConfigurationName,
|
||||
string configurationName,
|
||||
EndpointAddress remoteAddress)
|
||||
{
|
||||
InitializeEndpoint (CreateDescription ());
|
||||
if (remoteAddress != null)
|
||||
service_endpoint.Address = remoteAddress;
|
||||
ApplyConfiguration (endpointConfigurationName);
|
||||
ApplyConfiguration (configurationName);
|
||||
}
|
||||
|
||||
protected void InitializeEndpoint (Binding binding,
|
||||
EndpointAddress remoteAddress)
|
||||
EndpointAddress address)
|
||||
{
|
||||
InitializeEndpoint (CreateDescription ());
|
||||
if (binding != null)
|
||||
service_endpoint.Binding = binding;
|
||||
if (remoteAddress != null)
|
||||
service_endpoint.Address = remoteAddress;
|
||||
if (address != null)
|
||||
service_endpoint.Address = address;
|
||||
}
|
||||
|
||||
protected void InitializeEndpoint (ServiceEndpoint endpoint)
|
||||
|
@ -46,12 +46,12 @@ namespace System.ServiceModel
|
||||
{
|
||||
}
|
||||
|
||||
protected ChannelFactory (Type type)
|
||||
protected ChannelFactory (Type channelType)
|
||||
{
|
||||
if (type == null)
|
||||
throw new ArgumentNullException ("type");
|
||||
if (!type.IsInterface)
|
||||
throw new InvalidOperationException ("The type argument to the generic ChannelFactory constructor must be an interface type.");
|
||||
if (channelType == null)
|
||||
throw new ArgumentNullException ("channelType");
|
||||
if (!channelType.IsInterface)
|
||||
throw new InvalidOperationException ("The channelType argument to the generic ChannelFactory constructor must be an interface type.");
|
||||
|
||||
InitializeEndpoint (CreateDescription ());
|
||||
}
|
||||
|
@ -34,8 +34,8 @@ namespace System.ServiceModel {
|
||||
public class CommunicationException : SystemException
|
||||
{
|
||||
public CommunicationException () : base () {}
|
||||
public CommunicationException (string msg) : base (msg) {}
|
||||
public CommunicationException (string msg, Exception inner) : base (msg, inner) {}
|
||||
public CommunicationException (string message) : base (message) {}
|
||||
public CommunicationException (string message, Exception innerException) : base (message, innerException) {}
|
||||
protected CommunicationException (SerializationInfo info, StreamingContext context)
|
||||
: base (info, context) {}
|
||||
}
|
||||
|
@ -34,9 +34,9 @@ namespace System.ServiceModel {
|
||||
public class CommunicationObjectAbortedException : CommunicationException
|
||||
{
|
||||
public CommunicationObjectAbortedException () : base () {}
|
||||
public CommunicationObjectAbortedException (string msg) : base (msg) {}
|
||||
public CommunicationObjectAbortedException (string msg, Exception inner)
|
||||
: base (msg, inner) {}
|
||||
public CommunicationObjectAbortedException (string message) : base (message) {}
|
||||
public CommunicationObjectAbortedException (string message, Exception innerException)
|
||||
: base (message, innerException) {}
|
||||
protected CommunicationObjectAbortedException (SerializationInfo info,
|
||||
StreamingContext context)
|
||||
: base (info, context) {}
|
||||
|
@ -34,9 +34,9 @@ namespace System.ServiceModel {
|
||||
public class CommunicationObjectFaultedException : CommunicationException
|
||||
{
|
||||
public CommunicationObjectFaultedException () : base () {}
|
||||
public CommunicationObjectFaultedException (string msg) : base (msg) {}
|
||||
public CommunicationObjectFaultedException (string msg, Exception inner)
|
||||
: base (msg, inner) {}
|
||||
public CommunicationObjectFaultedException (string message) : base (message) {}
|
||||
public CommunicationObjectFaultedException (string message, Exception innerException)
|
||||
: base (message, innerException) {}
|
||||
protected CommunicationObjectFaultedException (SerializationInfo info, StreamingContext context)
|
||||
: base (info, context) {}
|
||||
}
|
||||
|
@ -45,12 +45,12 @@ namespace System.ServiceModel
|
||||
Initialize (identity);
|
||||
}
|
||||
|
||||
public DnsEndpointIdentity (string dns)
|
||||
: this (Claim.CreateDnsClaim (dns))
|
||||
public DnsEndpointIdentity (string dnsName)
|
||||
: this (Claim.CreateDnsClaim (dnsName))
|
||||
{
|
||||
}
|
||||
#else
|
||||
public DnsEndpointIdentity (string dns)
|
||||
public DnsEndpointIdentity (string dnsName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
@ -34,71 +34,71 @@ namespace System.ServiceModel
|
||||
{
|
||||
public class DuplexClientBase<TChannel> : ClientBase<TChannel> where TChannel : class
|
||||
{
|
||||
protected DuplexClientBase (object instance)
|
||||
: this (new InstanceContext (instance), (Binding) null, null)
|
||||
protected DuplexClientBase (object callbackInstance)
|
||||
: this (new InstanceContext (callbackInstance), (Binding) null, null)
|
||||
{
|
||||
}
|
||||
|
||||
protected DuplexClientBase (object instance,
|
||||
Binding binding, EndpointAddress address)
|
||||
: this (new InstanceContext (instance), binding, address)
|
||||
protected DuplexClientBase (object callbackInstance,
|
||||
Binding binding, EndpointAddress remoteAddress)
|
||||
: this (new InstanceContext (callbackInstance), binding, remoteAddress)
|
||||
{
|
||||
}
|
||||
|
||||
protected DuplexClientBase (object instance,
|
||||
string configurationName)
|
||||
: this (new InstanceContext (instance), configurationName)
|
||||
protected DuplexClientBase (object callbackInstance,
|
||||
string endpointConfigurationName)
|
||||
: this (new InstanceContext (callbackInstance), endpointConfigurationName)
|
||||
{
|
||||
}
|
||||
|
||||
protected DuplexClientBase (object instance,
|
||||
string bindingConfigurationName, EndpointAddress address)
|
||||
: this (new InstanceContext (instance), bindingConfigurationName, address)
|
||||
protected DuplexClientBase (object callbackInstance,
|
||||
string bindingConfigurationName, EndpointAddress remoteAddress)
|
||||
: this (new InstanceContext (callbackInstance), bindingConfigurationName, remoteAddress)
|
||||
{
|
||||
}
|
||||
|
||||
protected DuplexClientBase (object instance,
|
||||
protected DuplexClientBase (object callbackInstance,
|
||||
string endpointConfigurationName, string remoteAddress)
|
||||
: this (new InstanceContext (instance), endpointConfigurationName, remoteAddress)
|
||||
: this (new InstanceContext (callbackInstance), endpointConfigurationName, remoteAddress)
|
||||
{
|
||||
}
|
||||
|
||||
protected DuplexClientBase (InstanceContext instance)
|
||||
: base (instance)
|
||||
protected DuplexClientBase (InstanceContext callbackInstance)
|
||||
: base (callbackInstance)
|
||||
{
|
||||
}
|
||||
|
||||
protected DuplexClientBase (InstanceContext instance,
|
||||
Binding binding, EndpointAddress address)
|
||||
: base (instance, binding, address)
|
||||
protected DuplexClientBase (InstanceContext callbackInstance,
|
||||
Binding binding, EndpointAddress remoteAddress)
|
||||
: base (callbackInstance, binding, remoteAddress)
|
||||
{
|
||||
}
|
||||
|
||||
protected DuplexClientBase (InstanceContext instance,
|
||||
string configurationName)
|
||||
: base (instance, configurationName)
|
||||
protected DuplexClientBase (InstanceContext callbackInstance,
|
||||
string endpointConfigurationName)
|
||||
: base (callbackInstance, endpointConfigurationName)
|
||||
{
|
||||
}
|
||||
|
||||
protected DuplexClientBase (InstanceContext instance,
|
||||
protected DuplexClientBase (InstanceContext callbackInstance,
|
||||
string endpointConfigurationName, string remoteAddress)
|
||||
: base (instance, endpointConfigurationName, remoteAddress)
|
||||
: base (callbackInstance, endpointConfigurationName, remoteAddress)
|
||||
{
|
||||
}
|
||||
|
||||
protected DuplexClientBase (InstanceContext instance,
|
||||
string configurationName, EndpointAddress address)
|
||||
: base (instance, configurationName, address)
|
||||
protected DuplexClientBase (InstanceContext callbackInstance,
|
||||
string endpointConfigurationName, EndpointAddress address)
|
||||
: base (callbackInstance, endpointConfigurationName, address)
|
||||
{
|
||||
}
|
||||
|
||||
protected DuplexClientBase (object instance, ServiceEndpoint endpoint)
|
||||
: this (new InstanceContext (instance), endpoint)
|
||||
protected DuplexClientBase (object callbackInstance, ServiceEndpoint endpoint)
|
||||
: this (new InstanceContext (callbackInstance), endpoint)
|
||||
{
|
||||
}
|
||||
|
||||
protected DuplexClientBase (InstanceContext instance, ServiceEndpoint endpoint)
|
||||
: base (instance, endpoint)
|
||||
protected DuplexClientBase (InstanceContext callbackInstance, ServiceEndpoint endpoint)
|
||||
: base (callbackInstance, endpoint)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -70,11 +70,11 @@ namespace System.ServiceModel
|
||||
{
|
||||
}
|
||||
|
||||
public EndpointAddress (Uri uri, params AddressHeader [] headers)
|
||||
: this (uri, null, new AddressHeaderCollection (headers), null, null) {}
|
||||
public EndpointAddress (Uri uri, params AddressHeader [] addressHeaders)
|
||||
: this (uri, null, new AddressHeaderCollection (addressHeaders), null, null) {}
|
||||
|
||||
public EndpointAddress (Uri uri, EndpointIdentity identity, params AddressHeader [] headers)
|
||||
: this (uri, identity, new AddressHeaderCollection (headers), null, null) {}
|
||||
public EndpointAddress (Uri uri, EndpointIdentity identity, params AddressHeader [] addressHeaders)
|
||||
: this (uri, identity, new AddressHeaderCollection (addressHeaders), null, null) {}
|
||||
|
||||
public EndpointAddress (Uri uri, EndpointIdentity identity, AddressHeaderCollection headers)
|
||||
: this (uri, identity, headers, null, null) {}
|
||||
|
@ -34,8 +34,8 @@ namespace System.ServiceModel {
|
||||
public class EndpointNotFoundException : CommunicationException
|
||||
{
|
||||
public EndpointNotFoundException () : base () {}
|
||||
public EndpointNotFoundException (string msg) : base (msg) {}
|
||||
public EndpointNotFoundException (string msg, Exception inner) : base (msg, inner) {}
|
||||
public EndpointNotFoundException (string message) : base (message) {}
|
||||
public EndpointNotFoundException (string message, Exception innerException) : base (message, innerException) {}
|
||||
protected EndpointNotFoundException (SerializationInfo info, StreamingContext context) :
|
||||
base (info, context) {}
|
||||
}
|
||||
|
@ -42,16 +42,16 @@ namespace System.ServiceModel
|
||||
{
|
||||
}
|
||||
|
||||
public FaultCode (string name, FaultCode subcode)
|
||||
: this (name, String.Empty, subcode)
|
||||
public FaultCode (string name, FaultCode 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.ns = ns;
|
||||
this.subcode = subcode;
|
||||
this.subcode = subCode;
|
||||
}
|
||||
|
||||
public bool IsPredefinedFault {
|
||||
@ -78,9 +78,9 @@ namespace System.ServiceModel
|
||||
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)
|
||||
@ -88,9 +88,9 @@ namespace System.ServiceModel
|
||||
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)
|
||||
|
@ -100,7 +100,7 @@ namespace System.ServiceModel
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static FaultException CreateFault (MessageFault fault, params Type [] details)
|
||||
public static FaultException CreateFault (MessageFault messageFault, params Type [] faultDetailTypes)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
@ -34,8 +34,8 @@ namespace System.ServiceModel {
|
||||
public class InvalidMessageContractException : SystemException
|
||||
{
|
||||
public InvalidMessageContractException () : base () {}
|
||||
public InvalidMessageContractException (string msg) : base (msg) {}
|
||||
public InvalidMessageContractException (string msg, Exception inner) : base (msg, inner) {}
|
||||
public InvalidMessageContractException (string message) : base (message) {}
|
||||
public InvalidMessageContractException (string message, Exception innerException) : base (message, innerException) {}
|
||||
protected InvalidMessageContractException (SerializationInfo info, StreamingContext context) :
|
||||
base (info, context) {}
|
||||
}
|
||||
|
@ -35,8 +35,8 @@ namespace System.ServiceModel {
|
||||
public class MessageHeaderException : ProtocolException
|
||||
{
|
||||
public MessageHeaderException () : this ("Message header exception") {}
|
||||
public MessageHeaderException (string msg) : this (msg, null) {}
|
||||
public MessageHeaderException (string msg, Exception inner) : base (msg, inner) {}
|
||||
public MessageHeaderException (string message) : this (message, null) {}
|
||||
public MessageHeaderException (string message, Exception innerException) : base (message, innerException) {}
|
||||
protected MessageHeaderException (SerializationInfo info, StreamingContext context) :
|
||||
base (info, context)
|
||||
{
|
||||
|
@ -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.must_understand = must_understand;
|
||||
this.must_understand = mustUnderstand;
|
||||
this.actor = actor;
|
||||
this.relay = relay;
|
||||
}
|
||||
|
@ -34,9 +34,9 @@ namespace System.ServiceModel {
|
||||
public class ProtocolException : CommunicationException
|
||||
{
|
||||
public ProtocolException () : base () {}
|
||||
public ProtocolException (string msg) : base (msg) {}
|
||||
public ProtocolException (string msg, Exception inner)
|
||||
: base (msg, inner) {}
|
||||
public ProtocolException (string message) : base (message) {}
|
||||
public ProtocolException (string message, Exception innerException)
|
||||
: base (message, innerException) {}
|
||||
protected ProtocolException (SerializationInfo info,
|
||||
StreamingContext context)
|
||||
: base (info, context) {}
|
||||
|
@ -34,9 +34,9 @@ namespace System.ServiceModel {
|
||||
public class QuotaExceededException : SystemException
|
||||
{
|
||||
public QuotaExceededException () : base () {}
|
||||
public QuotaExceededException (string msg) : base (msg) {}
|
||||
public QuotaExceededException (string msg, Exception inner)
|
||||
: base (msg, inner) {}
|
||||
public QuotaExceededException (string message) : base (message) {}
|
||||
public QuotaExceededException (string message, Exception innerException)
|
||||
: base (message, innerException) {}
|
||||
protected QuotaExceededException (SerializationInfo info,
|
||||
StreamingContext context)
|
||||
: base (info, context) {}
|
||||
|
@ -34,9 +34,9 @@ namespace System.ServiceModel {
|
||||
public class ServerTooBusyException : CommunicationException
|
||||
{
|
||||
public ServerTooBusyException () : base () {}
|
||||
public ServerTooBusyException (string msg) : base (msg) {}
|
||||
public ServerTooBusyException (string msg, Exception inner)
|
||||
: base (msg, inner) {}
|
||||
public ServerTooBusyException (string message) : base (message) {}
|
||||
public ServerTooBusyException (string message, Exception innerException)
|
||||
: base (message, innerException) {}
|
||||
protected ServerTooBusyException (SerializationInfo info,
|
||||
StreamingContext context)
|
||||
: base (info, context) {}
|
||||
|
@ -34,9 +34,9 @@ namespace System.ServiceModel {
|
||||
public class ServiceActivationException : CommunicationException
|
||||
{
|
||||
public ServiceActivationException () : base () {}
|
||||
public ServiceActivationException (string msg) : base (msg) {}
|
||||
public ServiceActivationException (string msg, Exception inner)
|
||||
: base (msg, inner) {}
|
||||
public ServiceActivationException (string message) : base (message) {}
|
||||
public ServiceActivationException (string message, Exception innerException)
|
||||
: base (message, innerException) {}
|
||||
protected ServiceActivationException (SerializationInfo info,
|
||||
StreamingContext context)
|
||||
: base (info, context) {}
|
||||
|
@ -45,12 +45,12 @@ namespace System.ServiceModel
|
||||
Initialize (identity);
|
||||
}
|
||||
|
||||
public SpnEndpointIdentity (string spn)
|
||||
: this (Claim.CreateSpnClaim (spn))
|
||||
public SpnEndpointIdentity (string spnName)
|
||||
: this (Claim.CreateSpnClaim (spnName))
|
||||
{
|
||||
}
|
||||
#else
|
||||
public SpnEndpointIdentity (string spn)
|
||||
public SpnEndpointIdentity (string spnName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
@ -45,12 +45,12 @@ namespace System.ServiceModel
|
||||
Initialize (identity);
|
||||
}
|
||||
|
||||
public UpnEndpointIdentity (string upn)
|
||||
: this (Claim.CreateUpnClaim (upn))
|
||||
public UpnEndpointIdentity (string upnName)
|
||||
: this (Claim.CreateUpnClaim (upnName))
|
||||
{
|
||||
}
|
||||
#else
|
||||
public UpnEndpointIdentity (string upn)
|
||||
public UpnEndpointIdentity (string upnName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
@ -52,13 +52,13 @@ namespace System.IO.Compression
|
||||
bool disposed;
|
||||
DeflateStreamNative native;
|
||||
|
||||
public DeflateStream (Stream compressedStream, CompressionMode mode) :
|
||||
this (compressedStream, mode, false, false)
|
||||
public DeflateStream (Stream stream, CompressionMode mode) :
|
||||
this (stream, mode, false, false)
|
||||
{
|
||||
}
|
||||
|
||||
public DeflateStream (Stream compressedStream, CompressionMode mode, bool leaveOpen) :
|
||||
this (compressedStream, mode, leaveOpen, false)
|
||||
public DeflateStream (Stream stream, CompressionMode mode, bool leaveOpen) :
|
||||
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)
|
||||
throw new ObjectDisposedException (GetType ().FullName);
|
||||
if (dest == null)
|
||||
if (array == null)
|
||||
throw new ArgumentNullException ("Destination array is null.");
|
||||
if (!CanRead)
|
||||
throw new InvalidOperationException ("Stream does not support reading.");
|
||||
int len = dest.Length;
|
||||
if (dest_offset < 0 || count < 0)
|
||||
int len = array.Length;
|
||||
if (offset < 0 || count < 0)
|
||||
throw new ArgumentException ("Dest or count is negative.");
|
||||
if (dest_offset > len)
|
||||
if (offset > len)
|
||||
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");
|
||||
|
||||
return ReadInternal (dest, dest_offset, count);
|
||||
return ReadInternal (array, offset, 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)
|
||||
throw new ObjectDisposedException (GetType ().FullName);
|
||||
|
||||
if (src == null)
|
||||
throw new ArgumentNullException ("src");
|
||||
if (array == null)
|
||||
throw new ArgumentNullException ("array");
|
||||
|
||||
if (src_offset < 0)
|
||||
throw new ArgumentOutOfRangeException ("src_offset");
|
||||
if (offset < 0)
|
||||
throw new ArgumentOutOfRangeException ("offset");
|
||||
|
||||
if (count < 0)
|
||||
throw new ArgumentOutOfRangeException ("count");
|
||||
@ -171,10 +171,10 @@ namespace System.IO.Compression
|
||||
if (!CanWrite)
|
||||
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.");
|
||||
|
||||
WriteInternal (src, src_offset, count);
|
||||
WriteInternal (array, offset, count);
|
||||
}
|
||||
|
||||
public override void Flush ()
|
||||
|
@ -70,21 +70,21 @@ namespace System.IO.Compression {
|
||||
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)
|
||||
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)
|
||||
throw new ObjectDisposedException (GetType ().FullName);
|
||||
|
||||
deflateStream.Write (src, src_offset, count);
|
||||
deflateStream.Write (array, offset, count);
|
||||
}
|
||||
|
||||
public override void Flush()
|
||||
|
@ -1 +1 @@
|
||||
f894f490612fc2b6ff9f185bd113be8941234c9b
|
||||
3dd17d0c16ba42ad68b52821e4491c8eafe06c04
|
@ -34,16 +34,16 @@ namespace System.Security.AccessControl {
|
||||
public sealed class SemaphoreAccessRule : AccessRule
|
||||
{
|
||||
public SemaphoreAccessRule (IdentityReference identity,
|
||||
SemaphoreRights semaphoreRights,
|
||||
SemaphoreRights eventRights,
|
||||
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,
|
||||
SemaphoreRights semaphoreRights,
|
||||
SemaphoreRights eventRights,
|
||||
AccessControlType type)
|
||||
: this (new NTAccount (identity), semaphoreRights, type)
|
||||
: this (new NTAccount (identity), eventRights, type)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -35,9 +35,9 @@ namespace System.Security.AccessControl {
|
||||
: AuditRule
|
||||
{
|
||||
public SemaphoreAuditRule (IdentityReference identity,
|
||||
SemaphoreRights semaphoreRights,
|
||||
SemaphoreRights eventRights,
|
||||
AuditFlags flags)
|
||||
: base (identity, (int)semaphoreRights, false, InheritanceFlags.None, PropagationFlags.None, flags)
|
||||
: base (identity, (int)eventRights, false, InheritanceFlags.None, PropagationFlags.None, flags)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -94,14 +94,14 @@ namespace System.Security.Cryptography.X509Certificates {
|
||||
|
||||
// methods
|
||||
|
||||
public override void CopyFrom (AsnEncodedData encodedData)
|
||||
public override void CopyFrom (AsnEncodedData asnEncodedData)
|
||||
{
|
||||
if (encodedData == null)
|
||||
throw new ArgumentNullException ("encodedData");
|
||||
if (asnEncodedData == null)
|
||||
throw new ArgumentNullException ("asnEncodedData");
|
||||
|
||||
X509Extension ex = (encodedData as X509Extension);
|
||||
X509Extension ex = (asnEncodedData as X509Extension);
|
||||
if (ex == null)
|
||||
throw new ArgumentException (Locale.GetText ("Wrong type."), "encodedData");
|
||||
throw new ArgumentException (Locale.GetText ("Wrong type."), "asnEncodedData");
|
||||
|
||||
if (ex._oid == null)
|
||||
_oid = new Oid (oid, friendlyName);
|
||||
|
@ -159,14 +159,14 @@ namespace System.Security.Cryptography.X509Certificates {
|
||||
|
||||
// methods
|
||||
|
||||
public override void CopyFrom (AsnEncodedData encodedData)
|
||||
public override void CopyFrom (AsnEncodedData asnEncodedData)
|
||||
{
|
||||
if (encodedData == null)
|
||||
throw new ArgumentNullException ("encodedData");
|
||||
if (asnEncodedData == null)
|
||||
throw new ArgumentNullException ("asnEncodedData");
|
||||
|
||||
X509Extension ex = (encodedData as X509Extension);
|
||||
X509Extension ex = (asnEncodedData as X509Extension);
|
||||
if (ex == null)
|
||||
throw new ArgumentException (Locale.GetText ("Wrong type."), "encodedData");
|
||||
throw new ArgumentException (Locale.GetText ("Wrong type."), "asnEncodedData");
|
||||
|
||||
if (ex._oid == null)
|
||||
_oid = new Oid (oid, friendlyName);
|
||||
|
@ -37,10 +37,10 @@ using System;
|
||||
using System.Security;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
|
||||
using System.Runtime.ConstrainedExecution;
|
||||
#if !FULL_AOT_RUNTIME
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using Mono.Interop;
|
||||
#endif
|
||||
|
||||
@ -197,9 +197,11 @@ namespace System.Runtime.InteropServices
|
||||
return CreateAggregatedObject (pOuter, (object)o);
|
||||
}
|
||||
|
||||
#if !FULL_AOT_RUNTIME
|
||||
public static object CreateWrapperOfType (object o, Type t)
|
||||
{
|
||||
#if FULL_AOT_RUNTIME
|
||||
throw new PlatformNotSupportedException ();
|
||||
#else
|
||||
__ComObject co = o as __ComObject;
|
||||
if (co == null)
|
||||
throw new ArgumentException ("o must derive from __ComObject", "o");
|
||||
@ -213,12 +215,12 @@ namespace System.Runtime.InteropServices
|
||||
}
|
||||
|
||||
return ComInteropProxy.GetProxy (co.IUnknown, t).GetTransparentProxy ();
|
||||
#endif
|
||||
}
|
||||
|
||||
public static TWrapper CreateWrapperOfType<T, TWrapper> (T o) {
|
||||
return (TWrapper)CreateWrapperOfType ((object)o, typeof (TWrapper));
|
||||
}
|
||||
#endif
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
[ComVisible (true)]
|
||||
@ -335,15 +337,16 @@ namespace System.Runtime.InteropServices
|
||||
return GetCCW (o, T);
|
||||
}
|
||||
#endif
|
||||
#endif // !FULL_AOT_RUNTIME
|
||||
|
||||
public static IntPtr GetComInterfaceForObject (object o, Type T)
|
||||
{
|
||||
#if !MOBILE
|
||||
#if MOBILE
|
||||
throw new PlatformNotSupportedException ();
|
||||
#else
|
||||
IntPtr pItf = GetComInterfaceForObjectInternal (o, T);
|
||||
AddRef (pItf);
|
||||
return pItf;
|
||||
#else
|
||||
throw new NotImplementedException ();
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -357,6 +360,7 @@ namespace System.Runtime.InteropServices
|
||||
return GetComInterfaceForObject ((object)o, typeof (T));
|
||||
}
|
||||
|
||||
#if !FULL_AOT_RUNTIME
|
||||
[MonoTODO]
|
||||
public static IntPtr GetComInterfaceForObjectInContext (object o, Type t)
|
||||
{
|
||||
@ -395,12 +399,6 @@ namespace System.Runtime.InteropServices
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static int GetExceptionCode()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
[ComVisible (true)]
|
||||
public static IntPtr GetExceptionPointers()
|
||||
@ -417,26 +415,35 @@ namespace System.Runtime.InteropServices
|
||||
}
|
||||
#endif // !FULL_AOT_RUNTIME
|
||||
|
||||
#if !FULL_AOT_RUNTIME
|
||||
public static int GetExceptionCode ()
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public static int GetHRForException (Exception e)
|
||||
{
|
||||
if (e == null) return 0;
|
||||
|
||||
#if FEATURE_COMINTEROP
|
||||
var errorInfo = new ManagedErrorInfo(e);
|
||||
SetErrorInfo (0, errorInfo);
|
||||
#endif
|
||||
|
||||
return e._HResult;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
[ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
|
||||
public static int GetHRForLastWin32Error()
|
||||
{
|
||||
#if FULL_AOT_RUNTIME
|
||||
throw new PlatformNotSupportedException ();
|
||||
#else
|
||||
throw new NotImplementedException ();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !FULL_AOT_RUNTIME
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
private extern static IntPtr GetIDispatchForObjectInternal (object o);
|
||||
|
||||
@ -460,17 +467,6 @@ namespace System.Runtime.InteropServices
|
||||
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]
|
||||
public static IntPtr GetIUnknownForObjectInContext (object o)
|
||||
{
|
||||
@ -490,25 +486,48 @@ namespace System.Runtime.InteropServices
|
||||
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)
|
||||
{
|
||||
#if FULL_AOT_RUNTIME
|
||||
throw new PlatformNotSupportedException ();
|
||||
#else
|
||||
Variant vt = new Variant();
|
||||
vt.SetValue(obj);
|
||||
Marshal.StructureToPtr(vt, pDstNativeVariant, false);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void GetNativeVariantForObject<T> (T obj, IntPtr pDstNativeVariant) {
|
||||
GetNativeVariantForObject ((object)obj, pDstNativeVariant);
|
||||
}
|
||||
|
||||
#if !MOBILE
|
||||
#if !MOBILE && !FULL_AOT_RUNTIME
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
private static extern object GetObjectForCCW (IntPtr pUnk);
|
||||
#endif
|
||||
|
||||
public static object GetObjectForIUnknown (IntPtr pUnk)
|
||||
{
|
||||
#if !MOBILE
|
||||
#if MOBILE || FULL_AOT_RUNTIME
|
||||
throw new PlatformNotSupportedException ();
|
||||
#else
|
||||
object obj = GetObjectForCCW (pUnk);
|
||||
// was not a CCW
|
||||
if (obj == null) {
|
||||
@ -516,24 +535,34 @@ namespace System.Runtime.InteropServices
|
||||
obj = proxy.GetTransparentProxy ();
|
||||
}
|
||||
return obj;
|
||||
#else
|
||||
throw new NotImplementedException ();
|
||||
#endif
|
||||
}
|
||||
|
||||
public static object GetObjectForNativeVariant (IntPtr pSrcNativeVariant)
|
||||
{
|
||||
#if FULL_AOT_RUNTIME
|
||||
throw new PlatformNotSupportedException ();
|
||||
#else
|
||||
Variant vt = (Variant)Marshal.PtrToStructure(pSrcNativeVariant, typeof(Variant));
|
||||
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));
|
||||
return (T)vt.GetValue();
|
||||
#endif
|
||||
}
|
||||
|
||||
public static object[] GetObjectsForNativeVariants (IntPtr aSrcNativeVariant, int cVars)
|
||||
{
|
||||
#if FULL_AOT_RUNTIME
|
||||
throw new PlatformNotSupportedException ();
|
||||
#else
|
||||
if (cVars < 0)
|
||||
throw new ArgumentOutOfRangeException ("cVars", "cVars cannot be a negative number.");
|
||||
object[] objects = new object[cVars];
|
||||
@ -541,9 +570,14 @@ namespace System.Runtime.InteropServices
|
||||
objects[i] = GetObjectForNativeVariant ((IntPtr)(aSrcNativeVariant.ToInt64 () +
|
||||
i * SizeOf (typeof(Variant))));
|
||||
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)
|
||||
throw new ArgumentOutOfRangeException ("cVars", "cVars cannot be a negative number.");
|
||||
T[] objects = new T[cVars];
|
||||
@ -551,14 +585,20 @@ namespace System.Runtime.InteropServices
|
||||
objects[i] = GetObjectForNativeVariant<T> ((IntPtr)(aSrcNativeVariant.ToInt64 () +
|
||||
i * SizeOf (typeof(Variant))));
|
||||
return objects;
|
||||
#endif
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static int GetStartComSlot (Type t)
|
||||
{
|
||||
#if FULL_AOT_RUNTIME
|
||||
throw new PlatformNotSupportedException ();
|
||||
#else
|
||||
throw new NotImplementedException ();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !FULL_AOT_RUNTIME
|
||||
[MonoTODO]
|
||||
[Obsolete ("This method has been deprecated")]
|
||||
public static Thread GetThreadFromFiberCookie (int cookie)
|
||||
@ -585,12 +625,6 @@ namespace System.Runtime.InteropServices
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public static Type GetTypeFromCLSID (Guid clsid)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
#if !FULL_AOT_RUNTIME
|
||||
[Obsolete]
|
||||
[MonoTODO]
|
||||
public static string GetTypeInfoName (UCOMITypeInfo pTI)
|
||||
@ -598,11 +632,6 @@ namespace System.Runtime.InteropServices
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public static string GetTypeInfoName (ITypeInfo typeInfo)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
[MonoTODO]
|
||||
public static Guid GetTypeLibGuid (UCOMITypeLib pTLB)
|
||||
@ -654,12 +683,6 @@ namespace System.Runtime.InteropServices
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public static object GetUniqueObjectForIUnknown (IntPtr unknown)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
#endif
|
||||
|
||||
[MonoTODO]
|
||||
[Obsolete ("This method has been deprecated")]
|
||||
public static IntPtr GetUnmanagedThunkForManagedMethodPtr (IntPtr pfnMethodToWrap, IntPtr pbSignature, int cbSignature)
|
||||
@ -667,16 +690,6 @@ namespace System.Runtime.InteropServices
|
||||
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]
|
||||
public static bool IsTypeVisibleFromCom (Type t)
|
||||
{
|
||||
@ -688,6 +701,31 @@ namespace System.Runtime.InteropServices
|
||||
{
|
||||
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
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
@ -950,16 +988,22 @@ namespace System.Runtime.InteropServices
|
||||
#if !FULL_AOT_RUNTIME
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
private extern static int ReleaseComObjectInternal (object co);
|
||||
#endif
|
||||
|
||||
public static int ReleaseComObject (object o)
|
||||
{
|
||||
#if FULL_AOT_RUNTIME
|
||||
throw new PlatformNotSupportedException ();
|
||||
#else
|
||||
if (o == null)
|
||||
throw new ArgumentException ("Value cannot be null.", "o");
|
||||
if (!IsComObject (o))
|
||||
throw new ArgumentException ("Value must be a Com object.", "o");
|
||||
return ReleaseComObjectInternal (o);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !FULL_AOT_RUNTIME
|
||||
[Obsolete]
|
||||
[MonoTODO]
|
||||
public static void ReleaseThreadCache()
|
||||
@ -1630,13 +1674,11 @@ namespace System.Runtime.InteropServices
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !FULL_AOT_RUNTIME
|
||||
public static int FinalReleaseComObject (object o)
|
||||
{
|
||||
while (ReleaseComObject (o) != 0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
private static extern Delegate GetDelegateForFunctionPointerInternal (IntPtr ptr, Type t);
|
||||
|
@ -260,6 +260,15 @@ namespace MonoTests.System.Runtime.InteropServices
|
||||
}
|
||||
}
|
||||
#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
|
||||
public void StringToHGlobalUni ()
|
||||
{
|
||||
|
@ -1057,24 +1057,21 @@ namespace MonoTests.System.Threading.Tasks
|
||||
var token = source.Token;
|
||||
var evt = new ManualResetEventSlim ();
|
||||
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);
|
||||
|
||||
source.Cancel();
|
||||
evt.Set ();
|
||||
task.Wait (100);
|
||||
Assert.IsTrue (task.Wait (2000), "#2");
|
||||
try {
|
||||
cont.Wait (100);
|
||||
} catch (Exception ex) {
|
||||
thrown = true;
|
||||
Assert.IsFalse (cont.Wait (4000), "#3");
|
||||
} catch (AggregateException ex) {
|
||||
}
|
||||
|
||||
Assert.IsTrue (task.IsCompleted);
|
||||
Assert.IsTrue (cont.IsCanceled);
|
||||
Assert.IsFalse (result);
|
||||
Assert.IsTrue (thrown);
|
||||
Assert.IsTrue (task.IsCompleted, "#4");
|
||||
Assert.IsTrue (cont.IsCanceled, "#5");
|
||||
Assert.IsFalse (result, "#6");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -64,21 +64,13 @@ namespace System.Threading
|
||||
[SecuritySafeCritical]
|
||||
get
|
||||
{
|
||||
#if MONO
|
||||
throw new NotImplementedException ();
|
||||
#else
|
||||
object obj = ExecutionContext.GetLocalValue(this);
|
||||
return (obj == null) ? default(T) : (T)obj;
|
||||
#endif
|
||||
}
|
||||
[SecuritySafeCritical]
|
||||
set
|
||||
{
|
||||
#if MONO
|
||||
throw new NotImplementedException ();
|
||||
#else
|
||||
ExecutionContext.SetLocalValue(this, value, m_valueChangedHandler != null);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
0c5ef03337e59385daaf2228b3602c0d70f132ac
|
||||
a03412e4144d551461b4f8b21d25f3258a2ec5f1
|
@ -1 +1 @@
|
||||
45f2e6ab0ada965bc6c4dc56f52568cd0359cc6b
|
||||
8ad53def268a4750474dee2731ef4039642458aa
|
@ -1 +1 @@
|
||||
b0e49e89c4b7142b252ffb56d7ba8e094bf4b545
|
||||
4ed6e201e6785a6e9e44a113d2be4c9fd569673c
|
@ -1 +1 @@
|
||||
505251ddf7c1902e9323cdc7755ca109aa15ab5e
|
||||
9d728aa18a9d89c58a94469c86f374658f784ccd
|
@ -645,10 +645,7 @@ namespace System.Runtime.InteropServices{
|
||||
#endif
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = false)]
|
||||
[System.Runtime.InteropServices.ComVisible(true)]
|
||||
#if !MONOTOUCH
|
||||
public
|
||||
#endif
|
||||
sealed class ComImportAttribute : Attribute
|
||||
public sealed class ComImportAttribute : Attribute
|
||||
{
|
||||
internal static Attribute GetCustomAttribute(RuntimeType type)
|
||||
{
|
||||
|
@ -12,7 +12,7 @@
|
||||
**
|
||||
**
|
||||
=============================================================================*/
|
||||
#if !FULL_AOT_RUNTIME
|
||||
|
||||
namespace System.Runtime.InteropServices {
|
||||
|
||||
using System;
|
||||
@ -31,11 +31,15 @@ namespace System.Runtime.InteropServices {
|
||||
{
|
||||
if (obj != null)
|
||||
{
|
||||
#if FULL_AOT_RUNTIME
|
||||
throw new PlatformNotSupportedException ();
|
||||
#else
|
||||
// Make sure this guy has an IDispatch
|
||||
IntPtr pdisp = Marshal.GetIDispatchForObject(obj);
|
||||
|
||||
// If we got here without throwing an exception, the QI for IDispatch succeeded.
|
||||
Marshal.Release(pdisp);
|
||||
#endif
|
||||
}
|
||||
m_WrappedObject = obj;
|
||||
}
|
||||
@ -51,4 +55,3 @@ namespace System.Runtime.InteropServices {
|
||||
private Object m_WrappedObject;
|
||||
}
|
||||
}
|
||||
#endif
|
@ -12,7 +12,7 @@
|
||||
**
|
||||
**
|
||||
=============================================================================*/
|
||||
#if !FULL_AOT_RUNTIME
|
||||
|
||||
namespace System.Runtime.InteropServices {
|
||||
|
||||
using System;
|
||||
@ -54,4 +54,3 @@ namespace System.Runtime.InteropServices {
|
||||
private int m_ErrorCode;
|
||||
}
|
||||
}
|
||||
#endif
|
9
mcs/errors/cs0246-36.cs
Normal file
9
mcs/errors/cs0246-36.cs
Normal 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);
|
||||
}
|
@ -1595,6 +1595,15 @@ namespace Mono.CSharp {
|
||||
if (res && errors != ec.Report.Errors)
|
||||
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;
|
||||
}
|
||||
|
||||
@ -1798,6 +1807,8 @@ namespace Mono.CSharp {
|
||||
parent = storey = sm;
|
||||
}
|
||||
}
|
||||
} else if (src_block.ParametersBlock.HasReferenceToStoreyForInstanceLambdas) {
|
||||
src_block.ParametersBlock.StateMachine.AddParentStoreyReference (ec, storey);
|
||||
}
|
||||
|
||||
modifiers = storey != null ? Modifiers.INTERNAL : Modifiers.PRIVATE;
|
||||
|
@ -1 +1 @@
|
||||
02ae36b34c16802d921a2476f4a1ab3d750052c3
|
||||
2a9aa97fed0e62be46728b7c4dccb871de0ff0cc
|
@ -1 +1 @@
|
||||
ad08d02b5db754d3948bdb8ad9c4b690011c1aff
|
||||
7f54b33eeb599c16146c7adfcc0c2e12b3d5beaf
|
28
mcs/tests/test-async-88.cs
Normal file
28
mcs/tests/test-async-88.cs
Normal 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 ();
|
||||
}
|
||||
}
|
51
mcs/tests/test-async-89.cs
Normal file
51
mcs/tests/test-async-89.cs
Normal 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);
|
||||
}
|
||||
|
||||
}
|
@ -1 +1 @@
|
||||
c0e3e51ded0d42e24d7370dbaa3dccae45d71340
|
||||
720ef10c534ff81a6c9296b3f09a50987144d5a9
|
@ -263,11 +263,10 @@
|
||||
<FileWrites Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="GenerateTargetFrameworkMonikerAttribute"
|
||||
<Target Name="_GenerateTargetFrameworkMonikerAttribute"
|
||||
DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths"
|
||||
Inputs="$(MSBuildToolsPath)\Microsoft.Common.targets"
|
||||
Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)"
|
||||
Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
|
||||
Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)">
|
||||
|
||||
<WriteLinesToFile
|
||||
File="$(TargetFrameworkMonikerAssemblyAttributesPath)"
|
||||
@ -276,6 +275,11 @@
|
||||
ContinueOnError="true"
|
||||
Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''"
|
||||
/>
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateTargetFrameworkMonikerAttribute"
|
||||
DependsOnTargets="_GenerateTargetFrameworkMonikerAttribute"
|
||||
Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
|
||||
|
||||
<ItemGroup Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''">
|
||||
<Compile Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/>
|
||||
|
@ -265,11 +265,10 @@
|
||||
<FileWrites Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="GenerateTargetFrameworkMonikerAttribute"
|
||||
<Target Name="_GenerateTargetFrameworkMonikerAttribute"
|
||||
DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths"
|
||||
Inputs="$(MSBuildToolsPath)\Microsoft.Common.targets"
|
||||
Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)"
|
||||
Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
|
||||
Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)">
|
||||
|
||||
<WriteLinesToFile
|
||||
File="$(TargetFrameworkMonikerAssemblyAttributesPath)"
|
||||
@ -278,6 +277,11 @@
|
||||
ContinueOnError="true"
|
||||
Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''"
|
||||
/>
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateTargetFrameworkMonikerAttribute"
|
||||
DependsOnTargets="_GenerateTargetFrameworkMonikerAttribute"
|
||||
Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
|
||||
|
||||
<ItemGroup Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''">
|
||||
<Compile Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/>
|
||||
|
@ -263,11 +263,10 @@
|
||||
<FileWrites Include="$(TargetFrameworkMonikerAssemblyAttributesPath)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="GenerateTargetFrameworkMonikerAttribute"
|
||||
<Target Name="_GenerateTargetFrameworkMonikerAttribute"
|
||||
DependsOnTargets="PrepareForBuild;GetReferenceAssemblyPaths"
|
||||
Inputs="$(MSBuildToolsPath)\Microsoft.Common.targets"
|
||||
Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)"
|
||||
Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
|
||||
Outputs="$(TargetFrameworkMonikerAssemblyAttributesPath)">
|
||||
|
||||
<WriteLinesToFile
|
||||
File="$(TargetFrameworkMonikerAssemblyAttributesPath)"
|
||||
@ -276,6 +275,11 @@
|
||||
ContinueOnError="true"
|
||||
Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''"
|
||||
/>
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateTargetFrameworkMonikerAttribute"
|
||||
DependsOnTargets="_GenerateTargetFrameworkMonikerAttribute"
|
||||
Condition="'$(GenerateTargetFrameworkAttribute)' == 'true'">
|
||||
|
||||
<ItemGroup Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''">
|
||||
<Compile Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user