Merge branch 'upstream'
Former-commit-id: 4786fcbccd49cb9d52ed0c707d5cf51423d266a9
This commit is contained in:
commit
1351deddac
@ -1 +1 @@
|
||||
2d6bcb46584f03dd01cd55dd2a04c15b4a6a5fec
|
||||
047d2af192055dda39f35c668102b5948e87c44b
|
@ -1 +1 @@
|
||||
b0b5573ff57c299411be9915864eaa21d4933c2d
|
||||
2517961607b5dcd9778743fe589d6ff7f167a776
|
@ -59,7 +59,7 @@ namespace System.Security.Cryptography {
|
||||
public const string Sha512 = "SHA512"; // BCRYPT_SHA512_ALGORITHM
|
||||
internal const string Rsa = "RSA"; // BCRYPT_RSA_ALGORITHM
|
||||
}
|
||||
|
||||
#if !MONO
|
||||
/// <summary>
|
||||
/// Well known key blob tyes
|
||||
/// </summary>
|
||||
@ -454,5 +454,6 @@ namespace System.Security.Cryptography {
|
||||
}
|
||||
return keyBlob;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,10 @@ namespace System.Security.Cryptography {
|
||||
/// </summary>
|
||||
[System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
|
||||
public sealed class CngKey : IDisposable {
|
||||
#if MONO
|
||||
public void Dispose() {
|
||||
}
|
||||
#else
|
||||
private SafeNCryptKeyHandle m_keyHandle;
|
||||
private SafeNCryptProviderHandle m_kspHandle;
|
||||
|
||||
@ -816,5 +820,6 @@ namespace System.Security.Cryptography {
|
||||
Contract.Assert(m_keyHandle != null);
|
||||
NCryptNative.SetProperty(m_keyHandle, property.Name, property.Value, property.Options);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,15 @@ namespace System.Security.Cryptography {
|
||||
/// </summary>
|
||||
[System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
|
||||
public sealed class ECDsaCng : ECDsa {
|
||||
#if MONO
|
||||
public override byte[] SignHash(byte[] hash) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override bool VerifyHash(byte[] hash, byte[] signature) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
#else
|
||||
private static KeySizes[] s_legalKeySizes = new KeySizes[] { new KeySizes(256, 384, 128), new KeySizes(521, 521, 0) };
|
||||
|
||||
private CngKey m_key;
|
||||
@ -407,5 +416,6 @@ namespace System.Security.Cryptography {
|
||||
return hasher.HashFinal();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,9 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#if !MONO
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.ConstrainedExecution;
|
||||
using System.Runtime.InteropServices;
|
||||
@ -100,7 +102,7 @@ namespace System.Security.Cryptography {
|
||||
ProtectKey = 0x00000001, // NCRYPT_UI_PROTECT_KEY_FLAG
|
||||
ForceHighProtection = 0x00000002 // NCRYPT_UI_FORCE_HIGH_PROTECTION_FLAG
|
||||
}
|
||||
|
||||
#if !MONO
|
||||
/// <summary>
|
||||
/// Native interop with CNG's NCrypt layer. Native definitions are in ncrypt.h
|
||||
/// </summary>
|
||||
@ -1741,4 +1743,5 @@ namespace System.Security.Cryptography {
|
||||
return error == ErrorCode.Success;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -10,6 +10,18 @@ namespace System.Security.Cryptography
|
||||
{
|
||||
public sealed class RSACng : RSA
|
||||
{
|
||||
#if MONO
|
||||
public override RSAParameters ExportParameters(bool includePrivateParameters)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override void ImportParameters(RSAParameters parameters)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
#else
|
||||
|
||||
// See https://msdn.microsoft.com/en-us/library/windows/desktop/bb931354(v=vs.85).aspx
|
||||
private static KeySizes[] s_legalKeySizes = new KeySizes[] { new KeySizes(512, 16384, 64) };
|
||||
|
||||
@ -504,5 +516,6 @@ namespace System.Security.Cryptography
|
||||
throw new CryptographicException(SR.GetString(SR.Cryptography_UnsupportedPaddingMode));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -42,10 +42,11 @@ namespace Microsoft.Win32.SafeHandles {
|
||||
SetHandle(existingHandle);
|
||||
}
|
||||
|
||||
#if !MONO
|
||||
[DllImport(ExternDll.Kernel32, CharSet=System.Runtime.InteropServices.CharSet.Auto, SetLastError=true)]
|
||||
[ResourceExposure(ResourceScope.Machine)]
|
||||
internal static extern SafeProcessHandle OpenProcess(int access, bool inherit, int processId);
|
||||
|
||||
#endif
|
||||
|
||||
internal void InitialSetHandle(IntPtr h){
|
||||
Debug.Assert(base.IsInvalid, "Safe handle should only be set once");
|
||||
@ -54,7 +55,11 @@ namespace Microsoft.Win32.SafeHandles {
|
||||
|
||||
override protected bool ReleaseHandle()
|
||||
{
|
||||
#if !MONO
|
||||
return SafeNativeMethods.CloseHandle(handle);
|
||||
#else
|
||||
return NativeMethods.CloseProcess (handle);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ static class Consts
|
||||
// Use these assembly version constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string MonoVersion = "4.4.1.0";
|
||||
public const string MonoVersion = "4.4.2.0";
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
|
@ -28,7 +28,7 @@ include $(MCS_BUILD_DIR)/rules.make
|
||||
|
||||
dist-local: dist-default
|
||||
|
||||
DIST_SUBDIRS = $(net_4_x_PARALLEL_SUBDIRS)
|
||||
DIST_SUBDIRS = $(net_4_x_PARALLEL_SUBDIRS) $(net_4_x_SUBDIRS) $(mobile_only_SUBDIRS)
|
||||
DISTFILES=subdirs.make
|
||||
|
||||
doc-update-local:
|
||||
@ -37,4 +37,7 @@ doc-update-local:
|
||||
doc-update-recursive:
|
||||
@echo "do not recurse the Facades folder"
|
||||
|
||||
System System.Core System.ComponentModel.DataAnnotations System.Numerics System.Runtime.Serialization System.XML System.ComponentModel.Composition System.ServiceModel System.Xml.Linq:
|
||||
System System.Core System.ComponentModel.DataAnnotations System.Numerics System.Runtime.Serialization System.XML \
|
||||
System.ComponentModel.Composition System.ServiceModel System.Xml.Linq System.Data System.IO.Compression.FileSystem \
|
||||
System.ServiceProcess System.Security System.Net.Http.WebRequest System.Net.Http:
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
||||
../../../build/common/MonoTODOAttribute.cs
|
||||
RegistryAclExtensions.cs
|
||||
|
@ -0,0 +1,57 @@
|
||||
//
|
||||
// RegistryAclExtensions.cs
|
||||
//
|
||||
// Author:
|
||||
// Alexander Köplinger (alexander.koeplinger@xamarin.com)
|
||||
//
|
||||
// (C) 2016 Xamarin, Inc.
|
||||
//
|
||||
|
||||
//
|
||||
// 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.Security;
|
||||
using System.Security.AccessControl;
|
||||
|
||||
namespace Microsoft.Win32
|
||||
{
|
||||
public static class RegistryAclExtensions
|
||||
{
|
||||
[MonoTODO]
|
||||
public static RegistrySecurity GetAccessControl (this RegistryKey key)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static RegistrySecurity GetAccessControl (this RegistryKey key, AccessControlSections includeSections)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static void SetAccessControl (this RegistryKey key, RegistrySecurity registrySecurity)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
@ -23,4 +23,3 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.RegistryAccessRule))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.RegistryAuditRule))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.RegistrySecurity))]
|
||||
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryAclExtensions))]
|
||||
|
@ -20,13 +20,11 @@
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if !MOBILE
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.Registry))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryHive))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryKey))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryValueKind))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryValueOptions))]
|
||||
#endif
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryOptions))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.RegistryView))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeRegistryHandle))]
|
||||
|
@ -20,9 +20,27 @@
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.BrowsableAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CategoryAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ComponentCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DescriptionAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DesignOnlyAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DesignerCategoryAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DesignerSerializationVisibility))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DesignerSerializationVisibilityAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DisplayNameAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EventHandlerList))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.IComponent))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.IContainer))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ISite))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ImmutableObjectAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.InitializationEventAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.LocalizableAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.MergablePropertyAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.NotifyParentPropertyAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ParenthesizePropertyNameAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ReadOnlyAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.RefreshProperties))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.RefreshPropertiesAttribute))]
|
||||
|
||||
|
||||
|
@ -21,34 +21,61 @@
|
||||
//
|
||||
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ArrayConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.AttributeCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.AttributeProviderAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.BaseNumberConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.BooleanConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ByteConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CancelEventHandler))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CharConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CollectionChangeAction))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CollectionChangeEventArgs))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CollectionChangeEventHandler))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CollectionConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CustomTypeDescriptor))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DateTimeConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DateTimeOffsetConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DecimalConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DefaultEventAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DefaultPropertyAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DoubleConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EnumConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EventDescriptor))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EventDescriptorCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ExtenderProvidedPropertyAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.GuidConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.HandledEventArgs))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.HandledEventHandler))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ICustomTypeDescriptor))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.IExtenderProvider))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.IListSource))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ITypeDescriptorContext))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ITypedList))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.Int16Converter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.Int32Converter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.Int64Converter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ITypeDescriptorContext))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.InvalidAsynchronousStateException))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.MemberDescriptor))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.MultilineStringConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.NullableConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.PropertyDescriptor))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.PropertyDescriptorCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.ProvidePropertyAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.RefreshEventArgs))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.RefreshEventHandler))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.SByteConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.SingleConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.StringConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TimeSpanConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeConverterAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeDescriptionProvider))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeDescriptionProviderAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeDescriptor))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.TypeListConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.UInt16Converter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.UInt32Converter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.UInt64Converter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UriTypeConverter))]
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleCancelEventArgs))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleCancelEventHandler))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleColor))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleKey))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleKeyInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleModifiers))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ConsoleSpecialKey))]
|
||||
|
||||
|
||||
|
64
mcs/class/Facades/System.Data.Common/DbColumn.cs
Normal file
64
mcs/class/Facades/System.Data.Common/DbColumn.cs
Normal file
@ -0,0 +1,64 @@
|
||||
//
|
||||
// DbColumn.cs
|
||||
//
|
||||
// Authors:
|
||||
// Marek Safar <marek.safar@gmail.com>
|
||||
//
|
||||
// Copyright (C) 2016 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.Collections.Generic;
|
||||
|
||||
namespace System.Data.Common
|
||||
{
|
||||
public abstract class DbColumn
|
||||
{
|
||||
public bool? AllowDBNull { get; protected set; }
|
||||
public string BaseCatalogName { get; protected set; }
|
||||
public string BaseColumnName { get; protected set; }
|
||||
public string BaseSchemaName { get; protected set; }
|
||||
public string BaseServerName { get; protected set; }
|
||||
public string BaseTableName { get; protected set; }
|
||||
public string ColumnName { get; protected set; }
|
||||
public int? ColumnOrdinal { get; protected set; }
|
||||
public int? ColumnSize { get; protected set; }
|
||||
public bool? IsAliased { get; protected set; }
|
||||
public bool? IsAutoIncrement { get; protected set; }
|
||||
public bool? IsExpression { get; protected set; }
|
||||
public bool? IsHidden { get; protected set; }
|
||||
public bool? IsIdentity { get; protected set; }
|
||||
public bool? IsKey { get; protected set; }
|
||||
public bool? IsLong { get; protected set; }
|
||||
public bool? IsReadOnly { get; protected set; }
|
||||
public bool? IsUnique { get; protected set; }
|
||||
public int? NumericPrecision { get; protected set; }
|
||||
public int? NumericScale { get; protected set; }
|
||||
public string UdtAssemblyQualifiedName { get; protected set; }
|
||||
public Type DataType { get; protected set; }
|
||||
public string DataTypeName { get; protected set; }
|
||||
public virtual object this[string property] {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System.Data.Common
|
||||
{
|
||||
|
||||
internal class DataRowDbColumn : DbColumn
|
||||
{
|
||||
private DataColumnCollection schemaColumns;
|
||||
private DataRow schemaRow;
|
||||
|
||||
public DataRowDbColumn(DataRow readerSchemaRow, DataColumnCollection readerSchemaColumns)
|
||||
{
|
||||
this.schemaRow = readerSchemaRow;
|
||||
this.schemaColumns = readerSchemaColumns;
|
||||
populateFields();
|
||||
}
|
||||
|
||||
private void populateFields()
|
||||
{
|
||||
AllowDBNull = GetDbColumnValue<bool?>(SchemaTableColumn.AllowDBNull);
|
||||
BaseCatalogName = GetDbColumnValue<string>(SchemaTableOptionalColumn.BaseCatalogName);
|
||||
BaseColumnName = GetDbColumnValue<string>(SchemaTableColumn.BaseColumnName);
|
||||
BaseSchemaName = GetDbColumnValue<string>(SchemaTableColumn.BaseSchemaName);
|
||||
BaseServerName = GetDbColumnValue<string>(SchemaTableOptionalColumn.BaseServerName);
|
||||
BaseTableName = GetDbColumnValue<string>(SchemaTableColumn.BaseTableName);
|
||||
ColumnName = GetDbColumnValue<string>(SchemaTableColumn.ColumnName);
|
||||
ColumnOrdinal = GetDbColumnValue<int?>(SchemaTableColumn.ColumnOrdinal);
|
||||
ColumnSize = GetDbColumnValue<int?>(SchemaTableColumn.ColumnSize);
|
||||
IsAliased = GetDbColumnValue<bool?>(SchemaTableColumn.IsAliased);
|
||||
IsAutoIncrement = GetDbColumnValue<bool?>(SchemaTableOptionalColumn.IsAutoIncrement);
|
||||
IsExpression = GetDbColumnValue<bool>(SchemaTableColumn.IsExpression);
|
||||
IsHidden = GetDbColumnValue<bool?>(SchemaTableOptionalColumn.IsHidden);
|
||||
IsIdentity = GetDbColumnValue<bool?>("IsIdentity");
|
||||
IsKey = GetDbColumnValue<bool?>(SchemaTableColumn.IsKey);
|
||||
IsLong = GetDbColumnValue<bool?>(SchemaTableColumn.IsLong);
|
||||
IsReadOnly = GetDbColumnValue<bool?>(SchemaTableOptionalColumn.IsReadOnly);
|
||||
IsUnique = GetDbColumnValue<bool?>(SchemaTableColumn.IsUnique);
|
||||
NumericPrecision = GetDbColumnValue<int?>(SchemaTableColumn.NumericPrecision);
|
||||
NumericScale = GetDbColumnValue<int?>(SchemaTableColumn.NumericScale);
|
||||
UdtAssemblyQualifiedName = GetDbColumnValue<string>("UdtAssemblyQualifiedName");
|
||||
DataType = GetDbColumnValue<Type>(SchemaTableColumn.DataType);
|
||||
DataTypeName = GetDbColumnValue<string>("DataTypeName");
|
||||
}
|
||||
|
||||
private T GetDbColumnValue<T>(string columnName)
|
||||
{
|
||||
if (!schemaColumns.Contains(columnName))
|
||||
{
|
||||
return default(T);
|
||||
}
|
||||
object schemaObject = schemaRow[columnName];
|
||||
if (schemaObject is T)
|
||||
{
|
||||
return (T)schemaObject;
|
||||
}
|
||||
return default(T);
|
||||
}
|
||||
}
|
||||
|
||||
public static class DbDataReaderExtensions
|
||||
{
|
||||
public static System.Collections.ObjectModel.ReadOnlyCollection<DbColumn> GetColumnSchema(this DbDataReader reader)
|
||||
{
|
||||
IList<DbColumn> columnSchema = new List<DbColumn>();
|
||||
DataTable schemaTable = reader.GetSchemaTable();
|
||||
DataColumnCollection schemaTableColumns = schemaTable.Columns;
|
||||
foreach (DataRow row in schemaTable.Rows)
|
||||
{
|
||||
DbColumn dbColumn = new DataRowDbColumn(row, schemaTableColumns);
|
||||
columnSchema.Add(dbColumn);
|
||||
}
|
||||
System.Collections.ObjectModel.ReadOnlyCollection<DbColumn> readOnlyColumnSchema = new System.Collections.ObjectModel.ReadOnlyCollection<DbColumn>(columnSchema);
|
||||
return readOnlyColumnSchema;
|
||||
}
|
||||
|
||||
public static bool CanGetColumnSchema(this DbDataReader reader)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
//
|
||||
// IDbColumnSchemaGenerator.cs
|
||||
//
|
||||
// Authors:
|
||||
// Marek Safar <marek.safar@gmail.com>
|
||||
//
|
||||
// Copyright (C) 2016 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.
|
||||
//
|
||||
|
||||
namespace System.Data.Common
|
||||
{
|
||||
public interface IDbColumnSchemaGenerator
|
||||
{
|
||||
System.Collections.ObjectModel.ReadOnlyCollection<DbColumn> GetColumnSchema();
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@ LIBRARY = System.Data.Common.dll
|
||||
|
||||
KEY_FILE = ../../msfinal.pub
|
||||
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System
|
||||
LIB_REFS = System System.Xml
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.Data.dll
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
@ -1,3 +1,5 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
||||
IDbColumnSchemaGenerator.cs
|
||||
DbColumn.cs
|
||||
DbDataReaderExtensions.Facade.cs
|
||||
|
@ -20,24 +20,36 @@
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DBNull))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.CommandBehavior))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.CommandType))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbCommand))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbConnection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbConnectionStringBuilder))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbDataReader))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbDataRecord))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbEnumerator))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbException))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbParameter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbParameterCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbProviderFactory))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbTransaction))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.ConnectionState))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataRowVersion))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataTable))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DbType))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataParameter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataParameterCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataReader))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataRecord))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbCommand))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbConnection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbDataParameter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbTransaction))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IsolationLevel))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.ParameterDirection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.StateChangeEventArgs))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.StateChangeEventHandler))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.UpdateRowSource))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DBNull))]
|
||||
|
||||
|
||||
|
@ -24,6 +24,10 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.SqlServer.Server.SqlMetaData))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.ApplicationIntent))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SortOrder))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopy))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopyColumnMapping))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopyColumnMappingCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopyOptions))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlClientFactory))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlCommand))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlConnection))]
|
||||
@ -36,6 +40,8 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlInfoMessageEventHandler))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlParameter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlParameterCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlRowsCopiedEventArgs))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlRowsCopiedEventHandler))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlTransaction))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlDbType))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.INullable))]
|
||||
|
@ -20,7 +20,7 @@
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
// TODO: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeProcessHandle))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(Microsoft.Win32.SafeHandles.SafeProcessHandle))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.DataReceivedEventArgs))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.DataReceivedEventHandler))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Process))]
|
||||
|
@ -0,0 +1,61 @@
|
||||
//
|
||||
// StackFrameExtensions.cs
|
||||
//
|
||||
// Author:
|
||||
// Alexander Köplinger (alexander.koeplinger@xamarin.com)
|
||||
//
|
||||
// (C) 2016 Xamarin, Inc.
|
||||
//
|
||||
|
||||
//
|
||||
// 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;
|
||||
|
||||
namespace System.Diagnostics
|
||||
{
|
||||
public static class StackFrameExtensions
|
||||
{
|
||||
[MonoTODO]
|
||||
public static bool HasNativeImage (this StackFrame stackFrame)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static bool HasMethod (this StackFrame stackFrame)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static bool HasILOffset (this StackFrame stackFrame)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static bool HasSource (this StackFrame stackFrame)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
||||
../../../build/common/MonoTODOAttribute.cs
|
||||
StackFrameExtensions.cs
|
||||
|
@ -22,5 +22,4 @@
|
||||
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.StackFrame))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.StackTrace))]
|
||||
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.StackFrameExtensions))]
|
||||
|
||||
|
41
mcs/class/Facades/System.Diagnostics.Tracing/EventCounter.cs
Normal file
41
mcs/class/Facades/System.Diagnostics.Tracing/EventCounter.cs
Normal file
@ -0,0 +1,41 @@
|
||||
//
|
||||
// EventCounter.cs
|
||||
//
|
||||
// Authors:
|
||||
// Marek Safar <marek.safar@gmail.com>
|
||||
//
|
||||
// Copyright (C) 2016 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.
|
||||
//
|
||||
|
||||
namespace System.Diagnostics.Tracing
|
||||
{
|
||||
public class EventCounter
|
||||
{
|
||||
public EventCounter (string name, EventSource eventSource)
|
||||
{
|
||||
}
|
||||
|
||||
public void WriteMetric (float value)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
||||
EventCounter.cs
|
||||
|
@ -20,16 +20,27 @@
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventActivityOptions))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventChannel))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventCommand))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventCommandEventArgs))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventDataAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventFieldAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventFieldFormat))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventFieldTags))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventIgnoreAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventKeywords))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventLevel))]
|
||||
//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventListener))]
|
||||
//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventOpcode))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventListener))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventManifestOptions))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventOpcode))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSource))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceAttribute))]
|
||||
//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceException))]
|
||||
//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventTask))]
|
||||
//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventWrittenEventArgs))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceException))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceOptions))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventSourceSettings))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventTags))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventTask))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventWrittenEventArgs))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.NonEventAttribute))]
|
||||
|
39
mcs/class/Facades/System.Drawing.Primitives/AssemblyInfo.cs
Normal file
39
mcs/class/Facades/System.Drawing.Primitives/AssemblyInfo.cs
Normal file
@ -0,0 +1,39 @@
|
||||
//
|
||||
// Copyright (c) 2013 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.Drawing.Primitives.dll")]
|
||||
[assembly: AssemblyDescription ("System.Drawing.Primitives.dll")]
|
||||
[assembly: AssemblyDefaultAlias ("System.Drawing.Primitives.dll")]
|
||||
[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: AssemblyInformationalVersion ("4.0.0.0")]
|
||||
[assembly: AssemblyFileVersion ("4.0.0.0")]
|
||||
[assembly: AssemblyDelaySign (true)]
|
||||
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
|
||||
|
||||
[assembly: ReferenceAssembly]
|
27
mcs/class/Facades/System.Drawing.Primitives/Makefile
Normal file
27
mcs/class/Facades/System.Drawing.Primitives/Makefile
Normal file
@ -0,0 +1,27 @@
|
||||
MCS_BUILD_DIR = ../../../build
|
||||
|
||||
thisdir = class/Facades/System.Drawing.Primitives
|
||||
SUBDIRS =
|
||||
include $(MCS_BUILD_DIR)/rules.make
|
||||
|
||||
LIBRARY_SUBDIR = Facades
|
||||
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
|
||||
|
||||
LIBRARY = System.Drawing.Primitives.dll
|
||||
|
||||
KEY_FILE = ../../msfinal.pub
|
||||
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
ifneq (2.1, $(FRAMEWORK_VERSION))
|
||||
ifndef XAMMAC_4_5
|
||||
LIB_REFS += System.Drawing
|
||||
endif
|
||||
endif
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
@ -0,0 +1,2 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
@ -0,0 +1,28 @@
|
||||
//
|
||||
// Copyright (c) 2016 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.Drawing.Point))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.PointF))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Rectangle))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.RectangleF))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Size))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SizeF))]
|
@ -0,0 +1,8 @@
|
||||
AssemblyInfo.cs
|
||||
|
||||
../../System.Drawing/System.Drawing/Point.cs
|
||||
../../System.Drawing/System.Drawing/PointF.cs
|
||||
../../System.Drawing/System.Drawing/Rectangle.cs
|
||||
../../System.Drawing/System.Drawing/RectangleF.cs
|
||||
../../System.Drawing/System.Drawing/Size.cs
|
||||
../../System.Drawing/System.Drawing/SizeF.cs
|
@ -0,0 +1 @@
|
||||
#include mobile_System.Drawing.Primitives.dll.sources
|
@ -0,0 +1 @@
|
||||
#include mobile_System.Drawing.Primitives.dll.sources
|
@ -0,0 +1 @@
|
||||
#include mobile_System.Drawing.Primitives.dll.sources
|
@ -0,0 +1 @@
|
||||
#include mobile_System.Drawing.Primitives.dll.sources
|
@ -0,0 +1 @@
|
||||
#include mobile_System.Drawing.Primitives.dll.sources
|
@ -0,0 +1 @@
|
||||
#include mobile_System.Drawing.Primitives.dll.sources
|
@ -0,0 +1 @@
|
||||
#include mobile_System.Drawing.Primitives.dll.sources
|
@ -0,0 +1,98 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Contracts;
|
||||
|
||||
namespace System.Globalization
|
||||
{
|
||||
public static class GlobalizationExtensions
|
||||
{
|
||||
public static StringComparer GetStringComparer(this CompareInfo compareInfo, CompareOptions options)
|
||||
{
|
||||
if (compareInfo == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(compareInfo));
|
||||
}
|
||||
|
||||
if (options == CompareOptions.Ordinal)
|
||||
{
|
||||
return StringComparer.Ordinal;
|
||||
}
|
||||
|
||||
if (options == CompareOptions.OrdinalIgnoreCase)
|
||||
{
|
||||
return StringComparer.OrdinalIgnoreCase;
|
||||
}
|
||||
|
||||
if ((options & CultureAwareComparer.ValidCompareMaskOffFlags) != 0)
|
||||
{
|
||||
throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
|
||||
}
|
||||
|
||||
return new CultureAwareComparer(compareInfo, options);
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class CultureAwareComparer : StringComparer
|
||||
{
|
||||
internal const CompareOptions ValidCompareMaskOffFlags =
|
||||
~(CompareOptions.IgnoreCase | CompareOptions.IgnoreSymbols | CompareOptions.IgnoreNonSpace |
|
||||
CompareOptions.IgnoreWidth | CompareOptions.IgnoreKanaType | CompareOptions.StringSort);
|
||||
|
||||
private readonly CompareInfo _compareInfo;
|
||||
private readonly CompareOptions _options;
|
||||
|
||||
internal CultureAwareComparer(CompareInfo compareInfo, CompareOptions options)
|
||||
{
|
||||
Debug.Assert((options & ValidCompareMaskOffFlags) == 0);
|
||||
_compareInfo = compareInfo;
|
||||
_options = options;
|
||||
}
|
||||
|
||||
public override int Compare(string x, string y)
|
||||
{
|
||||
if (Object.ReferenceEquals(x, y)) return 0;
|
||||
if (x == null) return -1;
|
||||
if (y == null) return 1;
|
||||
return _compareInfo.Compare(x, y, _options);
|
||||
}
|
||||
|
||||
public override bool Equals(string x, string y)
|
||||
{
|
||||
if (Object.ReferenceEquals(x, y)) return true;
|
||||
if (x == null || y == null) return false;
|
||||
|
||||
return (_compareInfo.Compare(x, y, _options) == 0);
|
||||
}
|
||||
|
||||
public override int GetHashCode(string obj)
|
||||
{
|
||||
if (obj == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(obj));
|
||||
}
|
||||
Contract.EndContractBlock();
|
||||
|
||||
// StringSort used in compare operation and not with the hashing
|
||||
return _compareInfo.GetHashCode(obj, _options & (~CompareOptions.StringSort));
|
||||
}
|
||||
|
||||
// Equals method for the comparer itself.
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
CultureAwareComparer comparer = obj as CultureAwareComparer;
|
||||
return
|
||||
comparer != null &&
|
||||
_options == comparer._options &&
|
||||
_compareInfo.Equals(comparer._compareInfo);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return _compareInfo.GetHashCode() ^ ((int)_options & 0x7FFFFFFF);
|
||||
}
|
||||
}
|
||||
}
|
4
mcs/class/Facades/System.Globalization.Extensions/SR.cs
Normal file
4
mcs/class/Facades/System.Globalization.Extensions/SR.cs
Normal file
@ -0,0 +1,4 @@
|
||||
partial class SR
|
||||
{
|
||||
public const string Argument_InvalidFlag = "Value of flags is invalid.";
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
//
|
||||
// StringNormalizationExtensions.cs
|
||||
//
|
||||
// Author:
|
||||
// Alexander Köplinger (alexander.koeplinger@xamarin.com)
|
||||
//
|
||||
// (C) 2016 Xamarin, Inc.
|
||||
//
|
||||
|
||||
//
|
||||
// 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.Text;
|
||||
|
||||
namespace System
|
||||
{
|
||||
public static class StringNormalizationExtensions
|
||||
{
|
||||
[MonoTODO]
|
||||
public static bool IsNormalized(this string value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static bool IsNormalized(this string value, NormalizationForm normalizationForm)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static String Normalize(this string value)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static String Normalize(this string value, NormalizationForm normalizationForm)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,7 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
||||
../../../build/common/MonoTODOAttribute.cs
|
||||
SR.cs
|
||||
GlobalizationExtensions.cs
|
||||
StringNormalizationExtensions.cs
|
||||
|
@ -22,5 +22,3 @@
|
||||
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.IdnMapping))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.NormalizationForm))]
|
||||
// Missing: [assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.GlobalizationExtensions))]
|
||||
// Missing: [assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.StringNormalizationExtensions))]
|
||||
|
41
mcs/class/Facades/System.IO.Compression/AssemblyInfo.cs
Normal file
41
mcs/class/Facades/System.IO.Compression/AssemblyInfo.cs
Normal file
@ -0,0 +1,41 @@
|
||||
//
|
||||
// Copyright (c) 2016 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.IO.Compression.dll")]
|
||||
[assembly: AssemblyDescription ("System.IO.Compression.dll")]
|
||||
[assembly: AssemblyDefaultAlias ("System.IO.Compression.dll")]
|
||||
[assembly: AssemblyCompany ("Xamarin, Inc.")]
|
||||
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
|
||||
[assembly: AssemblyCopyright ("Copyright (c) 2016 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")]
|
||||
|
||||
[assembly: ReferenceAssembly]
|
||||
|
||||
|
23
mcs/class/Facades/System.IO.Compression/Makefile
Normal file
23
mcs/class/Facades/System.IO.Compression/Makefile
Normal file
@ -0,0 +1,23 @@
|
||||
MCS_BUILD_DIR = ../../../build
|
||||
|
||||
thisdir = class/Facades/System.IO.Compression
|
||||
SUBDIRS =
|
||||
include $(MCS_BUILD_DIR)/rules.make
|
||||
|
||||
LIBRARY_SUBDIR = Facades
|
||||
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
|
||||
|
||||
LIBRARY = System.IO.Compression.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
|
||||
|
||||
|
40
mcs/class/Facades/System.IO.Compression/Missing.cs
Normal file
40
mcs/class/Facades/System.IO.Compression/Missing.cs
Normal file
@ -0,0 +1,40 @@
|
||||
// This is stub only. The implementation should come from https://github.com/dotnet/corefx/tree/master/src/System.IO.Compression/src/System/IO/Compression
|
||||
|
||||
namespace System.IO.Compression
|
||||
{
|
||||
public class ZipArchive : System.IDisposable
|
||||
{
|
||||
public ZipArchive(System.IO.Stream stream) { }
|
||||
public ZipArchive(System.IO.Stream stream, System.IO.Compression.ZipArchiveMode mode) { }
|
||||
public ZipArchive(System.IO.Stream stream, System.IO.Compression.ZipArchiveMode mode, bool leaveOpen) { }
|
||||
public ZipArchive(System.IO.Stream stream, System.IO.Compression.ZipArchiveMode mode, bool leaveOpen, System.Text.Encoding entryNameEncoding) { }
|
||||
public System.Collections.ObjectModel.ReadOnlyCollection<System.IO.Compression.ZipArchiveEntry> Entries { get { return default(System.Collections.ObjectModel.ReadOnlyCollection<System.IO.Compression.ZipArchiveEntry>); } }
|
||||
public System.IO.Compression.ZipArchiveMode Mode { get { return default(System.IO.Compression.ZipArchiveMode); } }
|
||||
public System.IO.Compression.ZipArchiveEntry CreateEntry(string entryName) { return default(System.IO.Compression.ZipArchiveEntry); }
|
||||
public System.IO.Compression.ZipArchiveEntry CreateEntry(string entryName, System.IO.Compression.CompressionLevel compressionLevel) { return default(System.IO.Compression.ZipArchiveEntry); }
|
||||
public void Dispose() { }
|
||||
protected virtual void Dispose(bool disposing) { }
|
||||
public System.IO.Compression.ZipArchiveEntry GetEntry(string entryName) { return default(System.IO.Compression.ZipArchiveEntry); }
|
||||
}
|
||||
|
||||
public partial class ZipArchiveEntry
|
||||
{
|
||||
internal ZipArchiveEntry() { }
|
||||
public System.IO.Compression.ZipArchive Archive { get { return default(System.IO.Compression.ZipArchive); } }
|
||||
public long CompressedLength { get { return default(long); } }
|
||||
public string FullName { get { return default(string); } }
|
||||
public System.DateTimeOffset LastWriteTime { get { return default(System.DateTimeOffset); } set { } }
|
||||
public long Length { get { return default(long); } }
|
||||
public string Name { get { return default(string); } }
|
||||
public void Delete() { }
|
||||
public System.IO.Stream Open() { return default(System.IO.Stream); }
|
||||
public override string ToString() { return default(string); }
|
||||
}
|
||||
|
||||
public enum ZipArchiveMode
|
||||
{
|
||||
Create = 1,
|
||||
Read = 0,
|
||||
Update = 2,
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
Missing.cs
|
28
mcs/class/Facades/System.IO.Compression/TypeForwarders.cs
Normal file
28
mcs/class/Facades/System.IO.Compression/TypeForwarders.cs
Normal file
@ -0,0 +1,28 @@
|
||||
//
|
||||
// Copyright (c) 2016 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.IO.Compression.CompressionLevel))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Compression.CompressionMode))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Compression.DeflateStream))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Compression.GZipStream))]
|
||||
|
||||
|
@ -0,0 +1,83 @@
|
||||
//
|
||||
// FileSystemAclExtensions.cs
|
||||
//
|
||||
// Author:
|
||||
// Alexander Köplinger (alexander.koeplinger@xamarin.com)
|
||||
//
|
||||
// (C) 2016 Xamarin, Inc.
|
||||
//
|
||||
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
|
||||
namespace System.IO
|
||||
{
|
||||
public static partial class FileSystemAclExtensions
|
||||
{
|
||||
[MonoTODO]
|
||||
public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static System.Security.AccessControl.DirectorySecurity GetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.AccessControlSections includeSections)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.AccessControlSections includeSections)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileStream fileStream)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static void SetAccessControl(this System.IO.DirectoryInfo directoryInfo, System.Security.AccessControl.DirectorySecurity directorySecurity)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static void SetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.FileSecurity fileSecurity)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static void SetAccessControl(this System.IO.FileStream fileStream, System.Security.AccessControl.FileSecurity fileSecurity)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
||||
../../../build/common/MonoTODOAttribute.cs
|
||||
FileSystemAclExtensions.cs
|
||||
|
@ -27,5 +27,3 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.FileSystemAuditRule))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.FileSystemRights))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AccessControl.FileSystemSecurity))]
|
||||
|
||||
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.FileSystemAclExtensions))]
|
||||
|
@ -29,5 +29,6 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.RenamedEventArgs))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.RenamedEventHandler))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.WatcherChangeTypes))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.WaitForChangedResult))]
|
||||
|
||||
|
||||
|
@ -35,4 +35,5 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.StringWriter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.TextReader))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.TextWriter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.BufferedStream))]
|
||||
|
||||
|
@ -64,6 +64,5 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.IQueryable))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.IQueryable<>))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.IQueryProvider))]
|
||||
|
||||
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.IArgumentProvider))]
|
||||
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.IDynamicExpression))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.IArgumentProvider))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.IDynamicExpression))]
|
||||
|
39
mcs/class/Facades/System.Net.Ping/AssemblyInfo.cs
Normal file
39
mcs/class/Facades/System.Net.Ping/AssemblyInfo.cs
Normal file
@ -0,0 +1,39 @@
|
||||
//
|
||||
// Copyright (c) 2013 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.Net.Ping.dll")]
|
||||
[assembly: AssemblyDescription ("System.Net.Ping.dll")]
|
||||
[assembly: AssemblyDefaultAlias ("System.Net.Ping.dll")]
|
||||
[assembly: AssemblyCompany ("Xamarin, Inc.")]
|
||||
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
|
||||
[assembly: AssemblyCopyright ("Copyright (c) 2016 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")]
|
||||
|
||||
[assembly: ReferenceAssembly]
|
21
mcs/class/Facades/System.Net.Ping/Makefile
Normal file
21
mcs/class/Facades/System.Net.Ping/Makefile
Normal file
@ -0,0 +1,21 @@
|
||||
MCS_BUILD_DIR = ../../../build
|
||||
|
||||
thisdir = class/Facades/System.Net.Ping
|
||||
SUBDIRS =
|
||||
include $(MCS_BUILD_DIR)/rules.make
|
||||
|
||||
LIBRARY_SUBDIR = Facades
|
||||
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
|
||||
|
||||
LIBRARY = System.Net.Ping.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
|
@ -0,0 +1,2 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
27
mcs/class/Facades/System.Net.Ping/TypeForwarders.cs
Normal file
27
mcs/class/Facades/System.Net.Ping/TypeForwarders.cs
Normal file
@ -0,0 +1,27 @@
|
||||
//
|
||||
// Copyright (c) 2016 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.Net.NetworkInformation.IPStatus))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.Ping))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.PingException))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.PingOptions))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.PingReply))]
|
@ -20,8 +20,11 @@
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.AuthenticatedStream))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.EncryptionPolicy))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.LocalCertificateSelectionCallback))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.NegotiateStream))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.ProtectionLevel))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.RemoteCertificateValidationCallback))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Security.SslStream))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Authentication.AuthenticationException))]
|
||||
@ -29,5 +32,6 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Authentication.ExtendedProtection.PolicyEnforcement))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Authentication.ExtendedProtection.ProtectionScenario))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Authentication.ExtendedProtection.ServiceNameCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Authentication.InvalidCredentialException))]
|
||||
|
||||
|
||||
|
@ -0,0 +1,36 @@
|
||||
//
|
||||
// SocketReceiveFromResult.cs
|
||||
//
|
||||
// Authors:
|
||||
// Marek Safar <marek.safar@gmail.com>
|
||||
//
|
||||
// Copyright (C) 2016 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.
|
||||
//
|
||||
|
||||
namespace System.Net.Sockets
|
||||
{
|
||||
public struct SocketReceiveFromResult
|
||||
{
|
||||
public int ReceivedBytes;
|
||||
public EndPoint RemoteEndPoint;
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
//
|
||||
// SocketReceiveMessageFromResult.cs
|
||||
//
|
||||
// Authors:
|
||||
// Marek Safar <marek.safar@gmail.com>
|
||||
//
|
||||
// Copyright (C) 2016 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.
|
||||
//
|
||||
|
||||
namespace System.Net.Sockets
|
||||
{
|
||||
public struct SocketReceiveMessageFromResult
|
||||
{
|
||||
public int ReceivedBytes;
|
||||
public SocketFlags SocketFlags;
|
||||
public EndPoint RemoteEndPoint;
|
||||
public IPPacketInformation PacketInformation;
|
||||
}
|
||||
}
|
250
mcs/class/Facades/System.Net.Sockets/SocketTaskExtensions.cs
Normal file
250
mcs/class/Facades/System.Net.Sockets/SocketTaskExtensions.cs
Normal file
@ -0,0 +1,250 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System.Net.Sockets
|
||||
{
|
||||
public static class SocketTaskExtensions
|
||||
{
|
||||
public static Task<Socket> AcceptAsync(this Socket socket)
|
||||
{
|
||||
return Task<Socket>.Factory.FromAsync(
|
||||
(callback, state) => ((Socket)state).BeginAccept(callback, state),
|
||||
asyncResult => ((Socket)asyncResult.AsyncState).EndAccept(asyncResult),
|
||||
state: socket);
|
||||
}
|
||||
|
||||
public static Task<Socket> AcceptAsync(this Socket socket, Socket acceptSocket)
|
||||
{
|
||||
const int ReceiveSize = 0;
|
||||
return Task<Socket>.Factory.FromAsync(
|
||||
(socketForAccept, receiveSize, callback, state) => ((Socket)state).BeginAccept(socketForAccept, receiveSize, callback, state),
|
||||
asyncResult => ((Socket)asyncResult.AsyncState).EndAccept(asyncResult),
|
||||
acceptSocket,
|
||||
ReceiveSize,
|
||||
state: socket);
|
||||
}
|
||||
|
||||
public static Task ConnectAsync(this Socket socket, EndPoint remoteEndPoint)
|
||||
{
|
||||
return Task.Factory.FromAsync(
|
||||
(targetEndPoint, callback, state) => ((Socket)state).BeginConnect(targetEndPoint, callback, state),
|
||||
asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
|
||||
remoteEndPoint,
|
||||
state: socket);
|
||||
}
|
||||
|
||||
public static Task ConnectAsync(this Socket socket, IPAddress address, int port)
|
||||
{
|
||||
return Task.Factory.FromAsync(
|
||||
(targetAddress, targetPort, callback, state) => ((Socket)state).BeginConnect(targetAddress, targetPort, callback, state),
|
||||
asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
|
||||
address,
|
||||
port,
|
||||
state: socket);
|
||||
}
|
||||
|
||||
public static Task ConnectAsync(this Socket socket, IPAddress[] addresses, int port)
|
||||
{
|
||||
return Task.Factory.FromAsync(
|
||||
(targetAddresses, targetPort, callback, state) => ((Socket)state).BeginConnect(targetAddresses, targetPort, callback, state),
|
||||
asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
|
||||
addresses,
|
||||
port,
|
||||
state: socket);
|
||||
}
|
||||
|
||||
public static Task ConnectAsync(this Socket socket, string host, int port)
|
||||
{
|
||||
return Task.Factory.FromAsync(
|
||||
(targetHost, targetPort, callback, state) => ((Socket)state).BeginConnect(targetHost, targetPort, callback, state),
|
||||
asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
|
||||
host,
|
||||
port,
|
||||
state: socket);
|
||||
}
|
||||
|
||||
public static Task<int> ReceiveAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags)
|
||||
{
|
||||
return Task<int>.Factory.FromAsync(
|
||||
(targetBuffer, flags, callback, state) => ((Socket)state).BeginReceive(
|
||||
targetBuffer.Array,
|
||||
targetBuffer.Offset,
|
||||
targetBuffer.Count,
|
||||
flags,
|
||||
callback,
|
||||
state),
|
||||
asyncResult => ((Socket)asyncResult.AsyncState).EndReceive(asyncResult),
|
||||
buffer,
|
||||
socketFlags,
|
||||
state: socket);
|
||||
}
|
||||
|
||||
public static Task<int> ReceiveAsync(
|
||||
this Socket socket,
|
||||
IList<ArraySegment<byte>> buffers,
|
||||
SocketFlags socketFlags)
|
||||
{
|
||||
return Task<int>.Factory.FromAsync(
|
||||
(targetBuffers, flags, callback, state) => ((Socket)state).BeginReceive(targetBuffers, flags, callback, state),
|
||||
asyncResult => ((Socket)asyncResult.AsyncState).EndReceive(asyncResult),
|
||||
buffers,
|
||||
socketFlags,
|
||||
state: socket);
|
||||
}
|
||||
|
||||
public static Task<SocketReceiveFromResult> ReceiveFromAsync(
|
||||
this Socket socket,
|
||||
ArraySegment<byte> buffer,
|
||||
SocketFlags socketFlags,
|
||||
EndPoint remoteEndPoint)
|
||||
{
|
||||
object[] packedArguments = new object[] { socket, remoteEndPoint };
|
||||
|
||||
return Task<SocketReceiveFromResult>.Factory.FromAsync(
|
||||
(targetBuffer, flags, callback, state) =>
|
||||
{
|
||||
var arguments = (object[])state;
|
||||
var s = (Socket)arguments[0];
|
||||
var e = (EndPoint)arguments[1];
|
||||
|
||||
IAsyncResult result = s.BeginReceiveFrom(
|
||||
targetBuffer.Array,
|
||||
targetBuffer.Offset,
|
||||
targetBuffer.Count,
|
||||
flags,
|
||||
ref e,
|
||||
callback,
|
||||
state);
|
||||
|
||||
arguments[1] = e;
|
||||
return result;
|
||||
},
|
||||
asyncResult =>
|
||||
{
|
||||
var arguments = (object[])asyncResult.AsyncState;
|
||||
var s = (Socket)arguments[0];
|
||||
var e = (EndPoint)arguments[1];
|
||||
|
||||
int bytesReceived = s.EndReceiveFrom(asyncResult, ref e);
|
||||
|
||||
return new SocketReceiveFromResult()
|
||||
{
|
||||
ReceivedBytes = bytesReceived,
|
||||
RemoteEndPoint = e
|
||||
};
|
||||
},
|
||||
buffer,
|
||||
socketFlags,
|
||||
state: packedArguments);
|
||||
}
|
||||
|
||||
public static Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(
|
||||
this Socket socket,
|
||||
ArraySegment<byte> buffer,
|
||||
SocketFlags socketFlags,
|
||||
EndPoint remoteEndPoint)
|
||||
{
|
||||
object[] packedArguments = new object[] { socket, socketFlags, remoteEndPoint };
|
||||
|
||||
return Task<SocketReceiveMessageFromResult>.Factory.FromAsync(
|
||||
(targetBuffer, callback, state) =>
|
||||
{
|
||||
var arguments = (object[])state;
|
||||
var s = (Socket)arguments[0];
|
||||
var f = (SocketFlags)arguments[1];
|
||||
var e = (EndPoint)arguments[2];
|
||||
|
||||
IAsyncResult result = s.BeginReceiveMessageFrom(
|
||||
targetBuffer.Array,
|
||||
targetBuffer.Offset,
|
||||
targetBuffer.Count,
|
||||
f,
|
||||
ref e,
|
||||
callback,
|
||||
state);
|
||||
|
||||
arguments[2] = e;
|
||||
return result;
|
||||
},
|
||||
asyncResult =>
|
||||
{
|
||||
var arguments = (object[])asyncResult.AsyncState;
|
||||
var s = (Socket)arguments[0];
|
||||
var f = (SocketFlags)arguments[1];
|
||||
var e = (EndPoint)arguments[2];
|
||||
IPPacketInformation ipPacket;
|
||||
|
||||
int bytesReceived = s.EndReceiveMessageFrom(
|
||||
asyncResult,
|
||||
ref f,
|
||||
ref e,
|
||||
out ipPacket);
|
||||
|
||||
return new SocketReceiveMessageFromResult()
|
||||
{
|
||||
PacketInformation = ipPacket,
|
||||
ReceivedBytes = bytesReceived,
|
||||
RemoteEndPoint = e,
|
||||
SocketFlags = f
|
||||
};
|
||||
},
|
||||
buffer,
|
||||
state: packedArguments);
|
||||
}
|
||||
|
||||
public static Task<int> SendAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags)
|
||||
{
|
||||
return Task<int>.Factory.FromAsync(
|
||||
(targetBuffer, flags, callback, state) => ((Socket)state).BeginSend(
|
||||
targetBuffer.Array,
|
||||
targetBuffer.Offset,
|
||||
targetBuffer.Count,
|
||||
flags,
|
||||
callback,
|
||||
state),
|
||||
asyncResult => ((Socket)asyncResult.AsyncState).EndSend(asyncResult),
|
||||
buffer,
|
||||
socketFlags,
|
||||
state: socket);
|
||||
}
|
||||
|
||||
public static Task<int> SendAsync(
|
||||
this Socket socket,
|
||||
IList<ArraySegment<byte>> buffers,
|
||||
SocketFlags socketFlags)
|
||||
{
|
||||
return Task<int>.Factory.FromAsync(
|
||||
(targetBuffers, flags, callback, state) => ((Socket)state).BeginSend(targetBuffers, flags, callback, state),
|
||||
asyncResult => ((Socket)asyncResult.AsyncState).EndSend(asyncResult),
|
||||
buffers,
|
||||
socketFlags,
|
||||
state: socket);
|
||||
}
|
||||
|
||||
public static Task<int> SendToAsync(
|
||||
this Socket socket,
|
||||
ArraySegment<byte> buffer,
|
||||
SocketFlags socketFlags,
|
||||
EndPoint remoteEndPoint)
|
||||
{
|
||||
return Task<int>.Factory.FromAsync(
|
||||
(targetBuffer, flags, endPoint, callback, state) => ((Socket)state).BeginSendTo(
|
||||
targetBuffer.Array,
|
||||
targetBuffer.Offset,
|
||||
targetBuffer.Count,
|
||||
flags,
|
||||
endPoint,
|
||||
callback,
|
||||
state),
|
||||
asyncResult => ((Socket)asyncResult.AsyncState).EndSendTo(asyncResult),
|
||||
buffer,
|
||||
socketFlags,
|
||||
remoteEndPoint,
|
||||
state: socket);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
||||
SocketReceiveFromResult.cs
|
||||
SocketReceiveMessageFromResult.cs
|
||||
SocketTaskExtensions.cs
|
||||
|
@ -20,7 +20,6 @@
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if !FULL_AOT_RUNTIME
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.FlowControl))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.OpCode))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.OpCodes))]
|
||||
@ -28,7 +27,6 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.OperandType))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.PackingSize))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.StackBehaviour))]
|
||||
#endif
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.CallingConventions))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.EventAttributes))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.FieldAttributes))]
|
||||
|
@ -0,0 +1,17 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace System.Reflection
|
||||
{
|
||||
internal static class Requires
|
||||
{
|
||||
internal static void NotNull(object obj, string name)
|
||||
{
|
||||
if (obj == null)
|
||||
{
|
||||
throw new ArgumentNullException(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
4
mcs/class/Facades/System.Reflection.TypeExtensions/SR.cs
Normal file
4
mcs/class/Facades/System.Reflection.TypeExtensions/SR.cs
Normal file
@ -0,0 +1,4 @@
|
||||
partial class SR
|
||||
{
|
||||
public const string NoMetadataTokenAvailable = "There is no metadata token available for the given member.";
|
||||
}
|
@ -1,3 +1,6 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
||||
SR.cs
|
||||
Requires.cs
|
||||
TypeExtensions.CoreCLR.cs
|
||||
|
@ -0,0 +1,400 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
// NOTE: These are extension methods in the contract, but plain static methods
|
||||
// in this implementation. This is done to avoid confusion around what would
|
||||
// look like infinite recursion in the implementation. Callers compiled against
|
||||
// the contract will still be able to invoke them as extension methods and get
|
||||
// source compatibility with classic reflection code.
|
||||
//
|
||||
// However, this does not apply if there is no 1:1 correspondence with an instance
|
||||
// in mscorlib. New extension methods should be marked with 'this'.
|
||||
|
||||
namespace System.Reflection
|
||||
{
|
||||
public static class TypeExtensions
|
||||
{
|
||||
public static ConstructorInfo GetConstructor(Type type, Type[] types)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetConstructor(types);
|
||||
}
|
||||
|
||||
public static ConstructorInfo[] GetConstructors(Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetConstructors();
|
||||
}
|
||||
|
||||
public static ConstructorInfo[] GetConstructors(Type type, BindingFlags bindingAttr)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetConstructors(bindingAttr);
|
||||
}
|
||||
|
||||
public static MemberInfo[] GetDefaultMembers(Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetDefaultMembers();
|
||||
}
|
||||
|
||||
public static EventInfo GetEvent(Type type, string name)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetEvent(name);
|
||||
}
|
||||
|
||||
public static EventInfo GetEvent(Type type, string name, BindingFlags bindingAttr)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetEvent(name, bindingAttr);
|
||||
}
|
||||
|
||||
public static EventInfo[] GetEvents(Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetEvents();
|
||||
}
|
||||
|
||||
public static EventInfo[] GetEvents(Type type, BindingFlags bindingAttr)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetEvents(bindingAttr);
|
||||
}
|
||||
|
||||
public static FieldInfo GetField(Type type, string name)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetField(name);
|
||||
}
|
||||
|
||||
public static FieldInfo GetField(Type type, string name, BindingFlags bindingAttr)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetField(name, bindingAttr);
|
||||
}
|
||||
|
||||
public static FieldInfo[] GetFields(Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetFields();
|
||||
}
|
||||
|
||||
public static FieldInfo[] GetFields(Type type, BindingFlags bindingAttr)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetFields(bindingAttr);
|
||||
}
|
||||
|
||||
public static Type[] GetGenericArguments(Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetGenericArguments();
|
||||
}
|
||||
|
||||
public static Type[] GetInterfaces(Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetInterfaces();
|
||||
}
|
||||
|
||||
public static MemberInfo[] GetMember(Type type, string name)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetMember(name);
|
||||
}
|
||||
|
||||
public static MemberInfo[] GetMember(Type type, string name, BindingFlags bindingAttr)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetMember(name, bindingAttr);
|
||||
}
|
||||
|
||||
public static MemberInfo[] GetMembers(Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetMembers();
|
||||
}
|
||||
|
||||
public static MemberInfo[] GetMembers(Type type, BindingFlags bindingAttr)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetMembers(bindingAttr);
|
||||
}
|
||||
|
||||
public static MethodInfo GetMethod(Type type, string name)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetMethod(name);
|
||||
}
|
||||
|
||||
public static MethodInfo GetMethod(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)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetMethod(name, types);
|
||||
}
|
||||
|
||||
public static MethodInfo[] GetMethods(Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetMethods();
|
||||
}
|
||||
|
||||
public static MethodInfo[] GetMethods(Type type, BindingFlags bindingAttr)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetMethods(bindingAttr);
|
||||
}
|
||||
|
||||
public static Type GetNestedType(Type type, string name, BindingFlags bindingAttr)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetNestedType(name, bindingAttr);
|
||||
}
|
||||
|
||||
public static Type[] GetNestedTypes(Type type, BindingFlags bindingAttr)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetNestedTypes(bindingAttr);
|
||||
}
|
||||
|
||||
public static PropertyInfo[] GetProperties(Type type)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetProperties();
|
||||
}
|
||||
|
||||
public static PropertyInfo[] GetProperties(Type type, BindingFlags bindingAttr)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetProperties(bindingAttr);
|
||||
}
|
||||
|
||||
public static PropertyInfo GetProperty(Type type, string name)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetProperty(name);
|
||||
}
|
||||
|
||||
public static PropertyInfo GetProperty(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)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.GetProperty(name, returnType);
|
||||
}
|
||||
|
||||
public static PropertyInfo GetProperty(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)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.IsAssignableFrom(c);
|
||||
}
|
||||
|
||||
public static bool IsInstanceOfType(Type type, object o)
|
||||
{
|
||||
Requires.NotNull(type, nameof(type));
|
||||
return type.IsInstanceOfType(o);
|
||||
}
|
||||
}
|
||||
|
||||
public static class AssemblyExtensions
|
||||
{
|
||||
public static Type[] GetExportedTypes(Assembly assembly)
|
||||
{
|
||||
Requires.NotNull(assembly, nameof(assembly));
|
||||
return assembly.GetExportedTypes();
|
||||
}
|
||||
|
||||
public static Module[] GetModules(Assembly assembly)
|
||||
{
|
||||
Requires.NotNull(assembly, nameof(assembly));
|
||||
return assembly.GetModules();
|
||||
}
|
||||
|
||||
public static Type[] GetTypes(Assembly assembly)
|
||||
{
|
||||
Requires.NotNull(assembly, nameof(assembly));
|
||||
return assembly.GetTypes();
|
||||
}
|
||||
}
|
||||
|
||||
public static class EventInfoExtensions
|
||||
{
|
||||
public static MethodInfo GetAddMethod(EventInfo eventInfo)
|
||||
{
|
||||
Requires.NotNull(eventInfo, nameof(eventInfo));
|
||||
return eventInfo.GetAddMethod();
|
||||
}
|
||||
|
||||
public static MethodInfo GetAddMethod(EventInfo eventInfo, bool nonPublic)
|
||||
{
|
||||
Requires.NotNull(eventInfo, nameof(eventInfo));
|
||||
return eventInfo.GetAddMethod(nonPublic);
|
||||
}
|
||||
|
||||
public static MethodInfo GetRaiseMethod(EventInfo eventInfo)
|
||||
{
|
||||
Requires.NotNull(eventInfo, nameof(eventInfo));
|
||||
return eventInfo.GetRaiseMethod();
|
||||
}
|
||||
|
||||
public static MethodInfo GetRaiseMethod(EventInfo eventInfo, bool nonPublic)
|
||||
{
|
||||
Requires.NotNull(eventInfo, nameof(eventInfo));
|
||||
return eventInfo.GetRaiseMethod(nonPublic);
|
||||
}
|
||||
|
||||
public static MethodInfo GetRemoveMethod(EventInfo eventInfo)
|
||||
{
|
||||
Requires.NotNull(eventInfo, nameof(eventInfo));
|
||||
return eventInfo.GetRemoveMethod();
|
||||
}
|
||||
|
||||
public static MethodInfo GetRemoveMethod(EventInfo eventInfo, bool nonPublic)
|
||||
{
|
||||
Requires.NotNull(eventInfo, nameof(eventInfo));
|
||||
return eventInfo.GetRemoveMethod(nonPublic);
|
||||
}
|
||||
}
|
||||
|
||||
public static class MemberInfoExtensions
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Determines if there is a metadata token available for the given member.
|
||||
/// <see cref="GetMetadataToken(MemberInfo)"/> throws <see cref="InvalidOperationException"/> otherwise.
|
||||
/// </summary>
|
||||
/// <remarks>This maybe</remarks>
|
||||
public static bool HasMetadataToken(this MemberInfo member)
|
||||
{
|
||||
Requires.NotNull(member, nameof(member));
|
||||
|
||||
try
|
||||
{
|
||||
return GetMetadataTokenOrZeroOrThrow(member) != 0;
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
// Thrown for unbaked ref-emit members/types.
|
||||
// Other cases such as typeof(byte[]).MetadataToken will be handled by comparison to zero above.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a metadata token for the given member if available. The returned token is never nil.
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidOperationException">
|
||||
/// There is no metadata token available. <see cref="HasMetadataToken(MemberInfo)"/> returns false in this case.
|
||||
/// </exception>
|
||||
public static int GetMetadataToken(this MemberInfo member)
|
||||
{
|
||||
Requires.NotNull(member, nameof(member));
|
||||
|
||||
int token = GetMetadataTokenOrZeroOrThrow(member);
|
||||
|
||||
if (token == 0)
|
||||
{
|
||||
throw new InvalidOperationException(SR.NoMetadataTokenAvailable);
|
||||
}
|
||||
|
||||
return token;
|
||||
}
|
||||
|
||||
private static int GetMetadataTokenOrZeroOrThrow(MemberInfo member)
|
||||
{
|
||||
int token = member.MetadataToken;
|
||||
|
||||
// Tokens have MSB = table index, 3 LSBs = row index
|
||||
// row index of 0 is a nil token
|
||||
const int rowMask = 0x00FFFFFF;
|
||||
if ((token & rowMask) == 0)
|
||||
{
|
||||
// Nil token is returned for edge cases like typeof(byte[]).MetadataToken.
|
||||
return 0;
|
||||
}
|
||||
|
||||
return token;
|
||||
}
|
||||
}
|
||||
|
||||
public static class MethodInfoExtensions
|
||||
{
|
||||
public static MethodInfo GetBaseDefinition(MethodInfo method)
|
||||
{
|
||||
Requires.NotNull(method, nameof(method));
|
||||
return method.GetBaseDefinition();
|
||||
}
|
||||
}
|
||||
|
||||
public static class ModuleExtensions
|
||||
{
|
||||
public static bool HasModuleVersionId(this Module module)
|
||||
{
|
||||
Requires.NotNull(module, nameof(module));
|
||||
return true; // not expected to fail on platforms with Module.ModuleVersionId built-in.
|
||||
}
|
||||
|
||||
public static Guid GetModuleVersionId(this Module module)
|
||||
{
|
||||
Requires.NotNull(module, nameof(module));
|
||||
return module.ModuleVersionId;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PropertyInfoExtensions
|
||||
{
|
||||
public static MethodInfo[] GetAccessors(PropertyInfo property)
|
||||
{
|
||||
Requires.NotNull(property, nameof(property));
|
||||
return property.GetAccessors();
|
||||
}
|
||||
|
||||
public static MethodInfo[] GetAccessors(PropertyInfo property, bool nonPublic)
|
||||
{
|
||||
Requires.NotNull(property, nameof(property));
|
||||
return property.GetAccessors(nonPublic);
|
||||
}
|
||||
|
||||
public static MethodInfo GetGetMethod(PropertyInfo property)
|
||||
{
|
||||
Requires.NotNull(property, nameof(property));
|
||||
return property.GetGetMethod();
|
||||
}
|
||||
|
||||
public static MethodInfo GetGetMethod(PropertyInfo property, bool nonPublic)
|
||||
{
|
||||
Requires.NotNull(property, nameof(property));
|
||||
return property.GetGetMethod(nonPublic);
|
||||
}
|
||||
|
||||
public static MethodInfo GetSetMethod(PropertyInfo property)
|
||||
{
|
||||
Requires.NotNull(property, nameof(property));
|
||||
return property.GetSetMethod();
|
||||
}
|
||||
|
||||
public static MethodInfo GetSetMethod(PropertyInfo property, bool nonPublic)
|
||||
{
|
||||
Requires.NotNull(property, nameof(property));
|
||||
return property.GetSetMethod(nonPublic);
|
||||
}
|
||||
}
|
||||
}
|
@ -22,8 +22,3 @@
|
||||
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.BindingFlags))]
|
||||
|
||||
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyExtensions))]
|
||||
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.EventInfoExtensions))]
|
||||
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MethodInfoExtensions))]
|
||||
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.PropertyInfoExtensions))]
|
||||
//Missing: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TypeExtensions))]
|
||||
|
@ -46,4 +46,12 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TargetInvocationException))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TargetParameterCountException))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TypeInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.BindingFlags))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.ICustomAttributeProvider))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.InvalidFilterCriteriaException))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MemberFilter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MemberTypes))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.ParameterModifier))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TargetException))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TypeFilter))]
|
||||
|
||||
|
@ -45,12 +45,11 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.STATSTG))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CriticalHandle))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CurrencyWrapper))]
|
||||
//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CustomQueryInterfaceMode))]
|
||||
//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CustomQueryInterfaceResult))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CustomQueryInterfaceMode))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CustomQueryInterfaceResult))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DefaultCharSetAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DefaultParameterValueAttribute))]
|
||||
//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DispatchWrapper))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DispIdAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DllImportAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DllImportSearchPath))]
|
||||
@ -79,3 +78,60 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.UnmanagedType))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.VarEnum))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.VariantWrapper))]
|
||||
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComAwareEventInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComEventsHelper))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.ADVF))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.BIND_OPTS))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.BINDPTR))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.CALLCONV))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.CONNECTDATA))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.DATADIR))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.DESCKIND))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.DISPPARAMS))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.DVASPECT))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.ELEMDESC))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.EXCEPINFO))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.FILETIME))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.FORMATETC))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.FUNCDESC))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.FUNCFLAGS))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.FUNCKIND))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IAdviseSink))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IBindCtx))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IConnectionPoint))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IConnectionPointContainer))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IDLDESC))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IDLFLAG))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IEnumConnectionPoints))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IEnumConnections))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IEnumFORMATETC))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IEnumMoniker))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IEnumString))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IEnumVARIANT))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IMoniker))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IMPLTYPEFLAGS))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.INVOKEKIND))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IPersistFile))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IRunningObjectTable))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.ITypeComp))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.ITypeInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.ITypeInfo2))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.ITypeLib))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.ITypeLib2))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.LIBFLAGS))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.PARAMDESC))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.PARAMFLAG))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.STATDATA))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.STGMEDIUM))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.SYSKIND))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.TYMED))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.TYPEATTR))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.TYPEDESC))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.TYPEFLAGS))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.TYPEKIND))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.TYPELIBATTR))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.VARDESC))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.VARFLAGS))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.VARKIND))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ICustomQueryInterface))]
|
@ -0,0 +1,41 @@
|
||||
//
|
||||
// Copyright (c) 2016 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.Runtime.Serialization.Formatters.dll")]
|
||||
[assembly: AssemblyDescription ("System.Runtime.Serialization.Formatters.dll")]
|
||||
[assembly: AssemblyDefaultAlias ("System.Runtime.Serialization.Formatters.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")]
|
||||
|
||||
[assembly: ReferenceAssembly]
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
MCS_BUILD_DIR = ../../../build
|
||||
|
||||
thisdir = class/Facades/System.Runtime.Serialization.Formatters
|
||||
SUBDIRS =
|
||||
include $(MCS_BUILD_DIR)/rules.make
|
||||
|
||||
LIBRARY_SUBDIR = Facades
|
||||
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
|
||||
|
||||
LIBRARY = System.Runtime.Serialization.Formatters.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
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
@ -0,0 +1,32 @@
|
||||
//
|
||||
// Copyright (c) 2016 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.NonSerializedAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.IDeserializationCallback))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.IFormatterConverter))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.ISerializable))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.SerializationEntry))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.SerializationInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.SerializationInfoEnumerator))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.SerializableAttribute))]
|
||||
|
||||
|
@ -0,0 +1,32 @@
|
||||
//
|
||||
// Copyright (c) 2016 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.
|
||||
//
|
||||
|
||||
namespace System.Runtime.Serialization
|
||||
{
|
||||
public interface ISerializationSurrogateProvider
|
||||
{
|
||||
object GetDeserializedObject (object obj, Type targetType);
|
||||
object GetObjectToSerialize (object obj, Type targetType);
|
||||
Type GetSurrogateType (Type type);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
||||
ISerializationSurrogateProvider.cs
|
||||
|
@ -33,4 +33,4 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.OnSerializingAttribute))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.SerializationException))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.StreamingContext))]
|
||||
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.InvalidDataContractException))]
|
||||
|
@ -0,0 +1,84 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
#if !NO_CODEDOM
|
||||
using System.CodeDom;
|
||||
#endif
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.Runtime.Serialization
|
||||
{
|
||||
public static class DataContractSerializerExtensions
|
||||
{
|
||||
public static ISerializationSurrogateProvider GetSerializationSurrogateProvider(this DataContractSerializer serializer)
|
||||
{
|
||||
SurrogateProviderAdapter adapter = serializer.DataContractSurrogate as SurrogateProviderAdapter;
|
||||
return (adapter == null) ? null : adapter.Provider;
|
||||
}
|
||||
|
||||
public static void SetSerializationSurrogateProvider(this DataContractSerializer serializer, ISerializationSurrogateProvider provider)
|
||||
{
|
||||
// allocate every time, expectation is that this won't happen enough to warrant maintaining a CondtionalWeakTable.
|
||||
IDataContractSurrogate adapter = new SurrogateProviderAdapter(provider);
|
||||
|
||||
// DCS doesn't expose a setter, access the field directly as a workaround
|
||||
typeof(DataContractSerializer)
|
||||
.GetField("dataContractSurrogate", BindingFlags.Instance | BindingFlags.NonPublic)
|
||||
.SetValue(serializer, adapter);
|
||||
}
|
||||
|
||||
private class SurrogateProviderAdapter : IDataContractSurrogate
|
||||
{
|
||||
private ISerializationSurrogateProvider _provider;
|
||||
public SurrogateProviderAdapter(ISerializationSurrogateProvider provider)
|
||||
{
|
||||
_provider = provider;
|
||||
}
|
||||
|
||||
public ISerializationSurrogateProvider Provider { get { return _provider; } }
|
||||
public object GetCustomDataToExport(Type clrType, Type dataContractType)
|
||||
{
|
||||
throw NotImplemented.ByDesign;
|
||||
}
|
||||
|
||||
public object GetCustomDataToExport(MemberInfo memberInfo, Type dataContractType)
|
||||
{
|
||||
throw NotImplemented.ByDesign;
|
||||
}
|
||||
|
||||
public Type GetDataContractType(Type type)
|
||||
{
|
||||
return _provider.GetSurrogateType(type);
|
||||
}
|
||||
|
||||
public object GetDeserializedObject(object obj, Type targetType)
|
||||
{
|
||||
return _provider.GetDeserializedObject(obj, targetType);
|
||||
}
|
||||
|
||||
public void GetKnownCustomDataTypes(Collection<Type> customDataTypes)
|
||||
{
|
||||
throw NotImplemented.ByDesign;
|
||||
}
|
||||
|
||||
public object GetObjectToSerialize(object obj, Type targetType)
|
||||
{
|
||||
return _provider.GetObjectToSerialize(obj, targetType);
|
||||
}
|
||||
|
||||
public Type GetReferencedTypeOnImport(string typeName, string typeNamespace, object customData)
|
||||
{
|
||||
throw NotImplemented.ByDesign;
|
||||
}
|
||||
|
||||
#if !NO_CODEDOM
|
||||
public CodeTypeDeclaration ProcessImportedType(CodeTypeDeclaration typeDeclaration, CodeCompileUnit compileUnit)
|
||||
{
|
||||
throw NotImplemented.ByDesign;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
@ -11,9 +11,13 @@ LIBRARY = System.Runtime.Serialization.Xml.dll
|
||||
|
||||
KEY_FILE = ../../msfinal.pub
|
||||
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System.Runtime.Serialization System.Xml
|
||||
LIB_REFS = System.Runtime.Serialization System System.Xml Facades/System.Runtime.Serialization.Primitives
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
|
||||
|
||||
ifeq (2.1, $(FRAMEWORK_VERSION))
|
||||
LIB_MCS_FLAGS += /d:NO_CODEDOM
|
||||
endif
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
@ -0,0 +1,32 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace System
|
||||
{
|
||||
//
|
||||
// This class enables one to throw a NotImplementedException using the following idiom:
|
||||
//
|
||||
// throw NotImplemented.ByDesign;
|
||||
//
|
||||
// Used by methods whose intended implementation is to throw a NotImplementedException (typically
|
||||
// virtual methods in public abstract classes that intended to be subclassed by third parties.)
|
||||
//
|
||||
// This makes it distinguishable both from human eyes and CCI from NYI's that truly represent undone work.
|
||||
//
|
||||
internal static class NotImplemented
|
||||
{
|
||||
internal static Exception ByDesign
|
||||
{
|
||||
get
|
||||
{
|
||||
return new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
internal static Exception ByDesignWithMessage(String message)
|
||||
{
|
||||
return new NotImplementedException(message);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,3 +1,6 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
||||
|
||||
DataContractSerializerExtensions.cs
|
||||
NotImplemented.cs
|
||||
|
@ -36,3 +36,4 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlDictionaryWriter))]
|
||||
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.OnXmlDictionaryReaderClose))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlDictionaryReaderQuotaTypes))]
|
||||
|
@ -293,3 +293,6 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.IsConst))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.TypeCode))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UriFormatException))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ConditionalWeakTable<,>))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.GCHandle))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.GCHandleType))]
|
||||
|
@ -0,0 +1,41 @@
|
||||
//
|
||||
// Copyright (c) 2016 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.Security.Cryptography.Algorithms.dll")]
|
||||
[assembly: AssemblyDescription ("System.Security.Cryptography.Algorithms.dll")]
|
||||
[assembly: AssemblyDefaultAlias ("System.Security.Cryptography.Algorithms.dll")]
|
||||
[assembly: AssemblyCompany ("Xamarin, Inc.")]
|
||||
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
|
||||
[assembly: AssemblyCopyright ("Copyright (c) 2016 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")]
|
||||
|
||||
[assembly: ReferenceAssembly]
|
||||
|
||||
|
@ -0,0 +1,85 @@
|
||||
//
|
||||
// ECCurve.cs
|
||||
//
|
||||
// Authors:
|
||||
// Marek Safar <marek.safar@gmail.com>
|
||||
//
|
||||
// Copyright (C) 2016 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.
|
||||
//
|
||||
|
||||
namespace System.Security.Cryptography
|
||||
{
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public struct ECCurve
|
||||
{
|
||||
public byte[] A;
|
||||
public byte[] B;
|
||||
public byte[] Cofactor;
|
||||
public ECCurveType CurveType;
|
||||
public ECPoint G;
|
||||
public HashAlgorithmName? Hash;
|
||||
public byte[] Order;
|
||||
public byte[] Polynomial;
|
||||
public byte[] Prime;
|
||||
public byte[] Seed;
|
||||
public bool IsCharacteristic2 { get { throw new NotImplementedException (); } }
|
||||
public bool IsExplicit { get { throw new NotImplementedException (); } }
|
||||
public bool IsNamed { get { throw new NotImplementedException (); } }
|
||||
public bool IsPrime { get { throw new NotImplementedException (); } }
|
||||
public Oid Oid { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve CreateFromFriendlyName (string oidFriendlyName) { throw new NotImplementedException (); }
|
||||
public static ECCurve CreateFromOid (Oid curveOid) { throw new NotImplementedException (); }
|
||||
public static ECCurve CreateFromValue (string oidValue) { throw new NotImplementedException (); }
|
||||
public void Validate () { throw new NotImplementedException (); }
|
||||
|
||||
public enum ECCurveType
|
||||
{
|
||||
Implicit = 0,
|
||||
PrimeShortWeierstrass = 1,
|
||||
PrimeTwistedEdwards = 2,
|
||||
PrimeMontgomery = 3,
|
||||
Characteristic2 = 4,
|
||||
Named = 5,
|
||||
}
|
||||
|
||||
public static class NamedCurves
|
||||
{
|
||||
public static ECCurve brainpoolP160r1 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve brainpoolP160t1 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve brainpoolP192r1 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve brainpoolP192t1 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve brainpoolP224r1 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve brainpoolP224t1 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve brainpoolP256r1 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve brainpoolP256t1 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve brainpoolP320r1 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve brainpoolP320t1 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve brainpoolP384r1 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve brainpoolP384t1 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve brainpoolP512r1 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve brainpoolP512t1 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve nistP256 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve nistP384 { get { throw new NotImplementedException (); } }
|
||||
public static ECCurve nistP521 { get { throw new NotImplementedException (); } }
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
//
|
||||
// ECPArameters.cs
|
||||
//
|
||||
// Authors:
|
||||
// Marek Safar <marek.safar@gmail.com>
|
||||
//
|
||||
// Copyright (C) 2016 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.
|
||||
//
|
||||
|
||||
namespace System.Security.Cryptography
|
||||
{
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public partial struct ECParameters
|
||||
{
|
||||
public ECCurve Curve;
|
||||
public byte[] D;
|
||||
public ECPoint Q;
|
||||
public void Validate () { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
//
|
||||
// ECPoint.cs
|
||||
//
|
||||
// Authors:
|
||||
// Marek Safar <marek.safar@gmail.com>
|
||||
//
|
||||
// Copyright (C) 2016 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.
|
||||
//
|
||||
|
||||
namespace System.Security.Cryptography
|
||||
{
|
||||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public struct ECPoint
|
||||
{
|
||||
public byte[] X;
|
||||
public byte[] Y;
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
//
|
||||
// IncrementalHash.cs
|
||||
//
|
||||
// Authors:
|
||||
// Marek Safar <marek.safar@gmail.com>
|
||||
//
|
||||
// Copyright (C) 2016 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.
|
||||
//
|
||||
|
||||
namespace System.Security.Cryptography
|
||||
{
|
||||
public sealed class IncrementalHash : IDisposable
|
||||
{
|
||||
private IncrementalHash () { }
|
||||
public HashAlgorithmName AlgorithmName { get { throw new NotImplementedException (); } }
|
||||
public void AppendData (byte[] data) { }
|
||||
public void AppendData (byte[] data, int offset, int count) { }
|
||||
public static IncrementalHash CreateHash (HashAlgorithmName hashAlgorithm) { throw new NotImplementedException (); }
|
||||
public static IncrementalHash CreateHMAC (HashAlgorithmName hashAlgorithm, byte[] key) { throw new NotImplementedException (); }
|
||||
public void Dispose () { }
|
||||
public byte[] GetHashAndReset () { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
MCS_BUILD_DIR = ../../../build
|
||||
|
||||
thisdir = class/Facades/System.Security.Cryptography.Algorithms
|
||||
SUBDIRS =
|
||||
include $(MCS_BUILD_DIR)/rules.make
|
||||
|
||||
LIBRARY_SUBDIR = Facades
|
||||
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
|
||||
|
||||
LIBRARY = System.Security.Cryptography.Algorithms.dll
|
||||
|
||||
KEY_FILE = ../../msfinal.pub
|
||||
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System System.Core
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
|
@ -0,0 +1,6 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
ECCurve.cs
|
||||
ECPoint.cs
|
||||
ECParameters.cs
|
||||
IncrementalHash.cs
|
@ -0,0 +1,46 @@
|
||||
//
|
||||
// Copyright (c) 2016 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.Security.Cryptography.Aes))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.DeriveBytes))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECDsa))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACMD5))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA1))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA256))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA384))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA512))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.MD5))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RandomNumberGenerator))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Rfc2898DeriveBytes))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSA))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAEncryptionPadding))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAEncryptionPaddingMode))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAParameters))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSASignaturePadding))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSASignaturePaddingMode))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA1))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA256))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA384))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA512))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.TripleDES))]
|
||||
|
||||
|
@ -0,0 +1,41 @@
|
||||
//
|
||||
// Copyright (c) 2016 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.Security.Cryptography.Cng.dll")]
|
||||
[assembly: AssemblyDescription ("System.Security.Cryptography.Cng.dll")]
|
||||
[assembly: AssemblyDefaultAlias ("System.Security.Cryptography.Cng.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")]
|
||||
|
||||
[assembly: ReferenceAssembly]
|
||||
|
||||
|
23
mcs/class/Facades/System.Security.Cryptography.Cng/Makefile
Normal file
23
mcs/class/Facades/System.Security.Cryptography.Cng/Makefile
Normal file
@ -0,0 +1,23 @@
|
||||
MCS_BUILD_DIR = ../../../build
|
||||
|
||||
thisdir = class/Facades/System.Security.Cryptography.Cng
|
||||
SUBDIRS =
|
||||
include $(MCS_BUILD_DIR)/rules.make
|
||||
|
||||
LIBRARY_SUBDIR = Facades
|
||||
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
|
||||
|
||||
LIBRARY = System.Security.Cryptography.Cng.dll
|
||||
|
||||
KEY_FILE = ../../msfinal.pub
|
||||
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System System.Core
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
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