From b7f67c967a1acb311e7873b515edc92f74b658af Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 7 Jan 2019 18:18:03 -0800 Subject: [PATCH] CoreRT updates for files moved to shared partition Signed-off-by: dotnet-bot --- .../System.Private.CoreLib.csproj | 1 + .../shared/System.Private.CoreLib.Shared.projitems | 63 +++++++++++----------- .../Runtime/InteropServices/ComImportAttribute.cs | 11 ++++ .../Runtime/InteropServices/ComInterfaceType.cs | 14 +++++ .../InteropServices/ComTypes/IConnectionPoint.cs | 2 +- .../Runtime/InteropServices/ComTypes/ITypeLib2.cs | 2 +- .../InteropServices/InterfaceTypeAttribute.cs | 21 ++++++++ .../InteropServices/LCIDConversionAttribute.cs | 17 ++++++ .../System/Runtime/InteropServices/Attributes.cs | 48 ----------------- .../InteropServices/ComTypes/IEnumerable.cs | 0 10 files changed, 98 insertions(+), 81 deletions(-) create mode 100644 src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComImportAttribute.cs create mode 100644 src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComInterfaceType.cs create mode 100644 src/System.Private.CoreLib/shared/System/Runtime/InteropServices/InterfaceTypeAttribute.cs create mode 100644 src/System.Private.CoreLib/shared/System/Runtime/InteropServices/LCIDConversionAttribute.cs rename src/System.Private.CoreLib/{shared => src}/System/Runtime/InteropServices/ComTypes/IEnumerable.cs (100%) diff --git a/src/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/System.Private.CoreLib/System.Private.CoreLib.csproj index 07f25c6..d901db3 100644 --- a/src/System.Private.CoreLib/System.Private.CoreLib.csproj +++ b/src/System.Private.CoreLib/System.Private.CoreLib.csproj @@ -257,6 +257,7 @@ + diff --git a/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems b/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems index 4d89fb0..d0d7d8e 100644 --- a/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems +++ b/src/System.Private.CoreLib/shared/System.Private.CoreLib.Shared.projitems @@ -556,9 +556,28 @@ + + + + + + + + + + + + + + + + + + + @@ -568,13 +587,15 @@ + + - + @@ -942,26 +963,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -1073,17 +1074,17 @@ - - - - - + + + + + - - - - - + + + + + diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComImportAttribute.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComImportAttribute.cs new file mode 100644 index 0000000..a290bf4 --- /dev/null +++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComImportAttribute.cs @@ -0,0 +1,11 @@ +// 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.Runtime.InteropServices +{ + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = false)] + public sealed class ComImportAttribute : Attribute + { + } +} diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComInterfaceType.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComInterfaceType.cs new file mode 100644 index 0000000..03b8ae5 --- /dev/null +++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComInterfaceType.cs @@ -0,0 +1,14 @@ +// 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.Runtime.InteropServices +{ + public enum ComInterfaceType + { + InterfaceIsDual = 0, + InterfaceIsIUnknown = 1, + InterfaceIsIDispatch = 2, + InterfaceIsIInspectable = 3, + } +} diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs index fcca685..b2ce192 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs @@ -5,7 +5,7 @@ namespace System.Runtime.InteropServices.ComTypes { [Guid("B196B286-BAB4-101A-B69C-00AA00341D07")] - [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] + [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [ComImport] public interface IConnectionPoint { diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs index 76ff8a9..61703d1 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs @@ -23,7 +23,7 @@ namespace System.Runtime.InteropServices.ComTypes [PreserveSig] new void ReleaseTLibAttr(IntPtr pTLibAttr); void GetCustData(ref Guid guid, out object pVarVal); - [LCIDConversionAttribute(1)] + [LCIDConversion(1)] void GetDocumentation2(int index, out string pbstrHelpString, out int pdwHelpStringContext, out string pbstrHelpStringDll); void GetLibStatistics(IntPtr pcUniqueNames, out int pcchUniqueNames); void GetAllCustData(IntPtr pCustData); diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/InterfaceTypeAttribute.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/InterfaceTypeAttribute.cs new file mode 100644 index 0000000..695faa7 --- /dev/null +++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/InterfaceTypeAttribute.cs @@ -0,0 +1,21 @@ +// 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.Runtime.InteropServices +{ + [AttributeUsage(AttributeTargets.Interface, Inherited = false)] + public sealed class InterfaceTypeAttribute : Attribute + { + public InterfaceTypeAttribute(ComInterfaceType interfaceType) + { + Value = interfaceType; + } + public InterfaceTypeAttribute(short interfaceType) + { + Value = (ComInterfaceType)interfaceType; + } + + public ComInterfaceType Value { get; } + } +} diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/LCIDConversionAttribute.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/LCIDConversionAttribute.cs new file mode 100644 index 0000000..75f8fcf --- /dev/null +++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/LCIDConversionAttribute.cs @@ -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.Runtime.InteropServices +{ + [AttributeUsage(AttributeTargets.Method, Inherited = false)] + public sealed class LCIDConversionAttribute : Attribute + { + public LCIDConversionAttribute(int lcid) + { + Value = lcid; + } + + public int Value { get; } + } +} diff --git a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Attributes.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Attributes.cs index d1396d7..ed7a28d 100644 --- a/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Attributes.cs +++ b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/Attributes.cs @@ -40,33 +40,6 @@ namespace System.Runtime.InteropServices public int Value => _val; } - public enum ComInterfaceType - { - InterfaceIsDual = 0, - InterfaceIsIUnknown = 1, - InterfaceIsIDispatch = 2, - - InterfaceIsIInspectable = 3, - } - - [AttributeUsage(AttributeTargets.Interface, Inherited = false)] - public sealed class InterfaceTypeAttribute : Attribute - { - internal ComInterfaceType _val; - - public InterfaceTypeAttribute(ComInterfaceType interfaceType) - { - _val = interfaceType; - } - - public InterfaceTypeAttribute(short interfaceType) - { - _val = (ComInterfaceType)interfaceType; - } - - public ComInterfaceType Value => _val; - } - [AttributeUsage(AttributeTargets.Class, Inherited = false)] public sealed class ComDefaultInterfaceAttribute : Attribute { @@ -105,19 +78,6 @@ namespace System.Runtime.InteropServices public ClassInterfaceType Value => _val; } - [AttributeUsage(AttributeTargets.Method, Inherited = false)] - public sealed class LCIDConversionAttribute : Attribute - { - internal int _val; - - public LCIDConversionAttribute(int lcid) - { - _val = lcid; - } - - public int Value => _val; - } - [AttributeUsage(AttributeTargets.Class, Inherited = false)] public sealed class ProgIdAttribute : Attribute { @@ -164,14 +124,6 @@ namespace System.Runtime.InteropServices public string Value => _val; } - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = false)] - public sealed class ComImportAttribute : Attribute - { - public ComImportAttribute() - { - } - } - [AttributeUsage(AttributeTargets.Interface, Inherited = false)] public sealed class CoClassAttribute : Attribute { diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumerable.cs b/src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumerable.cs similarity index 100% rename from src/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumerable.cs rename to src/System.Private.CoreLib/src/System/Runtime/InteropServices/ComTypes/IEnumerable.cs -- 2.7.4