From: Jan Kotas Date: Mon, 6 Feb 2017 15:20:17 +0000 (-0800) Subject: Delete ComVisible attributes X-Git-Tag: submit/tizen/20210909.063632~11030^2~8192^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e36b9ee9c5844f67f211e50dd3d4cfb59ee8b705;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Delete ComVisible attributes Commit migrated from https://github.com/dotnet/coreclr/commit/f705205bdeef23187011a65376a3c7dcb448f359 --- diff --git a/src/coreclr/src/mscorlib/src/Microsoft/Win32/Registry.cs b/src/coreclr/src/mscorlib/src/Microsoft/Win32/Registry.cs index 1a34ef6..bf4f739 100644 --- a/src/coreclr/src/mscorlib/src/Microsoft/Win32/Registry.cs +++ b/src/coreclr/src/mscorlib/src/Microsoft/Win32/Registry.cs @@ -15,7 +15,6 @@ namespace Microsoft.Win32 { * @security(checkClassLinking=on) */ //This class contains only static members and does not need to be serializable. - [ComVisible(true)] internal static class Registry { static Registry() { diff --git a/src/coreclr/src/mscorlib/src/Microsoft/Win32/RegistryKey.cs b/src/coreclr/src/mscorlib/src/Microsoft/Win32/RegistryKey.cs index 3a797db..839c2ff 100644 --- a/src/coreclr/src/mscorlib/src/Microsoft/Win32/RegistryKey.cs +++ b/src/coreclr/src/mscorlib/src/Microsoft/Win32/RegistryKey.cs @@ -75,7 +75,6 @@ namespace Microsoft.Win32 * @security(checkDllCalls=off) * @security(checkClassLinking=on) */ - [ComVisible(true)] internal sealed class RegistryKey : MarshalByRefObject, IDisposable { @@ -512,7 +511,6 @@ namespace Microsoft.Win32 return InternalGetValue(name, defaultValue, false, true); } - [ComVisible(false)] public Object GetValue(String name, Object defaultValue, RegistryValueOptions options) { if( options < RegistryValueOptions.None || options > RegistryValueOptions.DoNotExpandEnvironmentNames) { throw new ArgumentException(Environment.GetResourceString("Arg_EnumIllegalVal", (int)options), nameof(options)); @@ -765,7 +763,6 @@ namespace Microsoft.Win32 SetValue(name, value, RegistryValueKind.Unknown); } - [ComVisible(false)] public unsafe void SetValue(String name, Object value, RegistryValueKind valueKind) { if (value==null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value); diff --git a/src/coreclr/src/mscorlib/src/Microsoft/Win32/RegistryValueKind.cs b/src/coreclr/src/mscorlib/src/Microsoft/Win32/RegistryValueKind.cs index 9f94756..5e22275 100644 --- a/src/coreclr/src/mscorlib/src/Microsoft/Win32/RegistryValueKind.cs +++ b/src/coreclr/src/mscorlib/src/Microsoft/Win32/RegistryValueKind.cs @@ -4,7 +4,6 @@ namespace Microsoft.Win32 { -[System.Runtime.InteropServices.ComVisible(true)] internal enum RegistryValueKind { String = Win32Native.REG_SZ, ExpandString = Win32Native.REG_EXPAND_SZ, @@ -13,7 +12,6 @@ namespace Microsoft.Win32 { MultiString = Win32Native.REG_MULTI_SZ, QWord = Win32Native.REG_QWORD, Unknown = 0, // REG_NONE is defined as zero but BCL - [System.Runtime.InteropServices.ComVisible(false)] None = unchecked((int)0xFFFFFFFF), // mistakingly overrode this value. } // Now instead of using Win32Native.REG_NONE we use "-1" and play games internally. } diff --git a/src/coreclr/src/mscorlib/src/System/AppDomain.cs b/src/coreclr/src/mscorlib/src/System/AppDomain.cs index 433bd79..023ee61 100644 --- a/src/coreclr/src/mscorlib/src/System/AppDomain.cs +++ b/src/coreclr/src/mscorlib/src/System/AppDomain.cs @@ -38,7 +38,6 @@ namespace System using System.Diagnostics.Contracts; using System.Runtime.ExceptionServices; - [ComVisible(true)] public class ResolveEventArgs : EventArgs { private String _Name; @@ -70,7 +69,6 @@ namespace System } } - [ComVisible(true)] public class AssemblyLoadEventArgs : EventArgs { private Assembly _LoadedAssembly; @@ -88,15 +86,12 @@ namespace System } [Serializable] - [ComVisible(true)] public delegate Assembly ResolveEventHandler(Object sender, ResolveEventArgs args); [Serializable] - [ComVisible(true)] public delegate void AssemblyLoadEventHandler(Object sender, AssemblyLoadEventArgs args); [Serializable] - [ComVisible(true)] internal delegate void AppDomainInitializer(string[] args); internal class AppDomainInitializerInfo diff --git a/src/coreclr/src/mscorlib/src/System/AppDomainAttributes.cs b/src/coreclr/src/mscorlib/src/System/AppDomainAttributes.cs index 05d2984..960f9c1 100644 --- a/src/coreclr/src/mscorlib/src/System/AppDomainAttributes.cs +++ b/src/coreclr/src/mscorlib/src/System/AppDomainAttributes.cs @@ -14,7 +14,6 @@ namespace System { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] internal enum LoaderOptimization { NotSpecified = 0, diff --git a/src/coreclr/src/mscorlib/src/System/AppDomainManager.cs b/src/coreclr/src/mscorlib/src/System/AppDomainManager.cs index 13e12bf..bd2faa0 100644 --- a/src/coreclr/src/mscorlib/src/System/AppDomainManager.cs +++ b/src/coreclr/src/mscorlib/src/System/AppDomainManager.cs @@ -15,7 +15,6 @@ namespace System using System.Security; using System.Runtime.InteropServices; - [System.Runtime.InteropServices.ComVisible(true)] internal class AppDomainManager : MarshalByRefObject { public AppDomainManager () {} diff --git a/src/coreclr/src/mscorlib/src/System/AppDomainSetup.cs b/src/coreclr/src/mscorlib/src/System/AppDomainSetup.cs index 92b8af9..b15663d 100644 --- a/src/coreclr/src/mscorlib/src/System/AppDomainSetup.cs +++ b/src/coreclr/src/mscorlib/src/System/AppDomainSetup.cs @@ -27,7 +27,6 @@ namespace System [Serializable] [ClassInterface(ClassInterfaceType.None)] - [System.Runtime.InteropServices.ComVisible(true)] internal sealed class AppDomainSetup { [Serializable] diff --git a/src/coreclr/src/mscorlib/src/System/AppDomainUnloadedException.cs b/src/coreclr/src/mscorlib/src/System/AppDomainUnloadedException.cs index 9a0abb8..30bee7c 100644 --- a/src/coreclr/src/mscorlib/src/System/AppDomainUnloadedException.cs +++ b/src/coreclr/src/mscorlib/src/System/AppDomainUnloadedException.cs @@ -15,7 +15,6 @@ namespace System { using System.Runtime.Serialization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] internal class AppDomainUnloadedException : SystemException { public AppDomainUnloadedException() diff --git a/src/coreclr/src/mscorlib/src/System/ArgumentOutOfRangeException.cs b/src/coreclr/src/mscorlib/src/System/ArgumentOutOfRangeException.cs index 78a90db..13580e9 100644 --- a/src/coreclr/src/mscorlib/src/System/ArgumentOutOfRangeException.cs +++ b/src/coreclr/src/mscorlib/src/System/ArgumentOutOfRangeException.cs @@ -22,7 +22,6 @@ namespace System { // The ArgumentOutOfRangeException is thrown when an argument // is outside the legal range for that argument. - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class ArgumentOutOfRangeException : ArgumentException, ISerializable { diff --git a/src/coreclr/src/mscorlib/src/System/Array.cs b/src/coreclr/src/mscorlib/src/System/Array.cs index 3d29270..d1ce116 100644 --- a/src/coreclr/src/mscorlib/src/System/Array.cs +++ b/src/coreclr/src/mscorlib/src/System/Array.cs @@ -26,7 +26,6 @@ namespace System { // Note that we make a T[] (single-dimensional w/ zero as the lower bound) implement both // IList and IReadOnlyList, where T : U dynamically. See the SZArrayHelper class for details. [Serializable] - [ComVisible(true)] public abstract class Array : ICloneable, IList, IStructuralComparable, IStructuralEquatable { // This ctor exists solely to prevent C# from generating a protected .ctor that violates the surface area. I really want this to be a @@ -360,7 +359,6 @@ namespace System { return TypedReference.InternalToObject(&elemref); } - [ComVisible(false)] public Object GetValue(long index) { if (index > Int32.MaxValue || index < Int32.MinValue) @@ -370,7 +368,6 @@ namespace System { return this.GetValue((int) index); } - [ComVisible(false)] public Object GetValue(long index1, long index2) { if (index1 > Int32.MaxValue || index1 < Int32.MinValue) @@ -382,7 +379,6 @@ namespace System { return this.GetValue((int) index1, (int) index2); } - [ComVisible(false)] public Object GetValue(long index1, long index2, long index3) { if (index1 > Int32.MaxValue || index1 < Int32.MinValue) @@ -396,7 +392,6 @@ namespace System { return this.GetValue((int) index1, (int) index2, (int) index3); } - [ComVisible(false)] public Object GetValue(params long[] indices) { if (indices == null) @@ -475,7 +470,6 @@ namespace System { InternalSetValue(&elemref,value); } - [ComVisible(false)] public void SetValue(Object value, long index) { if (index > Int32.MaxValue || index < Int32.MinValue) @@ -485,7 +479,6 @@ namespace System { this.SetValue(value, (int) index); } - [ComVisible(false)] public void SetValue(Object value, long index1, long index2) { if (index1 > Int32.MaxValue || index1 < Int32.MinValue) @@ -497,7 +490,6 @@ namespace System { this.SetValue(value, (int) index1, (int) index2); } - [ComVisible(false)] public void SetValue(Object value, long index1, long index2, long index3) { if (index1 > Int32.MaxValue || index1 < Int32.MinValue) @@ -511,7 +503,6 @@ namespace System { this.SetValue(value, (int) index1, (int) index2, (int) index3); } - [ComVisible(false)] public void SetValue(Object value, params long[] indices) { if (indices == null) @@ -565,7 +556,6 @@ namespace System { internal const int MaxArrayLength = 0X7FEFFFFF; internal const int MaxByteArrayLength = 0x7FFFFFC7; - [ComVisible(false)] public extern long LongLength { [Pure] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] @@ -578,7 +568,6 @@ namespace System { public extern int GetLength(int dimension); [Pure] - [ComVisible(false)] public long GetLongLength(int dimension) { //This method should throw an IndexOufOfRangeException for compat if dimension < 0 or >= Rank return GetLength(dimension); @@ -989,7 +978,6 @@ namespace System { } [Pure] - [ComVisible(false)] public void CopyTo(Array array, long index) { if (index > Int32.MaxValue || index < Int32.MinValue) diff --git a/src/coreclr/src/mscorlib/src/System/AttributeUsageAttribute.cs b/src/coreclr/src/mscorlib/src/System/AttributeUsageAttribute.cs index 0c2e11c..33f7fd8 100644 --- a/src/coreclr/src/mscorlib/src/System/AttributeUsageAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/AttributeUsageAttribute.cs @@ -16,7 +16,6 @@ namespace System { /* By default, attributes are inherited and multiple attributes are not allowed */ [Serializable] [AttributeUsage(AttributeTargets.Class, Inherited = true)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class AttributeUsageAttribute : Attribute { internal AttributeTargets m_attributeTarget = AttributeTargets.All; // Defaults to all diff --git a/src/coreclr/src/mscorlib/src/System/BadImageFormatException.cs b/src/coreclr/src/mscorlib/src/System/BadImageFormatException.cs index 3f3f4a5..e6332b6 100644 --- a/src/coreclr/src/mscorlib/src/System/BadImageFormatException.cs +++ b/src/coreclr/src/mscorlib/src/System/BadImageFormatException.cs @@ -20,7 +20,6 @@ namespace System { using SecurityException = System.Security.SecurityException; using System.Globalization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class BadImageFormatException : SystemException { diff --git a/src/coreclr/src/mscorlib/src/System/Boolean.cs b/src/coreclr/src/mscorlib/src/System/Boolean.cs index 9aaec9a..c085b0a 100644 --- a/src/coreclr/src/mscorlib/src/System/Boolean.cs +++ b/src/coreclr/src/mscorlib/src/System/Boolean.cs @@ -19,7 +19,6 @@ namespace System { // The Boolean class provides the // object representation of the boolean primitive type. [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public struct Boolean : IComparable, IConvertible, IComparable, IEquatable { diff --git a/src/coreclr/src/mscorlib/src/System/Buffer.cs b/src/coreclr/src/mscorlib/src/System/Buffer.cs index eee2a81..d2c203c 100644 --- a/src/coreclr/src/mscorlib/src/System/Buffer.cs +++ b/src/coreclr/src/mscorlib/src/System/Buffer.cs @@ -22,7 +22,6 @@ namespace System { using nuint = System.UInt32; #endif // BIT64 -[System.Runtime.InteropServices.ComVisible(true)] public static class Buffer { // Copies from one primitive array to another primitive array without diff --git a/src/coreclr/src/mscorlib/src/System/Byte.cs b/src/coreclr/src/mscorlib/src/System/Byte.cs index 980412b..666fdda 100644 --- a/src/coreclr/src/mscorlib/src/System/Byte.cs +++ b/src/coreclr/src/mscorlib/src/System/Byte.cs @@ -22,7 +22,6 @@ namespace System { // The Byte class extends the Value class and // provides object representation of the byte primitive type. // -[System.Runtime.InteropServices.ComVisible(true)] [Serializable] [System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)] public struct Byte : IComparable, IFormattable, IConvertible diff --git a/src/coreclr/src/mscorlib/src/System/Char.cs b/src/coreclr/src/mscorlib/src/System/Char.cs index b9c9305..7fe1c08 100644 --- a/src/coreclr/src/mscorlib/src/System/Char.cs +++ b/src/coreclr/src/mscorlib/src/System/Char.cs @@ -21,7 +21,6 @@ namespace System { using System.Diagnostics; using System.Diagnostics.Contracts; -[System.Runtime.InteropServices.ComVisible(true)] [Serializable] [System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)] public struct Char : IComparable, IConvertible , IComparable, IEquatable diff --git a/src/coreclr/src/mscorlib/src/System/Collections/ArrayList.cs b/src/coreclr/src/mscorlib/src/System/Collections/ArrayList.cs index b1eac14..3eb0160 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/ArrayList.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/ArrayList.cs @@ -35,7 +35,6 @@ namespace System.Collections { [DebuggerTypeProxy(typeof(System.Collections.ArrayList.ArrayListDebugView))] [DebuggerDisplay("Count = {Count}")] [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] internal class ArrayList : IList, ICloneable { private Object[] _items; diff --git a/src/coreclr/src/mscorlib/src/System/Collections/CollectionBase.cs b/src/coreclr/src/mscorlib/src/System/Collections/CollectionBase.cs index f9c529f..a3dd88a 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/CollectionBase.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/CollectionBase.cs @@ -12,7 +12,6 @@ namespace System.Collections { // Useful base class for typed read/write collections where items derive from object [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public abstract class CollectionBase : IList { private ArrayList list; diff --git a/src/coreclr/src/mscorlib/src/System/Collections/Comparer.cs b/src/coreclr/src/mscorlib/src/System/Collections/Comparer.cs index 98dba6d..7d4a3db 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/Comparer.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/Comparer.cs @@ -21,7 +21,6 @@ namespace System.Collections { using System.Diagnostics.Contracts; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] internal sealed class Comparer : IComparer , ISerializable { private CompareInfo m_compareInfo; diff --git a/src/coreclr/src/mscorlib/src/System/Collections/Concurrent/ConcurrentDictionary.cs b/src/coreclr/src/mscorlib/src/System/Collections/Concurrent/ConcurrentDictionary.cs index f7b6883..b8f449c 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/Concurrent/ConcurrentDictionary.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/Concurrent/ConcurrentDictionary.cs @@ -37,7 +37,6 @@ namespace System.Collections.Concurrent /// All public and protected members of are thread-safe and may be used /// concurrently from multiple threads. /// - [ComVisible(false)] [DebuggerTypeProxy(typeof(Mscorlib_DictionaryDebugView<,>))] [DebuggerDisplay("Count = {Count}")] public class ConcurrentDictionary : IDictionary, IDictionary, IReadOnlyDictionary diff --git a/src/coreclr/src/mscorlib/src/System/Collections/DictionaryEntry.cs b/src/coreclr/src/mscorlib/src/System/Collections/DictionaryEntry.cs index ac505c1..0c5d8b2 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/DictionaryEntry.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/DictionaryEntry.cs @@ -19,7 +19,6 @@ namespace System.Collections { using System.ComponentModel; // A DictionaryEntry holds a key and a value from a dictionary. // It is returned by IDictionaryEnumerator::GetEntry(). -[System.Runtime.InteropServices.ComVisible(true)] [Serializable] public struct DictionaryEntry { diff --git a/src/coreclr/src/mscorlib/src/System/Collections/Generic/Dictionary.cs b/src/coreclr/src/mscorlib/src/System/Collections/Generic/Dictionary.cs index c2b2da9..c3970e6 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/Generic/Dictionary.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/Generic/Dictionary.cs @@ -53,7 +53,6 @@ namespace System.Collections.Generic { [DebuggerTypeProxy(typeof(Mscorlib_DictionaryDebugView<,>))] [DebuggerDisplay("Count = {Count}")] [Serializable] - [System.Runtime.InteropServices.ComVisible(false)] public class Dictionary: IDictionary, IDictionary, IReadOnlyDictionary, ISerializable, IDeserializationCallback { private struct Entry { diff --git a/src/coreclr/src/mscorlib/src/System/Collections/Generic/KeyNotFoundException.cs b/src/coreclr/src/mscorlib/src/System/Collections/Generic/KeyNotFoundException.cs index ffcd040..1cd18cf 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/Generic/KeyNotFoundException.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/Generic/KeyNotFoundException.cs @@ -20,7 +20,6 @@ namespace System.Collections.Generic { using System.Runtime.Serialization; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class KeyNotFoundException : SystemException, ISerializable { public KeyNotFoundException () diff --git a/src/coreclr/src/mscorlib/src/System/Collections/Hashtable.cs b/src/coreclr/src/mscorlib/src/System/Collections/Hashtable.cs index 473608a..baf59f4 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/Hashtable.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/Hashtable.cs @@ -66,7 +66,6 @@ namespace System.Collections { // [DebuggerTypeProxy(typeof(System.Collections.Hashtable.HashtableDebugView))] [DebuggerDisplay("Count = {Count}")] - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] internal class Hashtable : IDictionary, ISerializable, IDeserializationCallback, ICloneable { /* diff --git a/src/coreclr/src/mscorlib/src/System/Collections/ICollection.cs b/src/coreclr/src/mscorlib/src/System/Collections/ICollection.cs index 6d4d6e1..088928a 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/ICollection.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/ICollection.cs @@ -19,7 +19,6 @@ namespace System.Collections { // Base interface for all collections, defining enumerators, size, and // synchronization methods. - [System.Runtime.InteropServices.ComVisible(true)] public interface ICollection : IEnumerable { // Interfaces are not serialable diff --git a/src/coreclr/src/mscorlib/src/System/Collections/IComparer.cs b/src/coreclr/src/mscorlib/src/System/Collections/IComparer.cs index d5a3448..574af1a 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/IComparer.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/IComparer.cs @@ -21,7 +21,6 @@ namespace System.Collections { // the Array and List classes. // // Interfaces are not serializable - [System.Runtime.InteropServices.ComVisible(true)] public interface IComparer { // Compares two objects. An implementation of this method must return a // value less than zero if x is less than y, zero if x is equal to y, or a diff --git a/src/coreclr/src/mscorlib/src/System/Collections/IDictionary.cs b/src/coreclr/src/mscorlib/src/System/Collections/IDictionary.cs index 4da89d6..519d53e 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/IDictionary.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/IDictionary.cs @@ -21,7 +21,6 @@ namespace System.Collections { // Keys can be any non-null object. Values can be any object. // You can look up a value in an IDictionary via the default indexed // property, Items. - [System.Runtime.InteropServices.ComVisible(true)] public interface IDictionary : ICollection { // Interfaces are not serializable diff --git a/src/coreclr/src/mscorlib/src/System/Collections/IDictionaryEnumerator.cs b/src/coreclr/src/mscorlib/src/System/Collections/IDictionaryEnumerator.cs index b995a04..2f1add6 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/IDictionaryEnumerator.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/IDictionaryEnumerator.cs @@ -44,7 +44,6 @@ namespace System.Collections { // return the same DictionaryEntry and avoids boxing the DictionaryEntry (boxing // is somewhat expensive). // -[System.Runtime.InteropServices.ComVisible(true)] public interface IDictionaryEnumerator : IEnumerator { // Returns the key of the current element of the enumeration. The returned diff --git a/src/coreclr/src/mscorlib/src/System/Collections/IEnumerable.cs b/src/coreclr/src/mscorlib/src/System/Collections/IEnumerable.cs index 5fa63f1..1d8e71c 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/IEnumerable.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/IEnumerable.cs @@ -21,7 +21,6 @@ namespace System.Collections { // Implement this interface if you need to support VB's foreach semantics. // Also, COM classes that support an enumerator will also implement this interface. [Guid("496B0ABE-CDEE-11d3-88E8-00902754C43A")] - [System.Runtime.InteropServices.ComVisible(true)] public interface IEnumerable { // Interfaces are not serializable diff --git a/src/coreclr/src/mscorlib/src/System/Collections/IEnumerator.cs b/src/coreclr/src/mscorlib/src/System/Collections/IEnumerator.cs index 99509d1..4c4fc08 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/IEnumerator.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/IEnumerator.cs @@ -20,7 +20,6 @@ namespace System.Collections { // Base interface for all enumerators, providing a simple approach // to iterating over a collection. [Guid("496B0ABF-CDEE-11d3-88E8-00902754C43A")] - [System.Runtime.InteropServices.ComVisible(true)] public interface IEnumerator { // Interfaces are not serializable diff --git a/src/coreclr/src/mscorlib/src/System/Collections/IEqualityComparer.cs b/src/coreclr/src/mscorlib/src/System/Collections/IEqualityComparer.cs index 50c732f..f591b11 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/IEqualityComparer.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/IEqualityComparer.cs @@ -19,7 +19,6 @@ namespace System.Collections { using System; // An IEqualityComparer is a mechanism to consume custom performant comparison infrastructure // that can be consumed by some of the common collections. - [System.Runtime.InteropServices.ComVisible(true)] public interface IEqualityComparer { bool Equals(Object x, Object y); int GetHashCode(Object obj); diff --git a/src/coreclr/src/mscorlib/src/System/Collections/IHashCodeProvider.cs b/src/coreclr/src/mscorlib/src/System/Collections/IHashCodeProvider.cs index ae917b0..0ae1e32 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/IHashCodeProvider.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/IHashCodeProvider.cs @@ -19,7 +19,6 @@ namespace System.Collections { // Provides a mechanism for a hash table user to override the default // GetHashCode() function on Objects, providing their own hash function. [Obsolete("Please use IEqualityComparer instead.")] - [System.Runtime.InteropServices.ComVisible(true)] internal interface IHashCodeProvider { // Interfaces are not serializable diff --git a/src/coreclr/src/mscorlib/src/System/Collections/IList.cs b/src/coreclr/src/mscorlib/src/System/Collections/IList.cs index 8bdfe4c..8b63400 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/IList.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/IList.cs @@ -21,7 +21,6 @@ namespace System.Collections { // An IList is an ordered collection of objects. The exact ordering // is up to the implementation of the list, ranging from a sorted // order to insertion order. - [System.Runtime.InteropServices.ComVisible(true)] public interface IList : ICollection { // The Item property provides methods to read and edit entries in the List. diff --git a/src/coreclr/src/mscorlib/src/System/Collections/ObjectModel/Collection.cs b/src/coreclr/src/mscorlib/src/System/Collections/ObjectModel/Collection.cs index a3804ad..b3b19fb 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/ObjectModel/Collection.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/ObjectModel/Collection.cs @@ -13,7 +13,6 @@ namespace System.Collections.ObjectModel using System.Runtime; [Serializable] - [System.Runtime.InteropServices.ComVisible(false)] [DebuggerTypeProxy(typeof(Mscorlib_CollectionDebugView<>))] [DebuggerDisplay("Count = {Count}")] public class Collection: IList, IList, IReadOnlyList diff --git a/src/coreclr/src/mscorlib/src/System/Collections/ObjectModel/KeyedCollection.cs b/src/coreclr/src/mscorlib/src/System/Collections/ObjectModel/KeyedCollection.cs index b6fe6de..3fe7716 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/ObjectModel/KeyedCollection.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/ObjectModel/KeyedCollection.cs @@ -12,7 +12,6 @@ namespace System.Collections.ObjectModel using System.Diagnostics.Contracts; [Serializable] - [System.Runtime.InteropServices.ComVisible(false)] [DebuggerTypeProxy(typeof(Mscorlib_KeyedCollectionDebugView<,>))] [DebuggerDisplay("Count = {Count}")] public abstract class KeyedCollection: Collection diff --git a/src/coreclr/src/mscorlib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs b/src/coreclr/src/mscorlib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs index a0b8b3b..10c48cf 100644 --- a/src/coreclr/src/mscorlib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs +++ b/src/coreclr/src/mscorlib/src/System/Collections/ObjectModel/ReadOnlyCollection.cs @@ -13,7 +13,6 @@ namespace System.Collections.ObjectModel using System.Runtime; [Serializable] - [System.Runtime.InteropServices.ComVisible(false)] [DebuggerTypeProxy(typeof(Mscorlib_CollectionDebugView<>))] [DebuggerDisplay("Count = {Count}")] public class ReadOnlyCollection: IList, IList, IReadOnlyList diff --git a/src/coreclr/src/mscorlib/src/System/Configuration/Assemblies/AssemblyHashAlgorithm.cs b/src/coreclr/src/mscorlib/src/System/Configuration/Assemblies/AssemblyHashAlgorithm.cs index 6c4fb3f..a19d034 100644 --- a/src/coreclr/src/mscorlib/src/System/Configuration/Assemblies/AssemblyHashAlgorithm.cs +++ b/src/coreclr/src/mscorlib/src/System/Configuration/Assemblies/AssemblyHashAlgorithm.cs @@ -16,17 +16,13 @@ namespace System.Configuration.Assemblies { using System; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public enum AssemblyHashAlgorithm { None = 0, MD5 = 0x8003, SHA1 = 0x8004, - [ComVisible(false)] SHA256 = 0x800c, - [ComVisible(false)] SHA384 = 0x800d, - [ComVisible(false)] SHA512 = 0x800e, } } diff --git a/src/coreclr/src/mscorlib/src/System/Configuration/Assemblies/AssemblyVersionCompatibility.cs b/src/coreclr/src/mscorlib/src/System/Configuration/Assemblies/AssemblyVersionCompatibility.cs index 4b0f1e4..b7e9c30 100644 --- a/src/coreclr/src/mscorlib/src/System/Configuration/Assemblies/AssemblyVersionCompatibility.cs +++ b/src/coreclr/src/mscorlib/src/System/Configuration/Assemblies/AssemblyVersionCompatibility.cs @@ -14,7 +14,6 @@ namespace System.Configuration.Assemblies { using System; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum AssemblyVersionCompatibility { SameMachine = 1, diff --git a/src/coreclr/src/mscorlib/src/System/Convert.cs b/src/coreclr/src/mscorlib/src/System/Convert.cs index 302a3bb..0cd3c5d 100644 --- a/src/coreclr/src/mscorlib/src/System/Convert.cs +++ b/src/coreclr/src/mscorlib/src/System/Convert.cs @@ -2158,7 +2158,6 @@ namespace System { return ToBase64String(inArray, 0, inArray.Length, Base64FormattingOptions.None); } - [System.Runtime.InteropServices.ComVisible(false)] public static String ToBase64String(byte[] inArray, Base64FormattingOptions options) { if (inArray==null) { throw new ArgumentNullException(nameof(inArray)); @@ -2172,7 +2171,6 @@ namespace System { return ToBase64String(inArray, offset, length, Base64FormattingOptions.None); } - [System.Runtime.InteropServices.ComVisible(false)] public static unsafe String ToBase64String(byte[] inArray, int offset, int length, Base64FormattingOptions options) { //Do data verfication if (inArray==null) @@ -2218,7 +2216,6 @@ namespace System { return ToBase64CharArray(inArray, offsetIn, length, outArray, offsetOut, Base64FormattingOptions.None); } - [System.Runtime.InteropServices.ComVisible(false)] public static unsafe int ToBase64CharArray(byte[] inArray, int offsetIn, int length, char[] outArray, int offsetOut, Base64FormattingOptions options) { //Do data verfication if (inArray==null) diff --git a/src/coreclr/src/mscorlib/src/System/DBNull.cs b/src/coreclr/src/mscorlib/src/System/DBNull.cs index 6f80af7..bc04b17 100644 --- a/src/coreclr/src/mscorlib/src/System/DBNull.cs +++ b/src/coreclr/src/mscorlib/src/System/DBNull.cs @@ -12,7 +12,6 @@ namespace System { using System.Runtime.Remoting; using System.Runtime.Serialization; using System.Security.Permissions; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public sealed class DBNull : ISerializable, IConvertible { diff --git a/src/coreclr/src/mscorlib/src/System/Decimal.cs b/src/coreclr/src/mscorlib/src/System/Decimal.cs index 1d2b311..e7ee421 100644 --- a/src/coreclr/src/mscorlib/src/System/Decimal.cs +++ b/src/coreclr/src/mscorlib/src/System/Decimal.cs @@ -57,7 +57,6 @@ namespace System { // the range of the Decimal type. [StructLayout(LayoutKind.Sequential)] [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] [System.Runtime.Versioning.NonVersionable] // This only applies to field layout public struct Decimal : IFormattable, IComparable, IConvertible, IComparable, IEquatable, IDeserializationCallback { diff --git a/src/coreclr/src/mscorlib/src/System/Delegate.cs b/src/coreclr/src/mscorlib/src/System/Delegate.cs index bca88c1..12a64ba 100644 --- a/src/coreclr/src/mscorlib/src/System/Delegate.cs +++ b/src/coreclr/src/mscorlib/src/System/Delegate.cs @@ -17,7 +17,6 @@ namespace System { [Serializable] [ClassInterface(ClassInterfaceType.AutoDual)] - [System.Runtime.InteropServices.ComVisible(true)] public abstract class Delegate : ICloneable, ISerializable { // _target is the object we will invoke on @@ -191,7 +190,6 @@ namespace System { return a.CombineImpl(b); } - [System.Runtime.InteropServices.ComVisible(true)] public static Delegate Combine(params Delegate[] delegates) { if (delegates == null || delegates.Length == 0) diff --git a/src/coreclr/src/mscorlib/src/System/Diagnostics/ConditionalAttribute.cs b/src/coreclr/src/mscorlib/src/System/Diagnostics/ConditionalAttribute.cs index b20931f..c57fb59 100644 --- a/src/coreclr/src/mscorlib/src/System/Diagnostics/ConditionalAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/Diagnostics/ConditionalAttribute.cs @@ -7,7 +7,6 @@ using System; namespace System.Diagnostics { [Serializable] [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple=true)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class ConditionalAttribute : Attribute { public ConditionalAttribute(String conditionString) diff --git a/src/coreclr/src/mscorlib/src/System/Diagnostics/Debugger.cs b/src/coreclr/src/mscorlib/src/System/Diagnostics/Debugger.cs index b738c01..9be87d1 100644 --- a/src/coreclr/src/mscorlib/src/System/Diagnostics/Debugger.cs +++ b/src/coreclr/src/mscorlib/src/System/Diagnostics/Debugger.cs @@ -17,7 +17,6 @@ namespace System.Diagnostics using System.Runtime.Versioning; // No data, does not need to be marked with the serializable attribute - [System.Runtime.InteropServices.ComVisible(true)] public sealed class Debugger { // This should have been a static class, but wasn't as of v3.5. Clearly, this is @@ -85,7 +84,6 @@ namespace System.Diagnostics // notification will apprise the debugger that it will need to slip a thread or abort the funceval // in such a situation. The notification is subject to collection after this function returns. // - [method:System.Runtime.InteropServices.ComVisible(false)] public static void NotifyOfCrossThreadDependency() { if (Debugger.IsAttached) diff --git a/src/coreclr/src/mscorlib/src/System/Diagnostics/DebuggerAttributes.cs b/src/coreclr/src/mscorlib/src/System/Diagnostics/DebuggerAttributes.cs index 6f8bf7a..ce9987b 100644 --- a/src/coreclr/src/mscorlib/src/System/Diagnostics/DebuggerAttributes.cs +++ b/src/coreclr/src/mscorlib/src/System/Diagnostics/DebuggerAttributes.cs @@ -19,7 +19,6 @@ namespace System.Diagnostics { [Serializable] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)] - [ComVisible(true)] public sealed class DebuggerStepThroughAttribute : Attribute { public DebuggerStepThroughAttribute () {} @@ -27,7 +26,6 @@ namespace System.Diagnostics { [Serializable] [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Constructor, Inherited = false)] - [ComVisible(true)] public sealed class DebuggerHiddenAttribute : Attribute { public DebuggerHiddenAttribute () {} @@ -35,7 +33,6 @@ namespace System.Diagnostics { [Serializable] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Constructor |AttributeTargets.Struct, Inherited = false)] - [ComVisible(true)] public sealed class DebuggerNonUserCodeAttribute : Attribute { public DebuggerNonUserCodeAttribute () {} @@ -50,11 +47,9 @@ namespace System.Diagnostics { // won't preserve the debugging info, which will make debugging after // a JIT attach difficult. [AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Module, AllowMultiple = false)] - [ComVisible(true)] public sealed class DebuggableAttribute : Attribute { [Flags] - [ComVisible(true)] public enum DebuggingModes { None = 0x0, @@ -113,7 +108,6 @@ namespace System.Diagnostics { // Please also change the code which validates DebuggerBrowsableState variable (in this file) // if you change this enum. - [ComVisible(true)] public enum DebuggerBrowsableState { Never = 0, @@ -127,7 +121,6 @@ namespace System.Diagnostics { // the one currently supported with the csee.dat // (mcee.dat, autoexp.dat) file. [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)] - [ComVisible(true)] public sealed class DebuggerBrowsableAttribute: Attribute { private DebuggerBrowsableState state; @@ -148,7 +141,6 @@ namespace System.Diagnostics { // DebuggerTypeProxyAttribute [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Class | AttributeTargets.Assembly, AllowMultiple = true)] - [ComVisible(true)] public sealed class DebuggerTypeProxyAttribute: Attribute { private string typeName; @@ -207,7 +199,6 @@ namespace System.Diagnostics { // however: there is no access to aliases, locals, or pointers. // In addition, attributes on properties referenced in the expression are not processed. [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Assembly, AllowMultiple = true)] - [ComVisible(true)] public sealed class DebuggerDisplayAttribute : Attribute { private string name; diff --git a/src/coreclr/src/mscorlib/src/System/Diagnostics/Stackframe.cs b/src/coreclr/src/mscorlib/src/System/Diagnostics/Stackframe.cs index cf13617..10b382f 100644 --- a/src/coreclr/src/mscorlib/src/System/Diagnostics/Stackframe.cs +++ b/src/coreclr/src/mscorlib/src/System/Diagnostics/Stackframe.cs @@ -13,7 +13,6 @@ namespace System.Diagnostics { // There is no good reason for the methods of this class to be virtual. [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class StackFrame { private MethodBase method; diff --git a/src/coreclr/src/mscorlib/src/System/Diagnostics/Stacktrace.cs b/src/coreclr/src/mscorlib/src/System/Diagnostics/Stacktrace.cs index 6060a64..f00f466 100644 --- a/src/coreclr/src/mscorlib/src/System/Diagnostics/Stacktrace.cs +++ b/src/coreclr/src/mscorlib/src/System/Diagnostics/Stacktrace.cs @@ -252,7 +252,6 @@ namespace System.Diagnostics { // StackTrace, we use an InheritanceDemand to prevent partially-trusted // subclasses. [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class StackTrace { private StackFrame[] frames; @@ -515,7 +514,6 @@ namespace System.Diagnostics { // The nth element of this array is the same as GetFrame(n). // The length of the array is the same as FrameCount. // - [ComVisible(false)] public virtual StackFrame [] GetFrames() { if (frames == null || m_iNumOfFrames <= 0) diff --git a/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/ISymDocumentWriter.cs b/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/ISymDocumentWriter.cs index 2b7b078..a1a2366 100644 --- a/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/ISymDocumentWriter.cs +++ b/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/ISymDocumentWriter.cs @@ -17,7 +17,6 @@ namespace System.Diagnostics.SymbolStore { using System; // Interface does not need to be marked with the serializable attribute - [System.Runtime.InteropServices.ComVisible(true)] public interface ISymbolDocumentWriter { // SetSource will store the raw source for a document into the diff --git a/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/ISymWriter.cs b/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/ISymWriter.cs index 8365e18..bfe9133 100644 --- a/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/ISymWriter.cs +++ b/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/ISymWriter.cs @@ -20,7 +20,6 @@ namespace System.Diagnostics.SymbolStore { using System.Runtime.Versioning; // Interface does not need to be marked with the serializable attribute -[System.Runtime.InteropServices.ComVisible(true)] internal interface ISymbolWriter { diff --git a/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/SymAddressKind.cs b/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/SymAddressKind.cs index f3eaaee..bb50d98 100644 --- a/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/SymAddressKind.cs +++ b/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/SymAddressKind.cs @@ -16,7 +16,6 @@ namespace System.Diagnostics.SymbolStore { using System; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] internal enum SymAddressKind { // ILOffset: addr1 = IL local var or param index. diff --git a/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/Token.cs b/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/Token.cs index 4e00e77..cc1e4a8 100644 --- a/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/Token.cs +++ b/src/coreclr/src/mscorlib/src/System/Diagnostics/SymbolStore/Token.cs @@ -14,7 +14,6 @@ namespace System.Diagnostics.SymbolStore { using System; using System.Runtime.InteropServices; - [ComVisible(true)] internal struct SymbolToken { internal int m_token; diff --git a/src/coreclr/src/mscorlib/src/System/DllNotFoundException.cs b/src/coreclr/src/mscorlib/src/System/DllNotFoundException.cs index f860904..43bb57f 100644 --- a/src/coreclr/src/mscorlib/src/System/DllNotFoundException.cs +++ b/src/coreclr/src/mscorlib/src/System/DllNotFoundException.cs @@ -16,7 +16,6 @@ namespace System { using System; using System.Runtime.Serialization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class DllNotFoundException : TypeLoadException { public DllNotFoundException() diff --git a/src/coreclr/src/mscorlib/src/System/Double.cs b/src/coreclr/src/mscorlib/src/System/Double.cs index ce146a1..5319cba 100644 --- a/src/coreclr/src/mscorlib/src/System/Double.cs +++ b/src/coreclr/src/mscorlib/src/System/Double.cs @@ -22,7 +22,6 @@ namespace System { [Serializable] [StructLayout(LayoutKind.Sequential)] -[System.Runtime.InteropServices.ComVisible(true)] public struct Double : IComparable, IFormattable, IConvertible , IComparable, IEquatable { diff --git a/src/coreclr/src/mscorlib/src/System/Enum.cs b/src/coreclr/src/mscorlib/src/System/Enum.cs index b3efc76..97cfdf1 100644 --- a/src/coreclr/src/mscorlib/src/System/Enum.cs +++ b/src/coreclr/src/mscorlib/src/System/Enum.cs @@ -15,7 +15,6 @@ using System.Diagnostics.Contracts; namespace System { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public abstract class Enum : ValueType, IComparable, IFormattable, IConvertible { #region Private Constants @@ -367,13 +366,11 @@ namespace System return retValue; } - [System.Runtime.InteropServices.ComVisible(true)] public static Object Parse(Type enumType, String value) { return Parse(enumType, value, false); } - [System.Runtime.InteropServices.ComVisible(true)] public static Object Parse(Type enumType, String value, bool ignoreCase) { EnumResult parseResult = new EnumResult() { canThrow = true }; @@ -531,7 +528,6 @@ namespace System } } - [System.Runtime.InteropServices.ComVisible(true)] public static Type GetUnderlyingType(Type enumType) { if (enumType == null) @@ -542,7 +538,6 @@ namespace System return enumType.GetEnumUnderlyingType(); } - [System.Runtime.InteropServices.ComVisible(true)] public static Array GetValues(Type enumType) { if (enumType == null) @@ -559,7 +554,6 @@ namespace System return GetCachedValuesAndNames(enumType, false).Values; } - [System.Runtime.InteropServices.ComVisible(true)] public static String GetName(Type enumType, Object value) { if (enumType == null) @@ -569,7 +563,6 @@ namespace System return enumType.GetEnumName(value); } - [System.Runtime.InteropServices.ComVisible(true)] public static String[] GetNames(Type enumType) { if (enumType == null) @@ -586,7 +579,6 @@ namespace System return GetCachedValuesAndNames(enumType, true).Names; } - [System.Runtime.InteropServices.ComVisible(true)] public static Object ToObject(Type enumType, Object value) { if (value == null) @@ -635,7 +627,6 @@ namespace System } [Pure] - [System.Runtime.InteropServices.ComVisible(true)] public static bool IsDefined(Type enumType, Object value) { if (enumType == null) @@ -645,7 +636,6 @@ namespace System return enumType.IsEnumDefined(value); } - [System.Runtime.InteropServices.ComVisible(true)] public static String Format(Type enumType, Object value, String format) { if (enumType == null) @@ -1104,7 +1094,6 @@ namespace System #region ToObject [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(true)] public static Object ToObject(Type enumType, sbyte value) { if (enumType == null) @@ -1118,7 +1107,6 @@ namespace System return InternalBoxEnum(rtType, value); } - [System.Runtime.InteropServices.ComVisible(true)] public static Object ToObject(Type enumType, short value) { if (enumType == null) @@ -1132,7 +1120,6 @@ namespace System return InternalBoxEnum(rtType, value); } - [System.Runtime.InteropServices.ComVisible(true)] public static Object ToObject(Type enumType, int value) { if (enumType == null) @@ -1146,7 +1133,6 @@ namespace System return InternalBoxEnum(rtType, value); } - [System.Runtime.InteropServices.ComVisible(true)] public static Object ToObject(Type enumType, byte value) { if (enumType == null) @@ -1161,7 +1147,6 @@ namespace System } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(true)] public static Object ToObject(Type enumType, ushort value) { if (enumType == null) @@ -1176,7 +1161,6 @@ namespace System } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(true)] public static Object ToObject(Type enumType, uint value) { if (enumType == null) @@ -1190,7 +1174,6 @@ namespace System return InternalBoxEnum(rtType, value); } - [System.Runtime.InteropServices.ComVisible(true)] public static Object ToObject(Type enumType, long value) { if (enumType == null) @@ -1205,7 +1188,6 @@ namespace System } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(true)] public static Object ToObject(Type enumType, ulong value) { if (enumType == null) diff --git a/src/coreclr/src/mscorlib/src/System/Environment.cs b/src/coreclr/src/mscorlib/src/System/Environment.cs index f71476e..d082f21 100644 --- a/src/coreclr/src/mscorlib/src/System/Environment.cs +++ b/src/coreclr/src/mscorlib/src/System/Environment.cs @@ -31,7 +31,6 @@ namespace System { using System.Runtime.Versioning; using System.Diagnostics.Contracts; - [ComVisible(true)] public enum EnvironmentVariableTarget { Process = 0, @@ -39,7 +38,6 @@ namespace System { Machine = 2, } - [ComVisible(true)] public static partial class Environment { // Assume the following constants include the terminating '\0' - use <, not <= diff --git a/src/coreclr/src/mscorlib/src/System/Exception.cs b/src/coreclr/src/mscorlib/src/System/Exception.cs index 6608606..ccde550 100644 --- a/src/coreclr/src/mscorlib/src/System/Exception.cs +++ b/src/coreclr/src/mscorlib/src/System/Exception.cs @@ -30,7 +30,6 @@ namespace System { [ClassInterface(ClassInterfaceType.None)] [ComDefaultInterface(typeof(_Exception))] [Serializable] - [ComVisible(true)] public class Exception : ISerializable, _Exception { private void Init() diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/Calendar.cs b/src/coreclr/src/mscorlib/src/System/Globalization/Calendar.cs index d046038..1ff795d 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/Calendar.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/Calendar.cs @@ -31,7 +31,6 @@ namespace System.Globalization { // since most of the calendars (or all?) have the same way of calcuating hour/minute/second. [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public abstract class Calendar : ICloneable { @@ -98,7 +97,6 @@ namespace System.Globalization { // The minimum supported DateTime range for the calendar. - [System.Runtime.InteropServices.ComVisible(false)] public virtual DateTime MinSupportedDateTime { get @@ -109,7 +107,6 @@ namespace System.Globalization { // The maximum supported DateTime range for the calendar. - [System.Runtime.InteropServices.ComVisible(false)] public virtual DateTime MaxSupportedDateTime { get @@ -145,7 +142,6 @@ namespace System.Globalization { // Returns the type of the calendar. // - [System.Runtime.InteropServices.ComVisible(false)] public virtual CalendarAlgorithmType AlgorithmType { get @@ -161,7 +157,6 @@ namespace System.Globalization { // Detect if the object is readonly. // //////////////////////////////////////////////////////////////////////// - [System.Runtime.InteropServices.ComVisible(false)] public bool IsReadOnly { get { return (m_isReadOnly); } @@ -174,7 +169,6 @@ namespace System.Globalization { // Is the implementation of ICloneable. // //////////////////////////////////////////////////////////////////////// - [System.Runtime.InteropServices.ComVisible(false)] public virtual Object Clone() { object o = MemberwiseClone(); @@ -190,7 +184,6 @@ namespace System.Globalization { // readonly. // //////////////////////////////////////////////////////////////////////// - [System.Runtime.InteropServices.ComVisible(false)] public static Calendar ReadOnly(Calendar calendar) { if (calendar == null) { throw new ArgumentNullException(nameof(calendar)); } @@ -709,7 +702,6 @@ namespace System.Globalization { // if this calendar does not have leap month, or this year is not a leap year. // - [System.Runtime.InteropServices.ComVisible(false)] public virtual int GetLeapMonth(int year) { return (GetLeapMonth(year, CurrentEra)); @@ -719,7 +711,6 @@ namespace System.Globalization { // if this calendar does not have leap month, or this year is not a leap year. // - [System.Runtime.InteropServices.ComVisible(false)] public virtual int GetLeapMonth(int year, int era) { if (!IsLeapYear(year, era)) diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/CalendarAlgorithmType.cs b/src/coreclr/src/mscorlib/src/System/Globalization/CalendarAlgorithmType.cs index 4bf6366..33b5035 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/CalendarAlgorithmType.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/CalendarAlgorithmType.cs @@ -5,7 +5,6 @@ namespace System.Globalization { using System; -[System.Runtime.InteropServices.ComVisible(true)] public enum CalendarAlgorithmType { Unknown = 0, // This is the default value to return in the Calendar base class. SolarCalendar = 1, // Solar-base calendar, such as GregorianCalendar, jaoaneseCalendar, JulianCalendar, etc. diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/CalendarWeekRule.cs b/src/coreclr/src/mscorlib/src/System/Globalization/CalendarWeekRule.cs index 578b567..fa2a642 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/CalendarWeekRule.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/CalendarWeekRule.cs @@ -7,7 +7,6 @@ namespace System.Globalization { [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum CalendarWeekRule { diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/ChineseLunisolarCalendar.cs b/src/coreclr/src/mscorlib/src/System/Globalization/ChineseLunisolarCalendar.cs index 6479152..374ed0d 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/ChineseLunisolarCalendar.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/ChineseLunisolarCalendar.cs @@ -44,7 +44,6 @@ namespace System.Globalization { internal static DateTime minDate = new DateTime(MIN_GREGORIAN_YEAR, MIN_GREGORIAN_MONTH, MIN_GREGORIAN_DAY); internal static DateTime maxDate = new DateTime((new DateTime(MAX_GREGORIAN_YEAR, MAX_GREGORIAN_MONTH, MAX_GREGORIAN_DAY, 23, 59, 59, 999)).Ticks + 9999); - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MinSupportedDateTime { get { @@ -53,7 +52,6 @@ namespace System.Globalization { } - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MaxSupportedDateTime { get { @@ -371,7 +369,6 @@ namespace System.Globalization { } - [System.Runtime.InteropServices.ComVisible(false)] public override int GetEra(DateTime time) { CheckTicksRange(time.Ticks); return (ChineseEra); @@ -391,7 +388,6 @@ namespace System.Globalization { } - [System.Runtime.InteropServices.ComVisible(false)] public override int[] Eras { get { return (new int[] {ChineseEra}); diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/CompareInfo.cs b/src/coreclr/src/mscorlib/src/System/Globalization/CompareInfo.cs index dcf1f32..2ff830b 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/CompareInfo.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/CompareInfo.cs @@ -45,7 +45,6 @@ namespace System.Globalization { [Serializable] [Flags] - [System.Runtime.InteropServices.ComVisible(true)] public enum CompareOptions { None = 0x00000000, @@ -66,7 +65,6 @@ namespace System.Globalization { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public partial class CompareInfo : IDeserializationCallback { // Mask used to check if IndexOf()/LastIndexOf()/IsPrefix()/IsPostfix() has the right flags. @@ -217,12 +215,10 @@ namespace System.Globalization { return CultureInfo.GetCultureInfo(name).CompareInfo; } - [System.Runtime.InteropServices.ComVisible(false)] public static bool IsSortable(char ch) { return(IsSortable(ch.ToString())); } - [System.Runtime.InteropServices.ComVisible(false)] public static bool IsSortable(String text) { if (text == null) { // A null param is invalid here. @@ -316,7 +312,6 @@ namespace System.Globalization { // //////////////////////////////////////////////////////////////////////// - [System.Runtime.InteropServices.ComVisible(false)] public virtual String Name { get diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/CultureInfo.cs b/src/coreclr/src/mscorlib/src/System/Globalization/CultureInfo.cs index 795ff9e..41356c5 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/CultureInfo.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/CultureInfo.cs @@ -44,7 +44,6 @@ namespace System.Globalization { using System.Resources; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public partial class CultureInfo : ICloneable, IFormatProvider { //--------------------------------------------------------------------// // Internal Information // @@ -862,7 +861,6 @@ namespace System.Globalization { // //////////////////////////////////////////////////////////////////////// #if FEATURE_USE_LCID - [System.Runtime.InteropServices.ComVisible(false)] public virtual int KeyboardLayoutId { get @@ -923,7 +921,6 @@ namespace System.Globalization { } } - [System.Runtime.InteropServices.ComVisible(false)] public String IetfLanguageTag { get @@ -1171,7 +1168,6 @@ namespace System.Globalization { } } - [System.Runtime.InteropServices.ComVisible(false)] public CultureTypes CultureTypes { get @@ -1386,7 +1382,6 @@ namespace System.Globalization { } } - [System.Runtime.InteropServices.ComVisible(false)] public CultureInfo GetConsoleFallbackUICulture() { Contract.Ensures(Contract.Result() != null); diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/CultureNotFoundException.cs b/src/coreclr/src/mscorlib/src/System/Globalization/CultureNotFoundException.cs index 17c0b43..d4ab700 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/CultureNotFoundException.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/CultureNotFoundException.cs @@ -10,7 +10,6 @@ namespace System.Globalization { using System.Threading; using System.Diagnostics.Contracts; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public partial class CultureNotFoundException : ArgumentException, ISerializable { diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/CultureTypes.cs b/src/coreclr/src/mscorlib/src/System/Globalization/CultureTypes.cs index d506d50..b19ab86 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/CultureTypes.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/CultureTypes.cs @@ -11,7 +11,6 @@ namespace System.Globalization { [Serializable] [Flags] - [System.Runtime.InteropServices.ComVisible(true)] public enum CultureTypes { NeutralCultures = 0x0001, // Neutral cultures are cultures like "en", "de", "zh", etc, for enumeration this includes ALL neutrals regardless of other flags diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/DateTimeFormatInfo.cs b/src/coreclr/src/mscorlib/src/System/Globalization/DateTimeFormatInfo.cs index d4acf01..e615dc3 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/DateTimeFormatInfo.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/DateTimeFormatInfo.cs @@ -56,7 +56,6 @@ namespace System.Globalization { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class DateTimeFormatInfo : ICloneable, IFormatProvider { // @@ -1358,7 +1357,6 @@ namespace System.Globalization { // Returns the string array of the one-letter day of week names. - [System.Runtime.InteropServices.ComVisible(false)] public String[] ShortestDayNames { get @@ -1581,7 +1579,6 @@ namespace System.Globalization { // Returns the super short day of week names for the specified day of week. - [System.Runtime.InteropServices.ComVisible(false)] public String GetShortestDayName(DayOfWeek dayOfWeek) { @@ -1959,7 +1956,6 @@ namespace System.Globalization { // String nativeName = dtfi.NativeCalendarName; // Get the Japanese name for the Japanese calendar. // DateTimeFormatInfo dtfi = new CultureInfo("ja-JP", false).DateTimeFormat.Calendar = new GregorianCalendar(GregorianCalendarTypes.Localized); // String nativeName = dtfi.NativeCalendarName; // Get the Japanese name for the Gregorian calendar. - [System.Runtime.InteropServices.ComVisible(false)] public String NativeCalendarName { get @@ -1986,7 +1982,6 @@ namespace System.Globalization { // WARNING: If more validation is ever done in one place, it should be done in the other. // - [System.Runtime.InteropServices.ComVisible(false)] public void SetAllDateTimePatterns(String[] patterns, char format) { if (IsReadOnly) @@ -2049,7 +2044,6 @@ namespace System.Globalization { return; } - [System.Runtime.InteropServices.ComVisible(false)] public String[] AbbreviatedMonthGenitiveNames { get @@ -2077,7 +2071,6 @@ namespace System.Globalization { } } - [System.Runtime.InteropServices.ComVisible(false)] public String[] MonthGenitiveNames { get diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/DateTimeStyles.cs b/src/coreclr/src/mscorlib/src/System/Globalization/DateTimeStyles.cs index ddae7b2..eadeda8 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/DateTimeStyles.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/DateTimeStyles.cs @@ -16,7 +16,6 @@ namespace System.Globalization { [Serializable] [Flags] -[System.Runtime.InteropServices.ComVisible(true)] public enum DateTimeStyles { // Bit flag indicating that leading whitespace is allowed. Character values // 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, and 0x0020 are considered to be diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/DaylightTime.cs b/src/coreclr/src/mscorlib/src/System/Globalization/DaylightTime.cs index a164867..a21e092 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/DaylightTime.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/DaylightTime.cs @@ -8,7 +8,6 @@ namespace System.Globalization { // This class represents a starting/ending time for a period of daylight saving time. [Serializable] - [ComVisible(true)] public class DaylightTime { internal DateTime m_start; diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/DigitShapes.cs b/src/coreclr/src/mscorlib/src/System/Globalization/DigitShapes.cs index d5b5ecc..1513d56 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/DigitShapes.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/DigitShapes.cs @@ -9,7 +9,6 @@ namespace System.Globalization { [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum DigitShapes : int { Context = 0x0000, // The shape depends on the previous text in the same output. diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/EastAsianLunisolarCalendar.cs b/src/coreclr/src/mscorlib/src/System/Globalization/EastAsianLunisolarCalendar.cs index 3c9391f..3f6df52 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/EastAsianLunisolarCalendar.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/EastAsianLunisolarCalendar.cs @@ -14,7 +14,6 @@ namespace System.Globalization { [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public abstract class EastAsianLunisolarCalendar : Calendar { internal const int LeapMonth = 0; internal const int Jan1Month = 1; diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/GregorianCalendar.cs b/src/coreclr/src/mscorlib/src/System/Globalization/GregorianCalendar.cs index 6cf9b2e..9083e6d 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/GregorianCalendar.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/GregorianCalendar.cs @@ -22,7 +22,6 @@ namespace System.Globalization { // 0 CurrentEra (AD) // 1 BeforeCurrentEra (BC) - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class GregorianCalendar : Calendar { @@ -77,7 +76,6 @@ namespace System.Globalization { } #endregion Serialization - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MinSupportedDateTime { get @@ -86,7 +84,6 @@ namespace System.Globalization { } } - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MaxSupportedDateTime { get @@ -98,7 +95,6 @@ namespace System.Globalization { // Return the type of the Gregorian calendar. // - [System.Runtime.InteropServices.ComVisible(false)] public override CalendarAlgorithmType AlgorithmType { get @@ -495,7 +491,6 @@ namespace System.Globalization { // if this calendar does not have leap month, or this year is not a leap year. // - [System.Runtime.InteropServices.ComVisible(false)] public override int GetLeapMonth(int year, int era) { if (era != CurrentEra && era != ADEra) diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/GregorianCalendarTypes.cs b/src/coreclr/src/mscorlib/src/System/Globalization/GregorianCalendarTypes.cs index a9e25d0..1af5e92 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/GregorianCalendarTypes.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/GregorianCalendarTypes.cs @@ -6,7 +6,6 @@ namespace System.Globalization { using System; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum GregorianCalendarTypes { Localized = Calendar.CAL_GREGORIAN, USEnglish = Calendar.CAL_GREGORIAN_US, diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/HebrewCalendar.cs b/src/coreclr/src/mscorlib/src/System/Globalization/HebrewCalendar.cs index 44cbdb8..190c3f1 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/HebrewCalendar.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/HebrewCalendar.cs @@ -64,7 +64,6 @@ namespace System.Globalization { [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public class HebrewCalendar : Calendar { diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/HijriCalendar.cs b/src/coreclr/src/mscorlib/src/System/Globalization/HijriCalendar.cs index 39a01e5..061d380 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/HijriCalendar.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/HijriCalendar.cs @@ -49,7 +49,6 @@ namespace System.Globalization { */ [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public class HijriCalendar : Calendar { @@ -84,7 +83,6 @@ namespace System.Globalization { internal static readonly DateTime calendarMaxValue = DateTime.MaxValue; - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MinSupportedDateTime { get @@ -94,7 +92,6 @@ namespace System.Globalization { } - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MaxSupportedDateTime { get @@ -106,7 +103,6 @@ namespace System.Globalization { // Return the type of the Hijri calendar. // - [System.Runtime.InteropServices.ComVisible(false)] public override CalendarAlgorithmType AlgorithmType { get @@ -614,7 +610,6 @@ namespace System.Globalization { // if this calendar does not have leap month, or this year is not a leap year. // - [System.Runtime.InteropServices.ComVisible(false)] public override int GetLeapMonth(int year, int era) { CheckYearRange(year, era); diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/JapaneseCalendar.cs b/src/coreclr/src/mscorlib/src/System/Globalization/JapaneseCalendar.cs index 86b6158..18677a9 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/JapaneseCalendar.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/JapaneseCalendar.cs @@ -41,13 +41,11 @@ namespace System.Globalization { [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public class JapaneseCalendar : Calendar { internal static readonly DateTime calendarMinValue = new DateTime(1868, 9, 8); - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MinSupportedDateTime { get @@ -56,7 +54,6 @@ namespace System.Globalization { } } - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MaxSupportedDateTime { get @@ -68,7 +65,6 @@ namespace System.Globalization { // Return the type of the Japanese calendar. // - [System.Runtime.InteropServices.ComVisible(false)] public override CalendarAlgorithmType AlgorithmType { get @@ -421,7 +417,6 @@ namespace System.Globalization { [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - [System.Runtime.InteropServices.ComVisible(false)] public override int GetWeekOfYear(DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek) { return (helper.GetWeekOfYear(time, rule, firstDayOfWeek)); @@ -465,7 +460,6 @@ namespace System.Globalization { // if this calendar does not have leap month, or this year is not a leap year. // - [System.Runtime.InteropServices.ComVisible(false)] public override int GetLeapMonth(int year, int era) { return (helper.GetLeapMonth(year, era)); diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/JulianCalendar.cs b/src/coreclr/src/mscorlib/src/System/Globalization/JulianCalendar.cs index db286e0..ff88014 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/JulianCalendar.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/JulianCalendar.cs @@ -18,7 +18,6 @@ namespace System.Globalization { //* Julia 0001/01/03 9999/10/19 [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public class JulianCalendar : Calendar { @@ -51,7 +50,6 @@ namespace System.Globalization { internal int MaxYear = 9999; - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MinSupportedDateTime { get @@ -60,7 +58,6 @@ namespace System.Globalization { } } - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MaxSupportedDateTime { get @@ -72,7 +69,6 @@ namespace System.Globalization { // Return the type of the Julian calendar. // - [System.Runtime.InteropServices.ComVisible(false)] public override CalendarAlgorithmType AlgorithmType { get @@ -344,7 +340,6 @@ namespace System.Globalization { // if this calendar does not have leap month, or this year is not a leap year. // - [System.Runtime.InteropServices.ComVisible(false)] public override int GetLeapMonth(int year, int era) { CheckYearEraRange(year, era); diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/KoreanCalendar.cs b/src/coreclr/src/mscorlib/src/System/Globalization/KoreanCalendar.cs index dde82b6..6c5a03b 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/KoreanCalendar.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/KoreanCalendar.cs @@ -24,7 +24,6 @@ namespace System.Globalization { ============================================================================*/ -[System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class KoreanCalendar: Calendar { // // The era value for the current era. @@ -49,7 +48,6 @@ namespace System.Globalization { internal GregorianCalendarHelper helper; - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MinSupportedDateTime { get @@ -58,7 +56,6 @@ namespace System.Globalization { } } - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MaxSupportedDateTime { get @@ -70,7 +67,6 @@ namespace System.Globalization { // Return the type of the Korean calendar. // - [System.Runtime.InteropServices.ComVisible(false)] public override CalendarAlgorithmType AlgorithmType { get @@ -165,7 +161,6 @@ namespace System.Globalization { [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - [System.Runtime.InteropServices.ComVisible(false)] public override int GetWeekOfYear(DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek) { return (helper.GetWeekOfYear(time, rule, firstDayOfWeek)); @@ -200,7 +195,6 @@ namespace System.Globalization { // if this calendar does not have leap month, or this year is not a leap year. // - [System.Runtime.InteropServices.ComVisible(false)] public override int GetLeapMonth(int year, int era) { return (helper.GetLeapMonth(year, era)); diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/NumberFormatInfo.cs b/src/coreclr/src/mscorlib/src/System/Globalization/NumberFormatInfo.cs index 9d9c6f2..bfd51e6 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/NumberFormatInfo.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/NumberFormatInfo.cs @@ -41,7 +41,6 @@ namespace System.Globalization { // [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] sealed public partial class NumberFormatInfo : ICloneable, IFormatProvider { // invariantInfo is constant irrespective of your current culture. @@ -736,7 +735,6 @@ namespace System.Globalization { } - [System.Runtime.InteropServices.ComVisible(false)] public String[] NativeDigits { get { return (String[])nativeDigits.Clone(); } @@ -748,7 +746,6 @@ namespace System.Globalization { } } - [System.Runtime.InteropServices.ComVisible(false)] public DigitShapes DigitSubstitution { get { return (DigitShapes)digitSubstitution; } diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/NumberStyles.cs b/src/coreclr/src/mscorlib/src/System/Globalization/NumberStyles.cs index 42b9847..969c07f 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/NumberStyles.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/NumberStyles.cs @@ -16,7 +16,6 @@ namespace System.Globalization { using System; [Serializable] [Flags] - [System.Runtime.InteropServices.ComVisible(true)] public enum NumberStyles { // Bit flag indicating that leading whitespace is allowed. Character values // 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, and 0x0020 are considered to be diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/RegionInfo.cs b/src/coreclr/src/mscorlib/src/System/Globalization/RegionInfo.cs index 4bed875..b719af7 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/RegionInfo.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/RegionInfo.cs @@ -23,7 +23,6 @@ namespace System.Globalization { using System.Diagnostics.Contracts; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public partial class RegionInfo { //--------------------------------------------------------------------// @@ -259,7 +258,6 @@ namespace System.Globalization { // WARNING: You need a full locale name for this to make sense. // //////////////////////////////////////////////////////////////////////// - [System.Runtime.InteropServices.ComVisible(false)] public virtual String NativeName { get @@ -329,7 +327,6 @@ namespace System.Globalization { } - [System.Runtime.InteropServices.ComVisible(false)] public virtual int GeoId { get @@ -345,7 +342,6 @@ namespace System.Globalization { // English name for this region's currency, ie: Swiss Franc // //////////////////////////////////////////////////////////////////////// - [System.Runtime.InteropServices.ComVisible(false)] public virtual String CurrencyEnglishName { get @@ -362,7 +358,6 @@ namespace System.Globalization { // WARNING: You need a full locale name for this to make sense. // //////////////////////////////////////////////////////////////////////// - [System.Runtime.InteropServices.ComVisible(false)] public virtual String CurrencyNativeName { get diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/SortKey.cs b/src/coreclr/src/mscorlib/src/System/Globalization/SortKey.cs index 9c35f48..7c7408b 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/SortKey.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/SortKey.cs @@ -19,7 +19,6 @@ namespace System.Globalization { using System.Diagnostics; using System.Diagnostics.Contracts; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public partial class SortKey { diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/StringInfo.cs b/src/coreclr/src/mscorlib/src/System/Globalization/StringInfo.cs index d86e115..b79657b 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/StringInfo.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/StringInfo.cs @@ -21,7 +21,6 @@ namespace System.Globalization { using System.Diagnostics.Contracts; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class StringInfo { @@ -57,7 +56,6 @@ namespace System.Globalization { } #endregion Serialization - [System.Runtime.InteropServices.ComVisible(false)] public override bool Equals(Object value) { StringInfo that = value as StringInfo; @@ -68,7 +66,6 @@ namespace System.Globalization { return (false); } - [System.Runtime.InteropServices.ComVisible(false)] public override int GetHashCode() { return this.m_str.GetHashCode(); diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/TaiwanCalendar.cs b/src/coreclr/src/mscorlib/src/System/Globalization/TaiwanCalendar.cs index 476ddee..ec84a06 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/TaiwanCalendar.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/TaiwanCalendar.cs @@ -22,7 +22,6 @@ namespace System.Globalization { ============================================================================*/ /* SSS_WARNINGS_ON */ /* SSS_DROP_END */ - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class TaiwanCalendar: Calendar { // // The era value for the current era. @@ -62,7 +61,6 @@ namespace System.Globalization { internal static readonly DateTime calendarMinValue = new DateTime(1912, 1, 1); - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MinSupportedDateTime { get @@ -71,7 +69,6 @@ namespace System.Globalization { } } - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MaxSupportedDateTime { get @@ -83,7 +80,6 @@ namespace System.Globalization { // Return the type of the Taiwan calendar. // - [System.Runtime.InteropServices.ComVisible(false)] public override CalendarAlgorithmType AlgorithmType { get @@ -151,7 +147,6 @@ namespace System.Globalization { [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - [System.Runtime.InteropServices.ComVisible(false)] public override int GetWeekOfYear(DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek) { return (helper.GetWeekOfYear(time, rule, firstDayOfWeek)); @@ -186,7 +181,6 @@ namespace System.Globalization { // if this calendar does not have leap month, or this year is not a leap year. // - [System.Runtime.InteropServices.ComVisible(false)] public override int GetLeapMonth(int year, int era) { return (helper.GetLeapMonth(year, era)); diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/TextElementEnumerator.cs b/src/coreclr/src/mscorlib/src/System/Globalization/TextElementEnumerator.cs index 049ccf6..0fee7a0 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/TextElementEnumerator.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/TextElementEnumerator.cs @@ -23,7 +23,6 @@ namespace System.Globalization { // [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class TextElementEnumerator: IEnumerator { private String str; diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/TextInfo.cs b/src/coreclr/src/mscorlib/src/System/Globalization/TextInfo.cs index c8108e4..2db5eff 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/TextInfo.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/TextInfo.cs @@ -29,7 +29,6 @@ namespace System.Globalization { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public partial class TextInfo : ICloneable, IDeserializationCallback { //--------------------------------------------------------------------// @@ -378,7 +377,6 @@ namespace System.Globalization { //////////////////////////////////////////////////////////////////////// #if FEATURE_USE_LCID - [System.Runtime.InteropServices.ComVisible(false)] public int LCID { get @@ -395,7 +393,6 @@ namespace System.Globalization { // The name of the culture associated with the current TextInfo. // //////////////////////////////////////////////////////////////////////// - [System.Runtime.InteropServices.ComVisible(false)] public string CultureName { get @@ -411,7 +408,6 @@ namespace System.Globalization { // Detect if the object is readonly. // //////////////////////////////////////////////////////////////////////// - [System.Runtime.InteropServices.ComVisible(false)] public bool IsReadOnly { get { return (m_isReadOnly); } @@ -424,7 +420,6 @@ namespace System.Globalization { // Is the implementation of ICloneable. // //////////////////////////////////////////////////////////////////////// - [System.Runtime.InteropServices.ComVisible(false)] public virtual Object Clone() { object o = MemberwiseClone(); @@ -440,7 +435,6 @@ namespace System.Globalization { // readonly. // //////////////////////////////////////////////////////////////////////// - [System.Runtime.InteropServices.ComVisible(false)] public static TextInfo ReadOnly(TextInfo textInfo) { if (textInfo == null) { throw new ArgumentNullException(nameof(textInfo)); } @@ -487,7 +481,6 @@ namespace System.Globalization { return (m_listSeparator); } - [System.Runtime.InteropServices.ComVisible(false)] set { if (value == null) @@ -901,7 +894,6 @@ namespace System.Globalization { // // Returns true if the dominant direction of text and UI such as the relative position of buttons and scroll bars // - [System.Runtime.InteropServices.ComVisible(false)] public bool IsRightToLeft { get diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/ThaiBuddhistCalendar.cs b/src/coreclr/src/mscorlib/src/System/Globalization/ThaiBuddhistCalendar.cs index e294b51..762c3ca 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/ThaiBuddhistCalendar.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/ThaiBuddhistCalendar.cs @@ -21,7 +21,6 @@ namespace System.Globalization { ============================================================================*/ -[System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class ThaiBuddhistCalendar: Calendar { // Initialize our era info. @@ -40,7 +39,6 @@ namespace System.Globalization { internal GregorianCalendarHelper helper; - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MinSupportedDateTime { get @@ -49,7 +47,6 @@ namespace System.Globalization { } } - [System.Runtime.InteropServices.ComVisible(false)] public override DateTime MaxSupportedDateTime { get @@ -61,7 +58,6 @@ namespace System.Globalization { // Return the type of the Thai Buddhist calendar. // - [System.Runtime.InteropServices.ComVisible(false)] public override CalendarAlgorithmType AlgorithmType { get @@ -123,7 +119,6 @@ namespace System.Globalization { [SuppressMessage("Microsoft.Contracts", "CC1055")] // Skip extra error checking to avoid *potential* AppCompat problems. - [System.Runtime.InteropServices.ComVisible(false)] public override int GetWeekOfYear(DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek) { return (helper.GetWeekOfYear(time, rule, firstDayOfWeek)); @@ -158,7 +153,6 @@ namespace System.Globalization { // if this calendar does not have leap month, or this year is not a leap year. // - [System.Runtime.InteropServices.ComVisible(false)] public override int GetLeapMonth(int year, int era) { return (helper.GetLeapMonth(year, era)); diff --git a/src/coreclr/src/mscorlib/src/System/Globalization/UnicodeCategory.cs b/src/coreclr/src/mscorlib/src/System/Globalization/UnicodeCategory.cs index 3848b61..c9898f1 100644 --- a/src/coreclr/src/mscorlib/src/System/Globalization/UnicodeCategory.cs +++ b/src/coreclr/src/mscorlib/src/System/Globalization/UnicodeCategory.cs @@ -13,7 +13,6 @@ namespace System.Globalization { [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum UnicodeCategory { UppercaseLetter = 0, diff --git a/src/coreclr/src/mscorlib/src/System/Guid.cs b/src/coreclr/src/mscorlib/src/System/Guid.cs index 87b5270..1116faf 100644 --- a/src/coreclr/src/mscorlib/src/System/Guid.cs +++ b/src/coreclr/src/mscorlib/src/System/Guid.cs @@ -16,7 +16,6 @@ namespace System { // Represents a Globally Unique Identifier. [StructLayout(LayoutKind.Sequential)] [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] [System.Runtime.Versioning.NonVersionable] // This only applies to field layout public struct Guid : IFormattable, IComparable , IComparable, IEquatable diff --git a/src/coreclr/src/mscorlib/src/System/ICloneable.cs b/src/coreclr/src/mscorlib/src/System/ICloneable.cs index 2931802..49657c2 100644 --- a/src/coreclr/src/mscorlib/src/System/ICloneable.cs +++ b/src/coreclr/src/mscorlib/src/System/ICloneable.cs @@ -16,7 +16,6 @@ namespace System { // method which is called to create a clone of the object. Object defines a method // MemberwiseClone to support default clone operations. // - [System.Runtime.InteropServices.ComVisible(true)] public interface ICloneable { // Interface does not need to be marked with the serializable attribute diff --git a/src/coreclr/src/mscorlib/src/System/IO/BinaryReader.cs b/src/coreclr/src/mscorlib/src/System/IO/BinaryReader.cs index 4145a7f..d973860 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/BinaryReader.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/BinaryReader.cs @@ -23,7 +23,6 @@ namespace System.IO { using System.Diagnostics.Contracts; using System.Security; -[System.Runtime.InteropServices.ComVisible(true)] public class BinaryReader : IDisposable { private const int MaxCharBytesSize = 128; diff --git a/src/coreclr/src/mscorlib/src/System/IO/BinaryWriter.cs b/src/coreclr/src/mscorlib/src/System/IO/BinaryWriter.cs index 4cf83d3..b6c5625 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/BinaryWriter.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/BinaryWriter.cs @@ -26,7 +26,6 @@ namespace System.IO { // give unique encodings. // [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class BinaryWriter : IDisposable { public static readonly BinaryWriter Null = new BinaryWriter(); diff --git a/src/coreclr/src/mscorlib/src/System/IO/Directory.cs b/src/coreclr/src/mscorlib/src/System/IO/Directory.cs index abbf1b5..dcdc850 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/Directory.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/Directory.cs @@ -26,7 +26,6 @@ using System.Diagnostics.Contracts; namespace System.IO { - [ComVisible(true)] internal static class Directory { // Private class that holds search data that is passed around diff --git a/src/coreclr/src/mscorlib/src/System/IO/DirectoryNotFoundException.cs b/src/coreclr/src/mscorlib/src/System/IO/DirectoryNotFoundException.cs index 09d7e7d..21211a6 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/DirectoryNotFoundException.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/DirectoryNotFoundException.cs @@ -23,7 +23,6 @@ namespace System.IO { * and STG_E_PATHNOTFOUND (0x80030003). */ [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class DirectoryNotFoundException : IOException { public DirectoryNotFoundException() : base(Environment.GetResourceString("Arg_DirectoryNotFoundException")) { diff --git a/src/coreclr/src/mscorlib/src/System/IO/DriveNotFoundException.cs b/src/coreclr/src/mscorlib/src/System/IO/DriveNotFoundException.cs index 9d9c0ff..f0245a8 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/DriveNotFoundException.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/DriveNotFoundException.cs @@ -17,7 +17,6 @@ namespace System.IO { //Thrown when trying to access a drive that is not availabe. [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] internal class DriveNotFoundException : IOException { public DriveNotFoundException() : base(Environment.GetResourceString("Arg_DriveNotFoundException")) { diff --git a/src/coreclr/src/mscorlib/src/System/IO/EndOfStreamException.cs b/src/coreclr/src/mscorlib/src/System/IO/EndOfStreamException.cs index 60f5109..558c792 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/EndOfStreamException.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/EndOfStreamException.cs @@ -18,7 +18,6 @@ using System.Runtime.Serialization; namespace System.IO { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class EndOfStreamException : IOException { public EndOfStreamException() diff --git a/src/coreclr/src/mscorlib/src/System/IO/File.cs b/src/coreclr/src/mscorlib/src/System/IO/File.cs index e3a68c4..7c2266a 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/File.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/File.cs @@ -28,7 +28,6 @@ namespace System.IO { // Class for creating FileStream objects, and some basic file management // routines such as Delete, etc. - [ComVisible(true)] internal static class File { private const int ERROR_INVALID_PARAMETER = 87; diff --git a/src/coreclr/src/mscorlib/src/System/IO/FileAccess.cs b/src/coreclr/src/mscorlib/src/System/IO/FileAccess.cs index f708a28..707b58f 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/FileAccess.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/FileAccess.cs @@ -23,7 +23,6 @@ namespace System.IO { // [Serializable] [Flags] -[System.Runtime.InteropServices.ComVisible(true)] public enum FileAccess { // Specifies read access to the file. Data can be read from the file and diff --git a/src/coreclr/src/mscorlib/src/System/IO/FileLoadException.cs b/src/coreclr/src/mscorlib/src/System/IO/FileLoadException.cs index 2b56c00..7bbc1a3 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/FileLoadException.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/FileLoadException.cs @@ -27,7 +27,6 @@ using SecurityException = System.Security.SecurityException; namespace System.IO { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class FileLoadException : IOException { private String _fileName; // the name of the file we could not load. diff --git a/src/coreclr/src/mscorlib/src/System/IO/FileMode.cs b/src/coreclr/src/mscorlib/src/System/IO/FileMode.cs index 9b9c202..3972cf0 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/FileMode.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/FileMode.cs @@ -27,7 +27,6 @@ namespace System.IO { // exist, use Create. // [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum FileMode { // Creates a new file. An exception is raised if the file already exists. diff --git a/src/coreclr/src/mscorlib/src/System/IO/FileNotFoundException.cs b/src/coreclr/src/mscorlib/src/System/IO/FileNotFoundException.cs index 8cc75f8..2353176 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/FileNotFoundException.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/FileNotFoundException.cs @@ -23,7 +23,6 @@ using System.Globalization; namespace System.IO { // Thrown when trying to access a file that doesn't exist on disk. [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class FileNotFoundException : IOException { private String _fileName; // The name of the file that isn't found. diff --git a/src/coreclr/src/mscorlib/src/System/IO/FileOptions.cs b/src/coreclr/src/mscorlib/src/System/IO/FileOptions.cs index ffd6dda..02bc99e 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/FileOptions.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/FileOptions.cs @@ -24,7 +24,6 @@ namespace System.IO { // a number of them made sense in managed code, at least not yet. [Serializable] [Flags] - [ComVisible(true)] public enum FileOptions { // NOTE: any change to FileOptions enum needs to be diff --git a/src/coreclr/src/mscorlib/src/System/IO/FileShare.cs b/src/coreclr/src/mscorlib/src/System/IO/FileShare.cs index ad76d5d..8a7d1f0 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/FileShare.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/FileShare.cs @@ -28,7 +28,6 @@ namespace System.IO { // [Serializable] [Flags] -[System.Runtime.InteropServices.ComVisible(true)] public enum FileShare { // No sharing. Any request to open the file (by this process or another diff --git a/src/coreclr/src/mscorlib/src/System/IO/IOException.cs b/src/coreclr/src/mscorlib/src/System/IO/IOException.cs index b3db033..ab61281 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/IOException.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/IOException.cs @@ -19,7 +19,6 @@ using System.Runtime.Serialization; namespace System.IO { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class IOException : SystemException { // For debugging purposes, store the complete path in the IOException diff --git a/src/coreclr/src/mscorlib/src/System/IO/MemoryStream.cs b/src/coreclr/src/mscorlib/src/System/IO/MemoryStream.cs index bdddc83..afdb21f 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/MemoryStream.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/MemoryStream.cs @@ -35,7 +35,6 @@ namespace System.IO { // memory streams are resizable, while ones created with a byte array provide // a stream "view" of the data. [Serializable] - [ComVisible(true)] public class MemoryStream : Stream { private byte[] _buffer; // Either allocated internally or externally. @@ -181,7 +180,6 @@ namespace System.IO { public override void Flush() { } - [ComVisible(false)] public override Task FlushAsync(CancellationToken cancellationToken) { if (cancellationToken.IsCancellationRequested) @@ -357,7 +355,6 @@ namespace System.IO { return n; } - [ComVisible(false)] public override Task ReadAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken) { if (buffer==null) @@ -589,7 +586,6 @@ namespace System.IO { } - [ComVisible(false)] public override Task WriteAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken) { if (buffer == null) diff --git a/src/coreclr/src/mscorlib/src/System/IO/PathTooLongException.cs b/src/coreclr/src/mscorlib/src/System/IO/PathTooLongException.cs index b106323..a84fdfb 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/PathTooLongException.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/PathTooLongException.cs @@ -20,7 +20,6 @@ using System.Runtime.Serialization; namespace System.IO { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class PathTooLongException : IOException { public PathTooLongException() diff --git a/src/coreclr/src/mscorlib/src/System/IO/SearchOption.cs b/src/coreclr/src/mscorlib/src/System/IO/SearchOption.cs index aa9b9e3..e2f761c 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/SearchOption.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/SearchOption.cs @@ -20,7 +20,6 @@ using System; namespace System.IO { [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum SearchOption { // Include only the current directory in the search operation diff --git a/src/coreclr/src/mscorlib/src/System/IO/SeekOrigin.cs b/src/coreclr/src/mscorlib/src/System/IO/SeekOrigin.cs index a0a013e..bff49e6 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/SeekOrigin.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/SeekOrigin.cs @@ -21,7 +21,6 @@ namespace System.IO { // Provides seek reference points. To seek to the end of a stream, // call stream.Seek(0, SeekOrigin.End). [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public enum SeekOrigin { // These constants match Win32's FILE_BEGIN, FILE_CURRENT, and FILE_END diff --git a/src/coreclr/src/mscorlib/src/System/IO/Stream.cs b/src/coreclr/src/mscorlib/src/System/IO/Stream.cs index 371c650..63c6131 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/Stream.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/Stream.cs @@ -30,7 +30,6 @@ using System.Reflection; namespace System.IO { [Serializable] - [ComVisible(true)] public abstract class Stream : MarshalByRefObject, IDisposable { public static readonly Stream Null = new NullStream(); @@ -65,7 +64,6 @@ namespace System.IO { get; } - [ComVisible(false)] public virtual bool CanTimeout { [Pure] get { @@ -87,7 +85,6 @@ namespace System.IO { set; } - [ComVisible(false)] public virtual int ReadTimeout { get { Contract.Ensures(Contract.Result() >= 0); @@ -98,7 +95,6 @@ namespace System.IO { } } - [ComVisible(false)] public virtual int WriteTimeout { get { Contract.Ensures(Contract.Result() >= 0); @@ -109,7 +105,6 @@ namespace System.IO { } } - [ComVisible(false)] public Task CopyToAsync(Stream destination) { int bufferSize = _DefaultCopyBufferSize; @@ -146,13 +141,11 @@ namespace System.IO { return CopyToAsync(destination, bufferSize); } - [ComVisible(false)] public Task CopyToAsync(Stream destination, Int32 bufferSize) { return CopyToAsync(destination, bufferSize, CancellationToken.None); } - [ComVisible(false)] public virtual Task CopyToAsync(Stream destination, Int32 bufferSize, CancellationToken cancellationToken) { StreamHelpers.ValidateCopyToArgs(this, destination, bufferSize); @@ -278,13 +271,11 @@ namespace System.IO { public abstract void Flush(); - [ComVisible(false)] public Task FlushAsync() { return FlushAsync(CancellationToken.None); } - [ComVisible(false)] public virtual Task FlushAsync(CancellationToken cancellationToken) { return Task.Factory.StartNew(state => ((Stream)state).Flush(), this, @@ -398,13 +389,11 @@ namespace System.IO { } } - [ComVisible(false)] public Task ReadAsync(Byte[] buffer, int offset, int count) { return ReadAsync(buffer, offset, count, CancellationToken.None); } - [ComVisible(false)] public virtual Task ReadAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken) { // If cancellation was requested, bail early with an already completed task. @@ -686,7 +675,6 @@ namespace System.IO { bool ITaskCompletionAction.InvokeMayRunArbitraryCode { get { return true; } } } - [ComVisible(false)] public Task WriteAsync(Byte[] buffer, int offset, int count) { return WriteAsync(buffer, offset, count, CancellationToken.None); @@ -694,7 +682,6 @@ namespace System.IO { - [ComVisible(false)] public virtual Task WriteAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken) { // If cancellation was requested, bail early with an already completed task. @@ -902,7 +889,6 @@ namespace System.IO { { } - [ComVisible(false)] public override Task FlushAsync(CancellationToken cancellationToken) { return cancellationToken.IsCancellationRequested ? @@ -947,7 +933,6 @@ namespace System.IO { return 0; } - [ComVisible(false)] public override Task ReadAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken) { var nullReadTask = s_nullReadTask; @@ -966,7 +951,6 @@ namespace System.IO { { } - [ComVisible(false)] public override Task WriteAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken) { return cancellationToken.IsCancellationRequested ? @@ -1102,7 +1086,6 @@ namespace System.IO { get { return _stream.CanSeek; } } - [ComVisible(false)] public override bool CanTimeout { [Pure] get { @@ -1131,7 +1114,6 @@ namespace System.IO { } } - [ComVisible(false)] public override int ReadTimeout { get { return _stream.ReadTimeout; @@ -1141,7 +1123,6 @@ namespace System.IO { } } - [ComVisible(false)] public override int WriteTimeout { get { return _stream.WriteTimeout; diff --git a/src/coreclr/src/mscorlib/src/System/IO/StreamReader.cs b/src/coreclr/src/mscorlib/src/System/IO/StreamReader.cs index b96c9ee..a689f01 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/StreamReader.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/StreamReader.cs @@ -18,7 +18,6 @@ namespace System.IO // whereas the Stream class is designed for byte input and output. // [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class StreamReader : TextReader { // StreamReader.Null is threadsafe. @@ -757,7 +756,6 @@ namespace System.IO } #region Task based Async APIs - [ComVisible(false)] public override Task ReadLineAsync() { // If we have been inherited into a subclass, the following implementation could be incorrect @@ -837,7 +835,6 @@ namespace System.IO return GetStringAndReleaseSharedStringBuilder(sb); } - [ComVisible(false)] public override Task ReadToEndAsync() { // If we have been inherited into a subclass, the following implementation could be incorrect @@ -873,7 +870,6 @@ namespace System.IO return GetStringAndReleaseSharedStringBuilder(sb); } - [ComVisible(false)] public override Task ReadAsync(char[] buffer, int index, int count) { if (buffer==null) @@ -1060,7 +1056,6 @@ namespace System.IO return charsRead; } - [ComVisible(false)] public override Task ReadBlockAsync(char[] buffer, int index, int count) { if (buffer==null) diff --git a/src/coreclr/src/mscorlib/src/System/IO/TextReader.cs b/src/coreclr/src/mscorlib/src/System/IO/TextReader.cs index 6cbadfb..4a0c555 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/TextReader.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/TextReader.cs @@ -32,7 +32,6 @@ namespace System.IO { // This class is intended for character input, not bytes. // There are methods on the Stream class for reading bytes. [Serializable] - [ComVisible(true)] public abstract class TextReader : MarshalByRefObject, IDisposable { public static readonly TextReader Null = new NullTextReader(); @@ -170,7 +169,6 @@ namespace System.IO { } #region Task based Async APIs - [ComVisible(false)] public virtual Task ReadLineAsync() { return Task.Factory.StartNew(state => @@ -180,7 +178,6 @@ namespace System.IO { this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); } - [ComVisible(false)] public async virtual Task ReadToEndAsync() { char[] chars = new char[4096]; @@ -193,7 +190,6 @@ namespace System.IO { return sb.ToString(); } - [ComVisible(false)] public virtual Task ReadAsync(char[] buffer, int index, int count) { if (buffer==null) @@ -223,7 +219,6 @@ namespace System.IO { tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); } - [ComVisible(false)] public virtual Task ReadBlockAsync(char[] buffer, int index, int count) { if (buffer==null) @@ -352,21 +347,18 @@ namespace System.IO { // On SyncTextReader all APIs should run synchronously, even the async ones. // - [ComVisible(false)] [MethodImplAttribute(MethodImplOptions.Synchronized)] public override Task ReadLineAsync() { return Task.FromResult(ReadLine()); } - [ComVisible(false)] [MethodImplAttribute(MethodImplOptions.Synchronized)] public override Task ReadToEndAsync() { return Task.FromResult(ReadToEnd()); } - [ComVisible(false)] [MethodImplAttribute(MethodImplOptions.Synchronized)] public override Task ReadBlockAsync(char[] buffer, int index, int count) { @@ -382,7 +374,6 @@ namespace System.IO { return Task.FromResult(ReadBlock(buffer, index, count)); } - [ComVisible(false)] [MethodImplAttribute(MethodImplOptions.Synchronized)] public override Task ReadAsync(char[] buffer, int index, int count) { diff --git a/src/coreclr/src/mscorlib/src/System/IO/UnmanagedMemoryStream.cs b/src/coreclr/src/mscorlib/src/System/IO/UnmanagedMemoryStream.cs index d5f315f..e69a40b 100644 --- a/src/coreclr/src/mscorlib/src/System/IO/UnmanagedMemoryStream.cs +++ b/src/coreclr/src/mscorlib/src/System/IO/UnmanagedMemoryStream.cs @@ -230,7 +230,6 @@ namespace System.IO { if (!_isOpen) __Error.StreamIsClosed(); } - [ComVisible(false)] public override Task FlushAsync(CancellationToken cancellationToken) { if (cancellationToken.IsCancellationRequested) @@ -386,7 +385,6 @@ namespace System.IO { return nInt; } - [ComVisible(false)] public override Task ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) { if (buffer==null) throw new ArgumentNullException(nameof(buffer), Environment.GetResourceString("ArgumentNull_Buffer")); @@ -583,7 +581,6 @@ namespace System.IO { return; } - [ComVisible(false)] public override Task WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) { if (buffer==null) diff --git a/src/coreclr/src/mscorlib/src/System/Int16.cs b/src/coreclr/src/mscorlib/src/System/Int16.cs index f02a5f2..a5e6223 100644 --- a/src/coreclr/src/mscorlib/src/System/Int16.cs +++ b/src/coreclr/src/mscorlib/src/System/Int16.cs @@ -19,7 +19,6 @@ namespace System { using System.Runtime.InteropServices; using System.Diagnostics.Contracts; -[System.Runtime.InteropServices.ComVisible(true)] [Serializable] [System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)] public struct Int16 : IComparable, IFormattable, IConvertible diff --git a/src/coreclr/src/mscorlib/src/System/Int32.cs b/src/coreclr/src/mscorlib/src/System/Int32.cs index 2da55bf..0e1ed56 100644 --- a/src/coreclr/src/mscorlib/src/System/Int32.cs +++ b/src/coreclr/src/mscorlib/src/System/Int32.cs @@ -21,7 +21,6 @@ namespace System { [Serializable] [System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)] -[System.Runtime.InteropServices.ComVisible(true)] public struct Int32 : IComparable, IFormattable, IConvertible , IComparable, IEquatable { diff --git a/src/coreclr/src/mscorlib/src/System/Int64.cs b/src/coreclr/src/mscorlib/src/System/Int64.cs index e5fcf86..3520ede 100644 --- a/src/coreclr/src/mscorlib/src/System/Int64.cs +++ b/src/coreclr/src/mscorlib/src/System/Int64.cs @@ -20,7 +20,6 @@ namespace System { [Serializable] [System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)] -[System.Runtime.InteropServices.ComVisible(true)] public struct Int64 : IComparable, IFormattable, IConvertible , IComparable, IEquatable { diff --git a/src/coreclr/src/mscorlib/src/System/IntPtr.cs b/src/coreclr/src/mscorlib/src/System/IntPtr.cs index 2d66652..a2f5c77 100644 --- a/src/coreclr/src/mscorlib/src/System/IntPtr.cs +++ b/src/coreclr/src/mscorlib/src/System/IntPtr.cs @@ -23,7 +23,6 @@ namespace System { using System.Diagnostics.Contracts; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public struct IntPtr : IEquatable, ISerializable { unsafe private void* m_value; // The compiler treats void* closest to uint hence explicit casts are required to preserve int behavior diff --git a/src/coreclr/src/mscorlib/src/System/Lazy.cs b/src/coreclr/src/mscorlib/src/System/Lazy.cs index 85cbb98..d9c8ca3 100644 --- a/src/coreclr/src/mscorlib/src/System/Lazy.cs +++ b/src/coreclr/src/mscorlib/src/System/Lazy.cs @@ -47,7 +47,6 @@ namespace System /// /// [Serializable] - [ComVisible(false)] [DebuggerTypeProxy(typeof(System_LazyDebugView<>))] [DebuggerDisplay("ThreadSafetyMode={Mode}, IsValueCreated={IsValueCreated}, IsValueFaulted={IsValueFaulted}, Value={ValueForDebugDisplay}")] public class Lazy diff --git a/src/coreclr/src/mscorlib/src/System/MissingFieldException.cs b/src/coreclr/src/mscorlib/src/System/MissingFieldException.cs index 841d3b9..660e39c 100644 --- a/src/coreclr/src/mscorlib/src/System/MissingFieldException.cs +++ b/src/coreclr/src/mscorlib/src/System/MissingFieldException.cs @@ -16,7 +16,6 @@ namespace System { using System.Runtime.Serialization; using System.Runtime.CompilerServices; using System.Globalization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class MissingFieldException : MissingMemberException, ISerializable { public MissingFieldException() diff --git a/src/coreclr/src/mscorlib/src/System/MissingMemberException.cs b/src/coreclr/src/mscorlib/src/System/MissingMemberException.cs index 02fb217..98246ef 100644 --- a/src/coreclr/src/mscorlib/src/System/MissingMemberException.cs +++ b/src/coreclr/src/mscorlib/src/System/MissingMemberException.cs @@ -22,7 +22,6 @@ namespace System { using System.Runtime.Versioning; using System.Diagnostics.Contracts; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class MissingMemberException : MemberAccessException, ISerializable { public MissingMemberException() diff --git a/src/coreclr/src/mscorlib/src/System/MissingMethodException.cs b/src/coreclr/src/mscorlib/src/System/MissingMethodException.cs index 1ca7a2e..426711f 100644 --- a/src/coreclr/src/mscorlib/src/System/MissingMethodException.cs +++ b/src/coreclr/src/mscorlib/src/System/MissingMethodException.cs @@ -18,7 +18,6 @@ namespace System { using System.Runtime.Serialization; using System.Runtime.CompilerServices; using System.Globalization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class MissingMethodException : MissingMemberException, ISerializable { public MissingMethodException() diff --git a/src/coreclr/src/mscorlib/src/System/MulticastDelegate.cs b/src/coreclr/src/mscorlib/src/System/MulticastDelegate.cs index aa3271c..eb4d08b 100644 --- a/src/coreclr/src/mscorlib/src/System/MulticastDelegate.cs +++ b/src/coreclr/src/mscorlib/src/System/MulticastDelegate.cs @@ -14,7 +14,6 @@ namespace System using System.Reflection.Emit; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public abstract class MulticastDelegate : Delegate { // This is set under 3 circumstances diff --git a/src/coreclr/src/mscorlib/src/System/NonSerializedAttribute.cs b/src/coreclr/src/mscorlib/src/System/NonSerializedAttribute.cs index c3cd9a5..39f1862 100644 --- a/src/coreclr/src/mscorlib/src/System/NonSerializedAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/NonSerializedAttribute.cs @@ -15,7 +15,6 @@ namespace System using System.Reflection; [AttributeUsage(AttributeTargets.Field, Inherited=false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class NonSerializedAttribute : Attribute { internal static Attribute GetCustomAttribute(RuntimeFieldInfo field) diff --git a/src/coreclr/src/mscorlib/src/System/Nullable.cs b/src/coreclr/src/mscorlib/src/System/Nullable.cs index 8a22c8e..5ade287 100644 --- a/src/coreclr/src/mscorlib/src/System/Nullable.cs +++ b/src/coreclr/src/mscorlib/src/System/Nullable.cs @@ -101,10 +101,8 @@ namespace System // bool IEquatable>.Equals(Nullable other) } - [System.Runtime.InteropServices.ComVisible(true)] public static class Nullable { - [System.Runtime.InteropServices.ComVisible(true)] public static int Compare(Nullable n1, Nullable n2) where T : struct { if (n1.HasValue) { @@ -115,7 +113,6 @@ namespace System return 0; } - [System.Runtime.InteropServices.ComVisible(true)] public static bool Equals(Nullable n1, Nullable n2) where T : struct { if (n1.HasValue) { diff --git a/src/coreclr/src/mscorlib/src/System/Object.cs b/src/coreclr/src/mscorlib/src/System/Object.cs index d8d9a0e..421ef14 100644 --- a/src/coreclr/src/mscorlib/src/System/Object.cs +++ b/src/coreclr/src/mscorlib/src/System/Object.cs @@ -33,7 +33,6 @@ namespace System //This class contains no data and does not need to be serializable [Serializable] [ClassInterface(ClassInterfaceType.AutoDual)] -[System.Runtime.InteropServices.ComVisible(true)] public class Object { // Creates a new instance of an Object. @@ -203,7 +202,6 @@ public class Object [Serializable] [ClassInterface(ClassInterfaceType.AutoDual)] -[System.Runtime.InteropServices.ComVisible(true)] internal class __Canon { } diff --git a/src/coreclr/src/mscorlib/src/System/OperatingSystem.cs b/src/coreclr/src/mscorlib/src/System/OperatingSystem.cs index 64d8483..93f6eb8 100644 --- a/src/coreclr/src/mscorlib/src/System/OperatingSystem.cs +++ b/src/coreclr/src/mscorlib/src/System/OperatingSystem.cs @@ -18,7 +18,6 @@ namespace System { using System.Diagnostics.Contracts; - [ComVisible(true)] [Serializable] internal sealed class OperatingSystem : ICloneable , ISerializable { diff --git a/src/coreclr/src/mscorlib/src/System/OperationCanceledException.cs b/src/coreclr/src/mscorlib/src/System/OperationCanceledException.cs index 14781f5..0612016 100644 --- a/src/coreclr/src/mscorlib/src/System/OperationCanceledException.cs +++ b/src/coreclr/src/mscorlib/src/System/OperationCanceledException.cs @@ -18,7 +18,6 @@ using System.Threading; namespace System { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class OperationCanceledException : SystemException { [NonSerialized] diff --git a/src/coreclr/src/mscorlib/src/System/OutOfMemoryException.cs b/src/coreclr/src/mscorlib/src/System/OutOfMemoryException.cs index 9bea0b4..46d5195 100644 --- a/src/coreclr/src/mscorlib/src/System/OutOfMemoryException.cs +++ b/src/coreclr/src/mscorlib/src/System/OutOfMemoryException.cs @@ -16,7 +16,6 @@ namespace System { using System; using System.Runtime.Serialization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class OutOfMemoryException : SystemException { public OutOfMemoryException() diff --git a/src/coreclr/src/mscorlib/src/System/PlatformID.cs b/src/coreclr/src/mscorlib/src/System/PlatformID.cs index af2d8df..1612807 100644 --- a/src/coreclr/src/mscorlib/src/System/PlatformID.cs +++ b/src/coreclr/src/mscorlib/src/System/PlatformID.cs @@ -13,7 +13,6 @@ namespace System { [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] internal enum PlatformID { Win32S = 0, diff --git a/src/coreclr/src/mscorlib/src/System/Random.cs b/src/coreclr/src/mscorlib/src/System/Random.cs index f5941d6..db6da0e 100644 --- a/src/coreclr/src/mscorlib/src/System/Random.cs +++ b/src/coreclr/src/mscorlib/src/System/Random.cs @@ -18,7 +18,6 @@ namespace System { using System.Globalization; using System.Diagnostics.Contracts; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class Random { // diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/AmbiguousMatchException.cs b/src/coreclr/src/mscorlib/src/System/Reflection/AmbiguousMatchException.cs index 6df371b..795a871 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/AmbiguousMatchException.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/AmbiguousMatchException.cs @@ -18,7 +18,6 @@ namespace System.Reflection { using SystemException = System.SystemException; using System.Runtime.Serialization; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class AmbiguousMatchException : SystemException { diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs index 5378118..09c3011 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Assembly.cs @@ -522,7 +522,6 @@ namespace System.Reflection throw new NotImplementedException(); } - [ComVisible(false)] public virtual Module ManifestModule { get @@ -735,7 +734,6 @@ namespace System.Reflection } } - [ComVisible(false)] public virtual Int64 HostContext { get diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/AssemblyAttributes.cs b/src/coreclr/src/mscorlib/src/System/Reflection/AssemblyAttributes.cs index 4b550b4..1e6688d 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/AssemblyAttributes.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/AssemblyAttributes.cs @@ -20,7 +20,6 @@ namespace System.Reflection { using System.Diagnostics.Contracts; [AttributeUsage (AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class AssemblyCopyrightAttribute : Attribute { private String m_copyright; @@ -38,7 +37,6 @@ namespace System.Reflection { [AttributeUsage (AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class AssemblyTrademarkAttribute : Attribute { private String m_trademark; @@ -56,7 +54,6 @@ namespace System.Reflection { [AttributeUsage (AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class AssemblyProductAttribute : Attribute { private String m_product; @@ -74,7 +71,6 @@ namespace System.Reflection { [AttributeUsage (AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class AssemblyCompanyAttribute : Attribute { private String m_company; @@ -92,7 +88,6 @@ namespace System.Reflection { [AttributeUsage (AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class AssemblyDescriptionAttribute : Attribute { private String m_description; @@ -110,7 +105,6 @@ namespace System.Reflection { [AttributeUsage (AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class AssemblyTitleAttribute : Attribute { private String m_title; @@ -128,7 +122,6 @@ namespace System.Reflection { [AttributeUsage (AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class AssemblyConfigurationAttribute : Attribute { private String m_configuration; @@ -146,7 +139,6 @@ namespace System.Reflection { [AttributeUsage (AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class AssemblyDefaultAliasAttribute : Attribute { private String m_defaultAlias; @@ -164,7 +156,6 @@ namespace System.Reflection { [AttributeUsage (AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class AssemblyInformationalVersionAttribute : Attribute { private String m_informationalVersion; @@ -182,7 +173,6 @@ namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class AssemblyFileVersionAttribute : Attribute { private String _version; @@ -202,7 +192,6 @@ namespace System.Reflection { [AttributeUsage (AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public unsafe sealed class AssemblyCultureAttribute : Attribute { private String m_culture; @@ -220,7 +209,6 @@ namespace System.Reflection { [AttributeUsage (AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public unsafe sealed class AssemblyVersionAttribute : Attribute { private String m_version; @@ -238,7 +226,6 @@ namespace System.Reflection { [AttributeUsage (AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class AssemblyKeyFileAttribute : Attribute { private String m_keyFile; @@ -256,7 +243,6 @@ namespace System.Reflection { [AttributeUsage (AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class AssemblyDelaySignAttribute : Attribute { private bool m_delaySign; @@ -274,7 +260,6 @@ namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public unsafe sealed class AssemblyAlgorithmIdAttribute : Attribute { private uint m_algId; @@ -299,7 +284,6 @@ namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public unsafe sealed class AssemblyFlagsAttribute : Attribute { private AssemblyNameFlags m_flags; @@ -384,7 +368,6 @@ namespace System.Reflection { } [AttributeUsage (AttributeTargets.Assembly, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class AssemblyKeyNameAttribute : Attribute { private String m_keyName; diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/AssemblyName.cs b/src/coreclr/src/mscorlib/src/System/Reflection/AssemblyName.cs index c20b8f0..9551955 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/AssemblyName.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/AssemblyName.cs @@ -133,7 +133,6 @@ namespace System.Reflection { } } - [System.Runtime.InteropServices.ComVisible(false)] public AssemblyContentType ContentType { get diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/AssemblyNameFlags.cs b/src/coreclr/src/mscorlib/src/System/Reflection/AssemblyNameFlags.cs index 35a5370..b86955e 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/AssemblyNameFlags.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/AssemblyNameFlags.cs @@ -19,7 +19,6 @@ namespace System.Reflection { using System; [Serializable] [FlagsAttribute()] - [System.Runtime.InteropServices.ComVisible(true)] public enum AssemblyNameFlags { None = 0x0000, @@ -35,7 +34,6 @@ namespace System.Reflection { } [Serializable] - [System.Runtime.InteropServices.ComVisible(false)] public enum AssemblyContentType { Default = 0x0000, @@ -43,7 +41,6 @@ namespace System.Reflection { } [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public enum ProcessorArchitecture { None = 0x0000, diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Binder.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Binder.cs index d06899f..6275d02 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Binder.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Binder.cs @@ -17,7 +17,6 @@ namespace System.Reflection { [Serializable] [ClassInterface(ClassInterfaceType.AutoDual)] -[System.Runtime.InteropServices.ComVisible(true)] public abstract class Binder { // Given a set of methods that match the basic criteria, select a method to diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/BindingFlags.cs b/src/coreclr/src/mscorlib/src/System/Reflection/BindingFlags.cs index 591dfbb..ae0a6d6 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/BindingFlags.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/BindingFlags.cs @@ -17,7 +17,6 @@ namespace System.Reflection { using System; [Serializable] [Flags] - [System.Runtime.InteropServices.ComVisible(true)] public enum BindingFlags { diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/CallingConventions.cs b/src/coreclr/src/mscorlib/src/System/Reflection/CallingConventions.cs index 6ca11c9..266dd55 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/CallingConventions.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/CallingConventions.cs @@ -15,7 +15,6 @@ namespace System.Reflection { using System; [Serializable] [Flags] - [System.Runtime.InteropServices.ComVisible(true)] public enum CallingConventions { //NOTE: If you change this please update COMMember.cpp. These diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/ConstructorInfo.cs b/src/coreclr/src/mscorlib/src/System/Reflection/ConstructorInfo.cs index 8e6822e..07bf1c5 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/ConstructorInfo.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/ConstructorInfo.cs @@ -26,10 +26,8 @@ namespace System.Reflection public abstract class ConstructorInfo : MethodBase { #region Static Members - [System.Runtime.InteropServices.ComVisible(true)] public readonly static String ConstructorName = ".ctor"; - [System.Runtime.InteropServices.ComVisible(true)] public readonly static String TypeConstructorName = ".cctor"; #endregion @@ -70,7 +68,6 @@ namespace System.Reflection #endregion #region MemberInfo Overrides - [System.Runtime.InteropServices.ComVisible(true)] public override MemberTypes MemberType { get { return System.Reflection.MemberTypes.Constructor; } } #endregion @@ -319,7 +316,6 @@ namespace System.Reflection { get { return RuntimeMethodHandle.GetName(this); } } -[System.Runtime.InteropServices.ComVisible(true)] public override MemberTypes MemberType { get { return MemberTypes.Constructor; } } public override Type DeclaringType diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/CustomAttribute.cs b/src/coreclr/src/mscorlib/src/System/Reflection/CustomAttribute.cs index 91a4ef2..4d76923 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/CustomAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/CustomAttribute.cs @@ -22,7 +22,6 @@ using System.Diagnostics.Contracts; namespace System.Reflection { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class CustomAttributeData { #region Public Static Members @@ -515,10 +514,8 @@ namespace System.Reflection #region Public Members public Type AttributeType { get { return Constructor.DeclaringType; } } - [System.Runtime.InteropServices.ComVisible(true)] public virtual ConstructorInfo Constructor { get { return m_ctor; } } - [System.Runtime.InteropServices.ComVisible(true)] public virtual IList ConstructorArguments { get @@ -576,7 +573,6 @@ namespace System.Reflection } [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public struct CustomAttributeNamedArgument { #region Public Static Members @@ -666,7 +662,6 @@ namespace System.Reflection } [Serializable] - [ComVisible(true)] public struct CustomAttributeTypedArgument { #region Public Static Members @@ -1135,7 +1130,6 @@ namespace System.Reflection public CustomAttributeEncoding EncodedType { get { return m_encodedType; } } public CustomAttributeEncoding EncodedEnumType { get { return m_encodedEnumType; } } public CustomAttributeEncoding EncodedArrayType { get { return m_encodedArrayType; } } - [System.Runtime.InteropServices.ComVisible(true)] public string EnumName { get { return m_enumName; } } #endregion } diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/CustomAttributeFormatException.cs b/src/coreclr/src/mscorlib/src/System/Reflection/CustomAttributeFormatException.cs index 3eb8b1f..9aee911 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/CustomAttributeFormatException.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/CustomAttributeFormatException.cs @@ -15,7 +15,6 @@ namespace System.Reflection { using ApplicationException = System.ApplicationException; using System.Runtime.Serialization; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class CustomAttributeFormatException : FormatException { public CustomAttributeFormatException() diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/DefaultMemberAttribute.cs b/src/coreclr/src/mscorlib/src/System/Reflection/DefaultMemberAttribute.cs index 1fec759..4232fcd 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/DefaultMemberAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/DefaultMemberAttribute.cs @@ -19,7 +19,6 @@ namespace System.Reflection { [Serializable] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class DefaultMemberAttribute : Attribute { // The name of the member diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs index ecaf168..fa5f1ae 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs @@ -805,7 +805,6 @@ namespace System.Reflection.Emit /********************************************** * Use this function if client decides to form the custom attribute blob themselves **********************************************/ - [System.Runtime.InteropServices.ComVisible(true)] public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute) { if (con == null) diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilderAccess.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilderAccess.cs index 398f3d9..b3d1711 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilderAccess.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilderAccess.cs @@ -10,7 +10,6 @@ using System; namespace System.Reflection.Emit { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] [Flags] public enum AssemblyBuilderAccess { diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ConstructorBuilder.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ConstructorBuilder.cs index 8b1a3b6..3bc6a05 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ConstructorBuilder.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ConstructorBuilder.cs @@ -216,7 +216,6 @@ namespace System.Reflection.Emit get { return m_methodBuilder.Signature; } } - [System.Runtime.InteropServices.ComVisible(true)] public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute) { m_methodBuilder.SetCustomAttribute(con, binaryAttribute); diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/DynamicILGenerator.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/DynamicILGenerator.cs index 6429e60..f58ca75 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/DynamicILGenerator.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/DynamicILGenerator.cs @@ -142,7 +142,6 @@ namespace System.Reflection.Emit PutInteger4(token); } - [System.Runtime.InteropServices.ComVisible(true)] public override void Emit(OpCode opcode, ConstructorInfo con) { if (con == null) @@ -926,7 +925,6 @@ namespace System.Reflection.Emit } - [System.Runtime.InteropServices.ComVisible(true)] internal class DynamicILInfo { #region Private Data Members diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/DynamicMethod.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/DynamicMethod.cs index 77a835f..442311c 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/DynamicMethod.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/DynamicMethod.cs @@ -19,7 +19,6 @@ namespace System.Reflection.Emit using System.Diagnostics.Contracts; using System.Runtime.InteropServices; - [System.Runtime.InteropServices.ComVisible(true)] public sealed class DynamicMethod : MethodInfo { private RuntimeType[] m_parameterTypes; @@ -395,7 +394,6 @@ namespace System.Reflection.Emit // Delegate and method creation // - [System.Runtime.InteropServices.ComVisible(true)] public sealed override Delegate CreateDelegate(Type delegateType) { if (m_restrictedSkipVisibility) { @@ -410,7 +408,6 @@ namespace System.Reflection.Emit return d; } - [System.Runtime.InteropServices.ComVisible(true)] public sealed override Delegate CreateDelegate(Type delegateType, Object target) { if (m_restrictedSkipVisibility) { diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs index 6dce695..afc8257 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs @@ -133,7 +133,6 @@ namespace System.Reflection.Emit { types, modifiers); } -[System.Runtime.InteropServices.ComVisible(true)] public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr) { return m_typeBuilder.GetConstructors(bindingAttr); @@ -214,7 +213,6 @@ namespace System.Reflection.Emit { return m_typeBuilder.GetMembers(bindingAttr); } -[System.Runtime.InteropServices.ComVisible(true)] public override InterfaceMapping GetInterfaceMap(Type interfaceType) { return m_typeBuilder.GetInterfaceMap(interfaceType); @@ -308,7 +306,6 @@ namespace System.Reflection.Emit { // Use this function if client decides to form the custom attribute blob themselves -[System.Runtime.InteropServices.ComVisible(true)] public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute) { m_typeBuilder.SetCustomAttribute(con, binaryAttribute); diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/EventBuilder.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/EventBuilder.cs index 6b81575..bc1d7ea 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/EventBuilder.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/EventBuilder.cs @@ -92,7 +92,6 @@ namespace System.Reflection.Emit { // Use this function if client decides to form the custom attribute blob themselves -[System.Runtime.InteropServices.ComVisible(true)] public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute) { if (con == null) diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/EventToken.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/EventToken.cs index 0642cec..26054a9 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/EventToken.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/EventToken.cs @@ -18,7 +18,6 @@ namespace System.Reflection.Emit { using System.Reflection; using System.Security.Permissions; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public struct EventToken { public static readonly EventToken Empty = new EventToken(); diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/FieldBuilder.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/FieldBuilder.cs index 1ac2684..27750e3 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/FieldBuilder.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/FieldBuilder.cs @@ -188,7 +188,6 @@ namespace System.Reflection.Emit } -[System.Runtime.InteropServices.ComVisible(true)] public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute) { if (con == null) diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/FieldToken.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/FieldToken.cs index 42fd684..02710ad 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/FieldToken.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/FieldToken.cs @@ -23,7 +23,6 @@ namespace System.Reflection.Emit { // Module.GetFieldToken(). There are no meaningful accessors on this class, // but it can be passed to ILGenerator which understands it's internals. [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public struct FieldToken { public static readonly FieldToken Empty = new FieldToken(); diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/FlowControl.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/FlowControl.cs index 31bb564..9e528b2 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/FlowControl.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/FlowControl.cs @@ -16,7 +16,6 @@ namespace System.Reflection.Emit { using System; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum FlowControl { diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs index 6987ea1..894f57d 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/GenericTypeParameterBuilder.cs @@ -13,7 +13,6 @@ namespace System.Reflection.Emit using System.Globalization; using System.Diagnostics.Contracts; -[System.Runtime.InteropServices.ComVisible(true)] public sealed class GenericTypeParameterBuilder: TypeInfo { public override bool IsAssignableFrom(System.Reflection.TypeInfo typeInfo){ @@ -118,7 +117,6 @@ namespace System.Reflection.Emit protected override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) { throw new NotSupportedException(); } -[System.Runtime.InteropServices.ComVisible(true)] public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr) { throw new NotSupportedException(); } protected override MethodInfo GetMethodImpl(String name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) { throw new NotSupportedException(); } @@ -147,7 +145,6 @@ namespace System.Reflection.Emit public override MemberInfo[] GetMember(String name, MemberTypes type, BindingFlags bindingAttr) { throw new NotSupportedException(); } -[System.Runtime.InteropServices.ComVisible(true)] public override InterfaceMapping GetInterfaceMap(Type interfaceType) { throw new NotSupportedException(); } public override EventInfo[] GetEvents(BindingFlags bindingAttr) { throw new NotSupportedException(); } @@ -198,7 +195,6 @@ namespace System.Reflection.Emit public override bool IsAssignableFrom(Type c) { throw new NotSupportedException(); } - [System.Runtime.InteropServices.ComVisible(true)] [Pure] public override bool IsSubclassOf(Type c) { throw new NotSupportedException(); } #endregion @@ -228,7 +224,6 @@ namespace System.Reflection.Emit m_type.SetParent(baseTypeConstraint); } - [System.Runtime.InteropServices.ComVisible(true)] public void SetInterfaceConstraints(params Type[] interfaceConstraints) { m_type.CheckContext(interfaceConstraints); diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ILGenerator.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ILGenerator.cs index 0602da7..af8faa6 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ILGenerator.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ILGenerator.cs @@ -609,7 +609,6 @@ namespace System.Reflection.Emit PutInteger4(tempVal); } - [System.Runtime.InteropServices.ComVisible(true)] public virtual void Emit(OpCode opcode, ConstructorInfo con) { if (con == null) diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/Label.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/Label.cs index dd248b6..b9a3b30 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/Label.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/Label.cs @@ -26,7 +26,6 @@ namespace System.Reflection.Emit { // Labels are created by using ILGenerator.CreateLabel and their position is set // by using ILGenerator.MarkLabel. [Serializable] - [ComVisible(true)] public struct Label { internal int m_label; diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs index 5914721..f718b7b 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs @@ -914,7 +914,6 @@ namespace System.Reflection.Emit } -[System.Runtime.InteropServices.ComVisible(true)] public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute) { if (con == null) @@ -1115,7 +1114,6 @@ namespace System.Reflection.Emit /// Describes exception handler in a method body. /// [StructLayout(LayoutKind.Sequential)] - [ComVisible(false)] internal struct ExceptionHandler : IEquatable { // Keep in sync with unmanged structure. diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/MethodToken.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/MethodToken.cs index cc28e17..d7361b0 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/MethodToken.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/MethodToken.cs @@ -19,7 +19,6 @@ namespace System.Reflection.Emit { using System.Security.Permissions; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public struct MethodToken { public static readonly MethodToken Empty = new MethodToken(); diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ModuleBuilder.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ModuleBuilder.cs index 0dc5ab8..58608fe 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ModuleBuilder.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ModuleBuilder.cs @@ -633,19 +633,16 @@ namespace System.Reflection.Emit return typeList; } - [System.Runtime.InteropServices.ComVisible(true)] public override Type GetType(String className) { return GetType(className, false, false); } - [System.Runtime.InteropServices.ComVisible(true)] public override Type GetType(String className, bool ignoreCase) { return GetType(className, false, ignoreCase); } - [System.Runtime.InteropServices.ComVisible(true)] public override Type GetType(String className, bool throwOnError, bool ignoreCase) { lock(SyncRoot) @@ -938,7 +935,6 @@ namespace System.Reflection.Emit } } - [System.Runtime.InteropServices.ComVisible(true)] public TypeBuilder DefineType(String name, TypeAttributes attr, Type parent, Type[] interfaces) { Contract.Ensures(Contract.Result() != null); @@ -1530,7 +1526,6 @@ namespace System.Reflection.Emit return new SymbolMethod(this, token, arrayClass, methodName, callingConvention, returnType, parameterTypes); } - [System.Runtime.InteropServices.ComVisible(true)] public MethodToken GetConstructorToken(ConstructorInfo con) { // Return a token for the ConstructorInfo relative to the Module. @@ -1680,7 +1675,6 @@ namespace System.Reflection.Emit #region Other - [System.Runtime.InteropServices.ComVisible(true)] public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute) { if (con == null) diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/OpCodes.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/OpCodes.cs index 345694e..2e73bda 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/OpCodes.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/OpCodes.cs @@ -250,7 +250,6 @@ internal enum OpCodeValues { // If you add more opcodes here, modify OpCode.Name to handle them correctly }; -[System.Runtime.InteropServices.ComVisible(true)] public class OpCodes { /// @@ -1419,7 +1418,6 @@ public class OpCodes { (1 << OpCode.StackChangeShift) ); - [System.Runtime.InteropServices.ComVisible(true)] public static readonly OpCode Castclass = new OpCode(OpCodeValues.Castclass, ((int)OperandType.InlineType) | ((int)FlowControl.Next << OpCode.FlowControlShift) | diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/Opcode.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/Opcode.cs index d7bfacd..98838f9 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/Opcode.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/Opcode.cs @@ -8,7 +8,6 @@ using System.Threading; using System.Security.Permissions; using System.Diagnostics.Contracts; -[System.Runtime.InteropServices.ComVisible(true)] public struct OpCode { // diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/OpcodeType.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/OpcodeType.cs index 3636cb7..87dea05 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/OpcodeType.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/OpcodeType.cs @@ -17,7 +17,6 @@ namespace System.Reflection.Emit { using System; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum OpCodeType { diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/OperandType.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/OperandType.cs index 808844a..e972e86 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/OperandType.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/OperandType.cs @@ -17,7 +17,6 @@ namespace System.Reflection.Emit { using System; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum OperandType { diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/PEFileKinds.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/PEFileKinds.cs index d9c9c03..531ff41 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/PEFileKinds.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/PEFileKinds.cs @@ -7,7 +7,6 @@ namespace System.Reflection.Emit { using System; // This Enum matchs the CorFieldAttr defined in CorHdr.h [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public enum PEFileKinds { Dll = 0x0001, diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs index a78934d..eb6fe17 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs @@ -34,7 +34,6 @@ namespace System.Reflection.Emit { // Use this function if client decides to form the custom attribute blob themselves - [System.Runtime.InteropServices.ComVisible(true)] public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute) { if (con == null) diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ParameterToken.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ParameterToken.cs index a101c95..05dc166 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ParameterToken.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/ParameterToken.cs @@ -21,7 +21,6 @@ namespace System.Reflection.Emit { // The ParameterToken class is an opaque representation of the Token returned // by the Metadata to represent the parameter. [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public struct ParameterToken { public static readonly ParameterToken Empty = new ParameterToken(); diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/PropertyBuilder.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/PropertyBuilder.cs index 500a686..cd09a0e 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/PropertyBuilder.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/PropertyBuilder.cs @@ -124,7 +124,6 @@ namespace System.Reflection.Emit { // Use this function if client decides to form the custom attribute blob themselves -[System.Runtime.InteropServices.ComVisible(true)] public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute) { if (con == null) diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/PropertyToken.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/PropertyToken.cs index d70cad0..7f23d59 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/PropertyToken.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/PropertyToken.cs @@ -19,7 +19,6 @@ namespace System.Reflection.Emit { using System.Security.Permissions; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public struct PropertyToken { public static readonly PropertyToken Empty = new PropertyToken(); diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/SignatureToken.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/SignatureToken.cs index 0a87ac1..5b8dfbf 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/SignatureToken.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/SignatureToken.cs @@ -19,7 +19,6 @@ namespace System.Reflection.Emit { using System.Reflection; using System.Security.Permissions; - [System.Runtime.InteropServices.ComVisible(true)] public struct SignatureToken { public static readonly SignatureToken Empty = new SignatureToken(); diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/StackBehaviour.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/StackBehaviour.cs index 2d2c35e..8a447d0 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/StackBehaviour.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/StackBehaviour.cs @@ -17,7 +17,6 @@ namespace System.Reflection.Emit { using System; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum StackBehaviour { diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/StringToken.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/StringToken.cs index cb0e979..92bec24 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/StringToken.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/StringToken.cs @@ -19,7 +19,6 @@ namespace System.Reflection.Emit { using System.Security.Permissions; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public struct StringToken { internal int m_string; diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/SymbolType.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/SymbolType.cs index 84ece90..2052991 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/SymbolType.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/SymbolType.cs @@ -419,7 +419,6 @@ namespace System.Reflection.Emit throw new NotSupportedException(Environment.GetResourceString("NotSupported_NonReflectedType")); } -[System.Runtime.InteropServices.ComVisible(true)] public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr) { throw new NotSupportedException(Environment.GetResourceString("NotSupported_NonReflectedType")); @@ -497,7 +496,6 @@ namespace System.Reflection.Emit throw new NotSupportedException(Environment.GetResourceString("NotSupported_NonReflectedType")); } -[System.Runtime.InteropServices.ComVisible(true)] public override InterfaceMapping GetInterfaceMap(Type interfaceType) { throw new NotSupportedException(Environment.GetResourceString("NotSupported_NonReflectedType")); diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs index ff7eb65..582c95f 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs @@ -21,7 +21,6 @@ namespace System.Reflection.Emit { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public enum PackingSize { Unspecified = 0, @@ -892,7 +891,6 @@ namespace System.Reflection.Emit { return m_bakedRuntimeType.GetConstructor(bindingAttr, binder, callConvention, types, modifiers); } - [System.Runtime.InteropServices.ComVisible(true)] public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr) { if (!IsCreated()) @@ -1030,7 +1028,6 @@ namespace System.Reflection.Emit { return m_bakedRuntimeType.GetMember(name, type, bindingAttr); } - [System.Runtime.InteropServices.ComVisible(true)] public override InterfaceMapping GetInterfaceMap(Type interfaceType) { if (!IsCreated()) @@ -1161,7 +1158,6 @@ namespace System.Reflection.Emit { get { return false; } } - [System.Runtime.InteropServices.ComVisible(true)] [Pure] public override bool IsSubclassOf(Type c) { @@ -1484,7 +1480,6 @@ namespace System.Reflection.Emit { #endregion #region Define Constructor - [System.Runtime.InteropServices.ComVisible(true)] public ConstructorBuilder DefineTypeInitializer() { lock(SyncRoot) @@ -1506,7 +1501,6 @@ namespace System.Reflection.Emit { return constBuilder; } - [System.Runtime.InteropServices.ComVisible(true)] public ConstructorBuilder DefineDefaultConstructor(MethodAttributes attributes) { if ((m_iAttr & TypeAttributes.Interface) == TypeAttributes.Interface) @@ -1574,13 +1568,11 @@ namespace System.Reflection.Emit { return constBuilder; } - [System.Runtime.InteropServices.ComVisible(true)] public ConstructorBuilder DefineConstructor(MethodAttributes attributes, CallingConventions callingConvention, Type[] parameterTypes) { return DefineConstructor(attributes, callingConvention, parameterTypes, null, null); } - [System.Runtime.InteropServices.ComVisible(true)] public ConstructorBuilder DefineConstructor(MethodAttributes attributes, CallingConventions callingConvention, Type[] parameterTypes, Type[][] requiredCustomModifiers, Type[][] optionalCustomModifiers) { @@ -1637,7 +1629,6 @@ namespace System.Reflection.Emit { } } - [System.Runtime.InteropServices.ComVisible(true)] public TypeBuilder DefineNestedType(String name, TypeAttributes attr, Type parent, Type[] interfaces) { lock(SyncRoot) @@ -2150,7 +2141,6 @@ namespace System.Reflection.Emit { } } - [System.Runtime.InteropServices.ComVisible(true)] public void AddInterfaceImplementation(Type interfaceType) { if (interfaceType == null) @@ -2181,7 +2171,6 @@ public TypeToken TypeToken } - [System.Runtime.InteropServices.ComVisible(true)] public void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute) { if (con == null) diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs index 3bae585..da5a56b 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeBuilderInstantiation.cs @@ -168,7 +168,6 @@ namespace System.Reflection.Emit } protected override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) { throw new NotSupportedException(); } - [System.Runtime.InteropServices.ComVisible(true)] public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr) { throw new NotSupportedException(); } protected override MethodInfo GetMethodImpl(String name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) { throw new NotSupportedException(); } public override MethodInfo[] GetMethods(BindingFlags bindingAttr) { throw new NotSupportedException(); } @@ -184,7 +183,6 @@ namespace System.Reflection.Emit public override Type GetNestedType(String name, BindingFlags bindingAttr) { throw new NotSupportedException(); } public override MemberInfo[] GetMember(String name, MemberTypes type, BindingFlags bindingAttr) { throw new NotSupportedException(); } - [System.Runtime.InteropServices.ComVisible(true)] public override InterfaceMapping GetInterfaceMap(Type interfaceType) { throw new NotSupportedException(); } public override EventInfo[] GetEvents(BindingFlags bindingAttr) { throw new NotSupportedException(); } public override MemberInfo[] GetMembers(BindingFlags bindingAttr) { throw new NotSupportedException(); } @@ -222,7 +220,6 @@ namespace System.Reflection.Emit public override Type MakeGenericType(params Type[] inst) { throw new InvalidOperationException(Environment.GetResourceString("Arg_NotGenericTypeDefinition")); } public override bool IsAssignableFrom(Type c) { throw new NotSupportedException(); } - [System.Runtime.InteropServices.ComVisible(true)] [Pure] public override bool IsSubclassOf(Type c) { diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeToken.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeToken.cs index e4289a6..a621a47 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeToken.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Emit/TypeToken.cs @@ -20,7 +20,6 @@ namespace System.Reflection.Emit { using System.Security.Permissions; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public struct TypeToken { public static readonly TypeToken Empty = new TypeToken(); diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/EventAttributes.cs b/src/coreclr/src/mscorlib/src/System/Reflection/EventAttributes.cs index c028565..4cc08f6 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/EventAttributes.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/EventAttributes.cs @@ -16,7 +16,6 @@ namespace System.Reflection { using System; [Serializable] [Flags] - [System.Runtime.InteropServices.ComVisible(true)] public enum EventAttributes { None = 0x0000, diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/FieldAttributes.cs b/src/coreclr/src/mscorlib/src/System/Reflection/FieldAttributes.cs index 48c90a1..e49a0a4 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/FieldAttributes.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/FieldAttributes.cs @@ -8,7 +8,6 @@ namespace System.Reflection // This Enum matchs the CorFieldAttr defined in CorHdr.h [Serializable] [Flags()] - [System.Runtime.InteropServices.ComVisible(true)] public enum FieldAttributes { // member access mask - Use this mask to retrieve accessibility information. diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/FieldInfo.cs b/src/coreclr/src/mscorlib/src/System/Reflection/FieldInfo.cs index 2fe1537..f534e8d 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/FieldInfo.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/FieldInfo.cs @@ -40,7 +40,6 @@ namespace System.Reflection return f; } - [System.Runtime.InteropServices.ComVisible(false)] public static FieldInfo GetFieldFromHandle(RuntimeFieldHandle handle, RuntimeTypeHandle declaringType) { if (handle.IsNullHandle()) diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/ICustomAttributeProvider.cs b/src/coreclr/src/mscorlib/src/System/Reflection/ICustomAttributeProvider.cs index 1fd361c..faea91a 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/ICustomAttributeProvider.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/ICustomAttributeProvider.cs @@ -15,7 +15,6 @@ namespace System.Reflection { using System; // Interface does not need to be marked with the serializable attribute -[System.Runtime.InteropServices.ComVisible(true)] public interface ICustomAttributeProvider { diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/IReflect.cs b/src/coreclr/src/mscorlib/src/System/Reflection/IReflect.cs index 92ce341..1c3c576 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/IReflect.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/IReflect.cs @@ -20,7 +20,6 @@ namespace System.Reflection { // Interface does not need to be marked with the serializable attribute [Guid("AFBF15E5-C37C-11d2-B88E-00A0C9B471B8")] -[System.Runtime.InteropServices.ComVisible(true)] public interface IReflect { // Return the requested method if it is implemented by the Reflection object. The diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/InterfaceMapping.cs b/src/coreclr/src/mscorlib/src/System/Reflection/InterfaceMapping.cs index 488ef44..bf994f7 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/InterfaceMapping.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/InterfaceMapping.cs @@ -13,15 +13,10 @@ namespace System.Reflection { using System; -[System.Runtime.InteropServices.ComVisible(true)] public struct InterfaceMapping { -[System.Runtime.InteropServices.ComVisible(true)] public Type TargetType; // The type implementing the interface -[System.Runtime.InteropServices.ComVisible(true)] public Type InterfaceType; // The type representing the interface -[System.Runtime.InteropServices.ComVisible(true)] public MethodInfo[] TargetMethods; // The methods implementing the interface -[System.Runtime.InteropServices.ComVisible(true)] public MethodInfo[] InterfaceMethods; // The methods defined on the interface } } diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/InvalidFilterCriteriaException.cs b/src/coreclr/src/mscorlib/src/System/Reflection/InvalidFilterCriteriaException.cs index fa95e37..8b8c06d 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/InvalidFilterCriteriaException.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/InvalidFilterCriteriaException.cs @@ -18,7 +18,6 @@ namespace System.Reflection { using System.Runtime.Serialization; using ApplicationException = System.ApplicationException; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class InvalidFilterCriteriaException : ApplicationException { public InvalidFilterCriteriaException() : base(Environment.GetResourceString("Arg_InvalidFilterCriteriaException")) { diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/ManifestResourceInfo.cs b/src/coreclr/src/mscorlib/src/System/Reflection/ManifestResourceInfo.cs index a53d32a..91c7ceb 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/ManifestResourceInfo.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/ManifestResourceInfo.cs @@ -16,7 +16,6 @@ namespace System.Reflection { using System; -[System.Runtime.InteropServices.ComVisible(true)] public class ManifestResourceInfo { private Assembly _containingAssembly; private String _containingFileName; @@ -57,7 +56,6 @@ namespace System.Reflection { // Linked means not Embedded. [Serializable] [Flags] -[System.Runtime.InteropServices.ComVisible(true)] public enum ResourceLocation { Embedded = 0x1, diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/MemberFilter.cs b/src/coreclr/src/mscorlib/src/System/Reflection/MemberFilter.cs index b476409..56fc9c0 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/MemberFilter.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/MemberFilter.cs @@ -14,6 +14,5 @@ namespace System.Reflection { // Define the delegate [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public delegate bool MemberFilter(MemberInfo m, Object filterCriteria); } diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/MemberTypes.cs b/src/coreclr/src/mscorlib/src/System/Reflection/MemberTypes.cs index 352a802..95c4102 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/MemberTypes.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/MemberTypes.cs @@ -17,7 +17,6 @@ namespace System.Reflection { // This Enum matchs the CorTypeAttr defined in CorHdr.h [Serializable] [Flags()] - [System.Runtime.InteropServices.ComVisible(true)] public enum MemberTypes { // The following are the known classes which extend MemberInfo diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/MethodAttributes.cs b/src/coreclr/src/mscorlib/src/System/Reflection/MethodAttributes.cs index 92b637b..7e4391c 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/MethodAttributes.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/MethodAttributes.cs @@ -10,7 +10,6 @@ namespace System.Reflection using System; [Serializable] [Flags] - [System.Runtime.InteropServices.ComVisible(true)] public enum MethodAttributes { // NOTE: This Enum matchs the CorMethodAttr defined in CorHdr.h diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/MethodBase.cs b/src/coreclr/src/mscorlib/src/System/Reflection/MethodBase.cs index 14a73c6..1a666d6 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/MethodBase.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/MethodBase.cs @@ -67,7 +67,6 @@ namespace System.Reflection return m; } - [System.Runtime.InteropServices.ComVisible(false)] public static MethodBase GetMethodFromHandle(RuntimeMethodHandle handle, RuntimeTypeHandle declaringType) { if (handle.IsNullHandle()) @@ -155,7 +154,6 @@ namespace System.Reflection public virtual CallingConventions CallingConvention { get { return CallingConventions.Standard; } } - [System.Runtime.InteropServices.ComVisible(true)] public virtual Type[] GetGenericArguments() { throw new NotSupportedException(Environment.GetResourceString("NotSupported_SubclassOverride")); } public virtual bool IsGenericMethodDefinition { get { return false; } } @@ -210,7 +208,6 @@ namespace System.Reflection public bool IsSpecialName { get { return(Attributes & MethodAttributes.SpecialName) != 0; } } - [System.Runtime.InteropServices.ComVisible(true)] public bool IsConstructor { get diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/MethodBody.cs b/src/coreclr/src/mscorlib/src/System/Reflection/MethodBody.cs index 4634623..7cbaeaf 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/MethodBody.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/MethodBody.cs @@ -13,7 +13,6 @@ using System.Diagnostics.Contracts; namespace System.Reflection { [Flags()] - [System.Runtime.InteropServices.ComVisible(true)] public enum ExceptionHandlingClauseOptions: int { Clause = 0x0, @@ -22,7 +21,6 @@ namespace System.Reflection Fault = 0x4, } - [System.Runtime.InteropServices.ComVisible(true)] public class ExceptionHandlingClause { #region costructor @@ -107,7 +105,6 @@ namespace System.Reflection #endregion } - [System.Runtime.InteropServices.ComVisible(true)] public class MethodBody { #region costructor @@ -135,7 +132,6 @@ namespace System.Reflection #endregion } - [System.Runtime.InteropServices.ComVisible(true)] public class LocalVariableInfo { #region Private Data Members diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/MethodImplAttributes.cs b/src/coreclr/src/mscorlib/src/System/Reflection/MethodImplAttributes.cs index 0fa4d00..1bd6b9d 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/MethodImplAttributes.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/MethodImplAttributes.cs @@ -10,7 +10,6 @@ namespace System.Reflection using System; // This Enum matchs the CorMethodImpl defined in CorHdr.h [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum MethodImplAttributes { // code impl mask @@ -36,7 +35,6 @@ namespace System.Reflection Synchronized = 0x0020, // Method is single threaded through the body. NoInlining = 0x0008, // Method may not be inlined. - [System.Runtime.InteropServices.ComVisible(false)] AggressiveInlining = 0x0100, // Method should be inlined if possible. NoOptimization = 0x0040, // Method may not be optimized. diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/MethodInfo.cs b/src/coreclr/src/mscorlib/src/System/Reflection/MethodInfo.cs index 7f6645a..af52f5f 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/MethodInfo.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/MethodInfo.cs @@ -71,10 +71,8 @@ namespace System.Reflection public abstract MethodInfo GetBaseDefinition(); - [System.Runtime.InteropServices.ComVisible(true)] public override Type[] GetGenericArguments() { throw new NotSupportedException(Environment.GetResourceString("NotSupported_SubclassOverride")); } - [System.Runtime.InteropServices.ComVisible(true)] public virtual MethodInfo GetGenericMethodDefinition() { throw new NotSupportedException(Environment.GetResourceString("NotSupported_SubclassOverride")); } public virtual MethodInfo MakeGenericMethod(params Type[] typeArguments) { throw new NotSupportedException(Environment.GetResourceString("NotSupported_SubclassOverride")); } diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Missing.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Missing.cs index 24bf77b..a05acdb 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Missing.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Missing.cs @@ -14,7 +14,6 @@ namespace System.Reflection // This is not serializable because it is a reflection command. [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class Missing : ISerializable { public static readonly Missing Value = new Missing(); diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Module.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Module.cs index ec75e38..5acaaeb 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Module.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Module.cs @@ -25,7 +25,6 @@ namespace System.Reflection [Serializable] [Flags] - [System.Runtime.InteropServices.ComVisible(true)] public enum PortableExecutableKinds { NotAPortableExecutableImage = 0x0, @@ -38,12 +37,10 @@ namespace System.Reflection Unmanaged32Bit = 0x8, - [ComVisible(false)] Preferred32Bit = 0x10, } [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public enum ImageFileMachine { I386 = 0x014c, @@ -273,18 +270,15 @@ namespace System.Reflection throw new NotImplementedException(); } - [System.Runtime.InteropServices.ComVisible(true)] public virtual Type GetType(String className, bool ignoreCase) { return GetType(className, false, ignoreCase); } - [System.Runtime.InteropServices.ComVisible(true)] public virtual Type GetType(String className) { return GetType(className, false, false); } - [System.Runtime.InteropServices.ComVisible(true)] public virtual Type GetType(String className, bool throwOnError, bool ignoreCase) { throw new NotImplementedException(); @@ -980,7 +974,6 @@ namespace System.Reflection UnitySerializationHolder.GetUnitySerializationInfo(info, UnitySerializationHolder.ModuleUnity, this.ScopeName, this.GetRuntimeAssembly()); } - [System.Runtime.InteropServices.ComVisible(true)] public override Type GetType(String className, bool throwOnError, bool ignoreCase) { // throw on null strings regardless of the value of "throwOnError" diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/ObfuscateAssemblyAttribute.cs b/src/coreclr/src/mscorlib/src/System/Reflection/ObfuscateAssemblyAttribute.cs index b852e5a..787f37b 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/ObfuscateAssemblyAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/ObfuscateAssemblyAttribute.cs @@ -11,7 +11,6 @@ using System.Reflection; namespace System.Reflection { [AttributeUsage (AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class ObfuscateAssemblyAttribute : Attribute { private bool m_assemblyIsPrivate; diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/ObfuscationAttribute.cs b/src/coreclr/src/mscorlib/src/System/Reflection/ObfuscationAttribute.cs index 0b987ce..c7c7c18 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/ObfuscationAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/ObfuscationAttribute.cs @@ -11,7 +11,6 @@ namespace System.Reflection { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Enum | AttributeTargets.Delegate, AllowMultiple = true, Inherited = false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class ObfuscationAttribute: Attribute { private bool m_strip = true; diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/ParameterAttributes.cs b/src/coreclr/src/mscorlib/src/System/Reflection/ParameterAttributes.cs index 12f8145..acae3a6 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/ParameterAttributes.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/ParameterAttributes.cs @@ -16,7 +16,6 @@ namespace System.Reflection { // This Enum matchs the CorParamAttr defined in CorHdr.h [Serializable] [Flags] - [System.Runtime.InteropServices.ComVisible(true)] public enum ParameterAttributes { None = 0x0000, // no flag is specified diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/ParameterModifier.cs b/src/coreclr/src/mscorlib/src/System/Reflection/ParameterModifier.cs index 97da1b9..a2bfeab 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/ParameterModifier.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/ParameterModifier.cs @@ -7,7 +7,6 @@ namespace System.Reflection using System; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public struct ParameterModifier { #region Private Data Members diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/Pointer.cs b/src/coreclr/src/mscorlib/src/System/Reflection/Pointer.cs index 95025b2..9f1a383 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/Pointer.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/Pointer.cs @@ -19,7 +19,6 @@ namespace System.Reflection { [CLSCompliant(false)] [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class Pointer : ISerializable { unsafe private void* _ptr; diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/PropertyAttributes.cs b/src/coreclr/src/mscorlib/src/System/Reflection/PropertyAttributes.cs index d7c3d79..4a5617b 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/PropertyAttributes.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/PropertyAttributes.cs @@ -16,7 +16,6 @@ namespace System.Reflection { // This Enum matchs the CorPropertyAttr defined in CorHdr.h [Serializable] [Flags] -[System.Runtime.InteropServices.ComVisible(true)] public enum PropertyAttributes { None = 0x0000, diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/ReflectionTypeLoadException.cs b/src/coreclr/src/mscorlib/src/System/Reflection/ReflectionTypeLoadException.cs index 3c9ce1b..7e5d8ec 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/ReflectionTypeLoadException.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/ReflectionTypeLoadException.cs @@ -22,7 +22,6 @@ namespace System.Reflection { using System.Security.Permissions; using System.Diagnostics.Contracts; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class ReflectionTypeLoadException : SystemException, ISerializable { private Type[] _classes; private Exception[] _exceptions; diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/ResourceAttributes.cs b/src/coreclr/src/mscorlib/src/System/Reflection/ResourceAttributes.cs index 6465726..5c419eb 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/ResourceAttributes.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/ResourceAttributes.cs @@ -15,7 +15,6 @@ namespace System.Reflection { using System; [Serializable] [Flags] -[System.Runtime.InteropServices.ComVisible(true)] public enum ResourceAttributes { Public = 0x0001, diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/StrongNameKeyPair.cs b/src/coreclr/src/mscorlib/src/System/Reflection/StrongNameKeyPair.cs index 8107cf4..3350e41 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/StrongNameKeyPair.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/StrongNameKeyPair.cs @@ -28,7 +28,6 @@ namespace System.Reflection using System.Diagnostics.Contracts; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class StrongNameKeyPair : IDeserializationCallback, ISerializable { private bool _keyPairExported; diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/TargetException.cs b/src/coreclr/src/mscorlib/src/System/Reflection/TargetException.cs index 9c56c12..dcbb388 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/TargetException.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/TargetException.cs @@ -18,7 +18,6 @@ namespace System.Reflection { using System; using System.Runtime.Serialization; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class TargetException : ApplicationException { public TargetException() : base() { SetErrorCode(__HResults.COR_E_TARGET); diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/TargetInvocationException.cs b/src/coreclr/src/mscorlib/src/System/Reflection/TargetInvocationException.cs index 4a32ed2..7bbc93d 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/TargetInvocationException.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/TargetInvocationException.cs @@ -18,7 +18,6 @@ namespace System.Reflection { using System; using System.Runtime.Serialization; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class TargetInvocationException : ApplicationException { // This exception is not creatable without specifying the // inner exception. diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/TargetParameterCountException.cs b/src/coreclr/src/mscorlib/src/System/Reflection/TargetParameterCountException.cs index 846732b..7a07b20 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/TargetParameterCountException.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/TargetParameterCountException.cs @@ -18,7 +18,6 @@ namespace System.Reflection { using SystemException = System.SystemException; using System.Runtime.Serialization; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class TargetParameterCountException : ApplicationException { public TargetParameterCountException() : base(Environment.GetResourceString("Arg_TargetParameterCountException")) { diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/TypeAttributes.cs b/src/coreclr/src/mscorlib/src/System/Reflection/TypeAttributes.cs index 4fa6fb0..25aa113 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/TypeAttributes.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/TypeAttributes.cs @@ -8,7 +8,6 @@ namespace System.Reflection { // This Enum matchs the CorTypeAttr defined in CorHdr.h [Serializable] [Flags] -[System.Runtime.InteropServices.ComVisible(true)] public enum TypeAttributes { VisibilityMask = 0x00000007, @@ -43,7 +42,6 @@ namespace System.Reflection { Import = 0x00001000, // Class / interface is imported Serializable = 0x00002000, // The class is Serializable. - [ComVisible(false)] WindowsRuntime = 0x00004000, // Type is a Windows Runtime type. // Use tdStringFormatMask to retrieve string information for native interop diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/TypeDelegator.cs b/src/coreclr/src/mscorlib/src/System/Reflection/TypeDelegator.cs index d715df8..6a77a95 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/TypeDelegator.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/TypeDelegator.cs @@ -14,7 +14,6 @@ namespace System.Reflection { using CultureInfo = System.Globalization.CultureInfo; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public class TypeDelegator : TypeInfo { public override bool IsAssignableFrom(System.Reflection.TypeInfo typeInfo){ @@ -86,7 +85,6 @@ namespace System.Reflection { return typeImpl.GetConstructor(bindingAttr,binder,callConvention,types,modifiers); } -[System.Runtime.InteropServices.ComVisible(true)] public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr) { return typeImpl.GetConstructors(bindingAttr); @@ -251,7 +249,6 @@ namespace System.Reflection { return typeImpl.IsDefined(attributeType, inherit); } -[System.Runtime.InteropServices.ComVisible(true)] public override InterfaceMapping GetInterfaceMap(Type interfaceType) { return typeImpl.GetInterfaceMap(interfaceType); diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/TypeFilter.cs b/src/coreclr/src/mscorlib/src/System/Reflection/TypeFilter.cs index 560618f..4837a30 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/TypeFilter.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/TypeFilter.cs @@ -14,6 +14,5 @@ namespace System.Reflection { // Define the delegate [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public delegate bool TypeFilter(Type m, Object filterCriteria); } diff --git a/src/coreclr/src/mscorlib/src/System/Reflection/TypeInfo.cs b/src/coreclr/src/mscorlib/src/System/Reflection/TypeInfo.cs index 706fb0a..61d7bb2 100644 --- a/src/coreclr/src/mscorlib/src/System/Reflection/TypeInfo.cs +++ b/src/coreclr/src/mscorlib/src/System/Reflection/TypeInfo.cs @@ -22,7 +22,6 @@ namespace System.Reflection //all today's runtime Type derivations derive now from TypeInfo //we make TypeInfo implement IRCT - simplifies work - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public abstract class TypeInfo:Type,IReflectableType { diff --git a/src/coreclr/src/mscorlib/src/System/Resources/IResourceReader.cs b/src/coreclr/src/mscorlib/src/System/Resources/IResourceReader.cs index 7ab25ec..de8f9db 100644 --- a/src/coreclr/src/mscorlib/src/System/Resources/IResourceReader.cs +++ b/src/coreclr/src/mscorlib/src/System/Resources/IResourceReader.cs @@ -17,7 +17,6 @@ namespace System.Resources { using System.IO; using System.Collections; - [System.Runtime.InteropServices.ComVisible(true)] public interface IResourceReader : IEnumerable, IDisposable { // Interface does not need to be marked with the serializable attribute diff --git a/src/coreclr/src/mscorlib/src/System/Resources/LooselyLinkedResourceReference.cs b/src/coreclr/src/mscorlib/src/System/Resources/LooselyLinkedResourceReference.cs index 15a076b..9287ae4 100644 --- a/src/coreclr/src/mscorlib/src/System/Resources/LooselyLinkedResourceReference.cs +++ b/src/coreclr/src/mscorlib/src/System/Resources/LooselyLinkedResourceReference.cs @@ -28,7 +28,6 @@ namespace System.Resources { [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public struct LooselyLinkedResourceReference { private String _manifestResourceName; private String _typeName; diff --git a/src/coreclr/src/mscorlib/src/System/Resources/MissingManifestResourceException.cs b/src/coreclr/src/mscorlib/src/System/Resources/MissingManifestResourceException.cs index e616bfe..2e82f19 100644 --- a/src/coreclr/src/mscorlib/src/System/Resources/MissingManifestResourceException.cs +++ b/src/coreclr/src/mscorlib/src/System/Resources/MissingManifestResourceException.cs @@ -18,7 +18,6 @@ using System.Runtime.Serialization; namespace System.Resources { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class MissingManifestResourceException : SystemException { public MissingManifestResourceException() diff --git a/src/coreclr/src/mscorlib/src/System/Resources/MissingSatelliteAssemblyException.cs b/src/coreclr/src/mscorlib/src/System/Resources/MissingSatelliteAssemblyException.cs index 3d59f85..fc676a8 100644 --- a/src/coreclr/src/mscorlib/src/System/Resources/MissingSatelliteAssemblyException.cs +++ b/src/coreclr/src/mscorlib/src/System/Resources/MissingSatelliteAssemblyException.cs @@ -20,7 +20,6 @@ using System.Runtime.Serialization; namespace System.Resources { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class MissingSatelliteAssemblyException : SystemException { private String _cultureName; diff --git a/src/coreclr/src/mscorlib/src/System/Resources/NeutralResourcesLanguageAttribute.cs b/src/coreclr/src/mscorlib/src/System/Resources/NeutralResourcesLanguageAttribute.cs index 6517a56..a2ed6fb 100644 --- a/src/coreclr/src/mscorlib/src/System/Resources/NeutralResourcesLanguageAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/Resources/NeutralResourcesLanguageAttribute.cs @@ -26,7 +26,6 @@ namespace System.Resources { using System.Diagnostics.Contracts; [AttributeUsage(AttributeTargets.Assembly, AllowMultiple=false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class NeutralResourcesLanguageAttribute : Attribute { private String _culture; diff --git a/src/coreclr/src/mscorlib/src/System/Resources/ResourceManager.cs b/src/coreclr/src/mscorlib/src/System/Resources/ResourceManager.cs index 832ac17..a03c12c 100644 --- a/src/coreclr/src/mscorlib/src/System/Resources/ResourceManager.cs +++ b/src/coreclr/src/mscorlib/src/System/Resources/ResourceManager.cs @@ -149,7 +149,6 @@ namespace System.Resources { // [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class ResourceManager { @@ -1246,12 +1245,10 @@ namespace System.Resources { return null; } - [ComVisible(false)] public UnmanagedMemoryStream GetStream(String name) { return GetStream(name, (CultureInfo)null); } - [ComVisible(false)] public UnmanagedMemoryStream GetStream(String name, CultureInfo culture) { Object obj = GetObject(name, culture, false); UnmanagedMemoryStream ums = obj as UnmanagedMemoryStream; diff --git a/src/coreclr/src/mscorlib/src/System/Resources/ResourceReader.cs b/src/coreclr/src/mscorlib/src/System/Resources/ResourceReader.cs index aaccea7..68feaa2 100644 --- a/src/coreclr/src/mscorlib/src/System/Resources/ResourceReader.cs +++ b/src/coreclr/src/mscorlib/src/System/Resources/ResourceReader.cs @@ -68,7 +68,6 @@ namespace System.Resources { } - [System.Runtime.InteropServices.ComVisible(true)] public sealed class ResourceReader : IResourceReader { // A reasonable default buffer size for reading from files, especially diff --git a/src/coreclr/src/mscorlib/src/System/Resources/ResourceSet.cs b/src/coreclr/src/mscorlib/src/System/Resources/ResourceSet.cs index 1b272fc..d3932ff 100644 --- a/src/coreclr/src/mscorlib/src/System/Resources/ResourceSet.cs +++ b/src/coreclr/src/mscorlib/src/System/Resources/ResourceSet.cs @@ -31,7 +31,6 @@ namespace System.Resources { // stores them in a hash table. Custom IResourceReaders can be used. // [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class ResourceSet : IDisposable, IEnumerable { [NonSerialized] protected IResourceReader Reader; @@ -158,7 +157,6 @@ namespace System.Resources { #if LOOSELY_LINKED_RESOURCE_REFERENCE // Optional - used for resolving assembly manifest resource references. // This can safely be null. - [ComVisible(false)] public Assembly Assembly { get { return _assembly; } /*protected*/ set { _assembly = value; } @@ -181,7 +179,6 @@ namespace System.Resources { return Type.GetType("System.Resources.ResourceWriter, System.Resources.Writer, Version=4.0.1.0, Culture=neutral, PublicKeyToken=" + AssemblyRef.MicrosoftPublicKeyToken, throwOnError: true); } - [ComVisible(false)] public virtual IDictionaryEnumerator GetEnumerator() { return GetEnumeratorHelper(); diff --git a/src/coreclr/src/mscorlib/src/System/Resources/SatelliteContractVersionAttribute.cs b/src/coreclr/src/mscorlib/src/System/Resources/SatelliteContractVersionAttribute.cs index 3272790..86e972e 100644 --- a/src/coreclr/src/mscorlib/src/System/Resources/SatelliteContractVersionAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/Resources/SatelliteContractVersionAttribute.cs @@ -19,7 +19,6 @@ namespace System.Resources { using System.Diagnostics.Contracts; [AttributeUsage(AttributeTargets.Assembly, AllowMultiple=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class SatelliteContractVersionAttribute : Attribute { private String _version; diff --git a/src/coreclr/src/mscorlib/src/System/Resources/UltimateResourceFallbackLocation.cs b/src/coreclr/src/mscorlib/src/System/Resources/UltimateResourceFallbackLocation.cs index 5785bfd..aa4069a 100644 --- a/src/coreclr/src/mscorlib/src/System/Resources/UltimateResourceFallbackLocation.cs +++ b/src/coreclr/src/mscorlib/src/System/Resources/UltimateResourceFallbackLocation.cs @@ -20,7 +20,6 @@ using System; namespace System.Resources { [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum UltimateResourceFallbackLocation { MainAssembly, diff --git a/src/coreclr/src/mscorlib/src/System/RtType.cs b/src/coreclr/src/mscorlib/src/System/RtType.cs index 147e3e3..a96bbac 100644 --- a/src/coreclr/src/mscorlib/src/System/RtType.cs +++ b/src/coreclr/src/mscorlib/src/System/RtType.cs @@ -2729,7 +2729,6 @@ namespace System return GetMethodCandidates(null, bindingAttr, CallingConventions.Any, null, false).ToArray(); } -[System.Runtime.InteropServices.ComVisible(true)] public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr) { return GetConstructorCandidates(null, bindingAttr, CallingConventions.Any, null, false).ToArray(); @@ -3318,7 +3317,6 @@ namespace System return RuntimeTypeHandle.IsInstanceOfType(this, o); } - [System.Runtime.InteropServices.ComVisible(true)] [Pure] public override bool IsSubclassOf(Type type) { diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/AccessedThroughPropertyAttribute.cs b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/AccessedThroughPropertyAttribute.cs index b0010fd..34e66be 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/AccessedThroughPropertyAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/AccessedThroughPropertyAttribute.cs @@ -9,7 +9,6 @@ namespace System.Runtime.CompilerServices using System; [AttributeUsage(AttributeTargets.Field)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class AccessedThroughPropertyAttribute : Attribute { private readonly string propertyName; diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/CompilationRelaxations.cs b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/CompilationRelaxations.cs index 5e4f194..c3679b6 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/CompilationRelaxations.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/CompilationRelaxations.cs @@ -13,7 +13,6 @@ namespace System.Runtime.CompilerServices /// IMPORTANT: Keep this in sync with corhdr.h [Serializable] [Flags] -[System.Runtime.InteropServices.ComVisible(true)] public enum CompilationRelaxations : int { NoStringInterning = 0x0008, // Start in 0x0008, we had other non public flags in this enum before, @@ -23,7 +22,6 @@ namespace System.Runtime.CompilerServices [Serializable] [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Method)] -[System.Runtime.InteropServices.ComVisible(true)] public class CompilationRelaxationsAttribute : Attribute { private int m_relaxations; // The relaxations. diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/ConditionalWeakTable.cs b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/ConditionalWeakTable.cs index b0e5b18..4b2648b 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/ConditionalWeakTable.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/ConditionalWeakTable.cs @@ -67,7 +67,6 @@ using System.Threading; namespace System.Runtime.CompilerServices { #region ConditionalWeakTable - [ComVisible(false)] public sealed class ConditionalWeakTable : IEnumerable> where TKey : class where TValue : class @@ -1065,7 +1064,6 @@ namespace System.Runtime.CompilerServices // This struct intentionally does no self-synchronization. It's up to the caller to // to use DependentHandles in a thread-safe way. //========================================================================================= - [ComVisible(false)] internal struct DependentHandle { #region Constructors diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/CustomConstantAttribute.cs b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/CustomConstantAttribute.cs index c912095..1a5dcfd 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/CustomConstantAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/CustomConstantAttribute.cs @@ -9,7 +9,6 @@ namespace System.Runtime.CompilerServices { [Serializable] [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited=false)] - [System.Runtime.InteropServices.ComVisible(true)] public abstract class CustomConstantAttribute : Attribute { public abstract Object Value { get; } diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs index 4362aa8..148d916 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs @@ -9,7 +9,6 @@ namespace System.Runtime.CompilerServices { [Serializable] [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited=false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class DateTimeConstantAttribute : CustomConstantAttribute { public DateTimeConstantAttribute(long ticks) diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/DecimalConstantAttribute.cs b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/DecimalConstantAttribute.cs index 7bfaa7a..f051918 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/DecimalConstantAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/DecimalConstantAttribute.cs @@ -14,7 +14,6 @@ namespace System.Runtime.CompilerServices { [Serializable] [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited=false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class DecimalConstantAttribute : Attribute { [CLSCompliant(false)] diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/DiscardableAttribute.cs b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/DiscardableAttribute.cs index 303151f..3fda462 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/DiscardableAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/DiscardableAttribute.cs @@ -9,7 +9,6 @@ namespace System.Runtime.CompilerServices { using System; // Custom attribute to indicating a TypeDef is a discardable attribute -[System.Runtime.InteropServices.ComVisible(true)] public class DiscardableAttribute : Attribute { public DiscardableAttribute() diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/IndexerNameAttribute.cs b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/IndexerNameAttribute.cs index 0323fe0..c32be6f 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/IndexerNameAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/IndexerNameAttribute.cs @@ -8,7 +8,6 @@ namespace System.Runtime.CompilerServices [Serializable] [AttributeUsage(AttributeTargets.Property, Inherited = true)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class IndexerNameAttribute: Attribute { public IndexerNameAttribute(String indexerName) diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/IsVolatile.cs b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/IsVolatile.cs index ea2fe03..5287e82 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/IsVolatile.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/IsVolatile.cs @@ -4,7 +4,6 @@ namespace System.Runtime.CompilerServices { -[System.Runtime.InteropServices.ComVisible(true)] public static class IsVolatile { // no instantiation, please! diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/MethodImplAttribute.cs b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/MethodImplAttribute.cs index d081d70..b499111 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/MethodImplAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/MethodImplAttribute.cs @@ -12,7 +12,6 @@ namespace System.Runtime.CompilerServices { [Serializable] [Flags] -[System.Runtime.InteropServices.ComVisible(true)] public enum MethodImplOptions { Unmanaged = System.Reflection.MethodImplAttributes.Unmanaged, @@ -21,14 +20,12 @@ namespace System.Runtime.CompilerServices { InternalCall = System.Reflection.MethodImplAttributes.InternalCall, Synchronized = System.Reflection.MethodImplAttributes.Synchronized, NoInlining = System.Reflection.MethodImplAttributes.NoInlining, - [System.Runtime.InteropServices.ComVisible(false)] AggressiveInlining = System.Reflection.MethodImplAttributes.AggressiveInlining, NoOptimization = System.Reflection.MethodImplAttributes.NoOptimization, // **** If you add something, update internal MethodImplAttribute(MethodImplAttributes methodImplAttributes)! **** } [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum MethodCodeType { IL = System.Reflection.MethodImplAttributes.IL, @@ -41,7 +38,6 @@ namespace System.Runtime.CompilerServices { // Custom attribute to specify additional method properties. [Serializable] [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)] -[System.Runtime.InteropServices.ComVisible(true)] sealed public class MethodImplAttribute : Attribute { internal MethodImplOptions _val; diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ArrayWithOffset.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ArrayWithOffset.cs index 77db3a7..fc15f4e 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ArrayWithOffset.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ArrayWithOffset.cs @@ -9,7 +9,6 @@ namespace System.Runtime.InteropServices { using System.Runtime.Versioning; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public struct ArrayWithOffset { //private ArrayWithOffset() diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Attributes.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Attributes.cs index f3bb1f9..b5bde22 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Attributes.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Attributes.cs @@ -12,7 +12,6 @@ namespace System.Runtime.InteropServices{ using System.Diagnostics.Contracts; [AttributeUsage(AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class UnmanagedFunctionPointerAttribute : Attribute { CallingConvention m_callingConvention; @@ -33,7 +32,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Enum | AttributeTargets.Struct | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(false)] public sealed class TypeIdentifierAttribute : Attribute { public TypeIdentifierAttribute() { } @@ -57,7 +55,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Event, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class DispIdAttribute : Attribute { internal int _val; @@ -69,19 +66,16 @@ namespace System.Runtime.InteropServices{ } [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public enum ComInterfaceType { InterfaceIsDual = 0, InterfaceIsIUnknown = 1, InterfaceIsIDispatch = 2, - [System.Runtime.InteropServices.ComVisible(false)] InterfaceIsIInspectable = 3, } [AttributeUsage(AttributeTargets.Interface, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class InterfaceTypeAttribute : Attribute { internal ComInterfaceType _val; @@ -97,7 +91,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Class, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class ComDefaultInterfaceAttribute : Attribute { internal Type _val; @@ -111,7 +104,6 @@ namespace System.Runtime.InteropServices{ } [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public enum ClassInterfaceType { None = 0, @@ -120,7 +112,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class ClassInterfaceAttribute : Attribute { internal ClassInterfaceType _val; @@ -137,7 +128,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Field | AttributeTargets.Method | AttributeTargets.Property, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class ComVisibleAttribute : Attribute { internal bool _val; @@ -149,7 +139,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Method, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class LCIDConversionAttribute : Attribute { internal int _val; @@ -161,7 +150,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Class, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class ProgIdAttribute : Attribute { internal String _val; @@ -173,7 +161,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Class, Inherited = true)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class ComSourceInterfacesAttribute : Attribute { internal String _val; @@ -201,7 +188,6 @@ namespace System.Runtime.InteropServices{ } [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public enum VarEnum { VT_EMPTY = 0, @@ -251,7 +237,6 @@ namespace System.Runtime.InteropServices{ } [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] // Note that this enum should remain in-sync with the CorNativeType enum in corhdr.h public enum UnmanagedType { @@ -325,18 +310,14 @@ namespace System.Runtime.InteropServices{ Error = 0x2d, - [System.Runtime.InteropServices.ComVisible(false)] IInspectable = 0x2e, - [System.Runtime.InteropServices.ComVisible(false)] HString = 0x2f, // Windows Runtime HSTRING - [System.Runtime.InteropServices.ComVisible(false)] LPUTF8Str = 0x30, // UTF8 string } [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.ReturnValue, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public unsafe sealed class MarshalAsAttribute : Attribute { internal static Attribute GetCustomAttribute(RuntimeParameterInfo parameter) @@ -435,15 +416,12 @@ namespace System.Runtime.InteropServices{ public int SizeConst; // constant C // Fields used with SubType = CustomMarshaler - [System.Runtime.InteropServices.ComVisible(true)] public String MarshalType; // Name of marshaler class - [System.Runtime.InteropServices.ComVisible(true)] public Type MarshalTypeRef; // Type of marshaler class public String MarshalCookie; // cookie to pass to marshaler } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class ComImportAttribute : Attribute { internal static Attribute GetCustomAttribute(RuntimeType type) @@ -465,7 +443,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct | AttributeTargets.Delegate, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class GuidAttribute : Attribute { internal String _val; @@ -477,7 +454,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Method, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class PreserveSigAttribute : Attribute { internal static Attribute GetCustomAttribute(RuntimeMethodInfo method) @@ -499,7 +475,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class InAttribute : Attribute { internal static Attribute GetCustomAttribute(RuntimeParameterInfo parameter) @@ -517,7 +492,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class OutAttribute : Attribute { internal static Attribute GetCustomAttribute(RuntimeParameterInfo parameter) @@ -535,7 +509,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class OptionalAttribute : Attribute { internal static Attribute GetCustomAttribute(RuntimeParameterInfo parameter) @@ -565,7 +538,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Method, AllowMultiple = false)] - [System.Runtime.InteropServices.ComVisible(false)] public sealed class DefaultDllImportSearchPathsAttribute : Attribute { internal DllImportSearchPath _paths; @@ -578,7 +550,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Method, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public unsafe sealed class DllImportAttribute : Attribute { internal static Attribute GetCustomAttribute(RuntimeMethodInfo method) @@ -672,7 +643,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public unsafe sealed class StructLayoutAttribute : Attribute { private const int DEFAULT_PACKING_SIZE = 8; @@ -744,7 +714,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Field, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public unsafe sealed class FieldOffsetAttribute : Attribute { internal static Attribute GetCustomAttribute(RuntimeFieldInfo field) @@ -772,7 +741,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Interface, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class CoClassAttribute : Attribute { internal Type _CoClass; @@ -786,7 +754,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class BestFitMappingAttribute : Attribute { internal bool _bestFitMapping; @@ -801,7 +768,6 @@ namespace System.Runtime.InteropServices{ } [AttributeUsage(AttributeTargets.Module, Inherited = false)] - [System.Runtime.InteropServices.ComVisible(true)] public sealed class DefaultCharSetAttribute : Attribute { internal CharSet _CharSet; diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/BStrWrapper.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/BStrWrapper.cs index 1673c91..a0d48b0 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/BStrWrapper.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/BStrWrapper.cs @@ -18,7 +18,6 @@ namespace System.Runtime.InteropServices { using System.Security.Permissions; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class BStrWrapper { public BStrWrapper(String value) diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/COMException.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/COMException.cs index d5e1df6..87e6be6 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/COMException.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/COMException.cs @@ -21,7 +21,6 @@ namespace System.Runtime.InteropServices { // Exception for COM Interop errors where we don't recognize the HResult. // - [ComVisible(true)] [Serializable] public class COMException : ExternalException { public COMException() diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/CallingConvention.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/CallingConvention.cs index cf4eb48..2ef1cf4 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/CallingConvention.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/CallingConvention.cs @@ -9,7 +9,6 @@ namespace System.Runtime.InteropServices { using System; // Used for the CallingConvention named argument to the DllImport attribute [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum CallingConvention { Winapi = 1, diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/CharSet.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/CharSet.cs index 3c0710a..e60d676 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/CharSet.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/CharSet.cs @@ -13,7 +13,6 @@ namespace System.Runtime.InteropServices { // Generally you probably want to use Auto, which does the // right thing 99% of the time. [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum CharSet { None = 1, // User didn't specify how to marshal strings. diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ComMemberType.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ComMemberType.cs index 3be2a56..c61d1b2 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ComMemberType.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ComMemberType.cs @@ -9,7 +9,6 @@ namespace System.Runtime.InteropServices { using System; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum ComMemberType { Method = 0, diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/CurrencyWrapper.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/CurrencyWrapper.cs index 470e7b2..304419e 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/CurrencyWrapper.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/CurrencyWrapper.cs @@ -16,7 +16,6 @@ namespace System.Runtime.InteropServices { using System; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class CurrencyWrapper { public CurrencyWrapper(Decimal obj) diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/DispatchWrapper.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/DispatchWrapper.cs index 47b7542..6f2f837 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/DispatchWrapper.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/DispatchWrapper.cs @@ -18,7 +18,6 @@ namespace System.Runtime.InteropServices { using System.Security.Permissions; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class DispatchWrapper { public DispatchWrapper(Object obj) diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ErrorWrapper.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ErrorWrapper.cs index a9fa58f..57149ab 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ErrorWrapper.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ErrorWrapper.cs @@ -17,7 +17,6 @@ namespace System.Runtime.InteropServices { using System.Security.Permissions; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class ErrorWrapper { public ErrorWrapper(int errorCode) diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Expando/IExpando.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Expando/IExpando.cs index 64c6a5a..429ce13 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Expando/IExpando.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Expando/IExpando.cs @@ -17,7 +17,6 @@ namespace System.Runtime.InteropServices.Expando { using System.Reflection; [Guid("AFBF15E6-C37C-11d2-B88E-00A0C9B471B8")] -[System.Runtime.InteropServices.ComVisible(true)] internal interface IExpando : IReflect { // Add a new Field to the reflection object. The field has diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ExternalException.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ExternalException.cs index 70a6dfe..7e1f395 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ExternalException.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ExternalException.cs @@ -20,7 +20,6 @@ namespace System.Runtime.InteropServices { // Base exception for COM Interop errors &; Structured Exception Handler // exceptions. // - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class ExternalException : SystemException { public ExternalException() diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/GcHandle.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/GcHandle.cs index 25ec876..f74c807 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/GcHandle.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/GcHandle.cs @@ -16,7 +16,6 @@ namespace System.Runtime.InteropServices // IMPORTANT: If new values are added to the enum the GCHandle::MaxHandleType // constant must be updated. [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public enum GCHandleType { Weak = 0, @@ -40,7 +39,6 @@ namespace System.Runtime.InteropServices // [StructLayout(LayoutKind.Sequential)] - [System.Runtime.InteropServices.ComVisible(true)] public struct GCHandle { // IMPORTANT: This must be kept in sync with the GCHandleType enum. diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/HandleRef.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/HandleRef.cs index d76750f..b117102 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/HandleRef.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/HandleRef.cs @@ -7,7 +7,6 @@ namespace System.Runtime.InteropServices using System; - [System.Runtime.InteropServices.ComVisible(true)] public struct HandleRef { diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomAdapter.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomAdapter.cs index 00abf7b..002c48a 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomAdapter.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomAdapter.cs @@ -15,7 +15,6 @@ namespace System.Runtime.InteropServices { using System; -[System.Runtime.InteropServices.ComVisible(true)] public interface ICustomAdapter { [return:MarshalAs(UnmanagedType.IUnknown)] Object GetUnderlyingObject(); diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomFactory.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomFactory.cs index 33d2556..8e7af10 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomFactory.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomFactory.cs @@ -8,7 +8,6 @@ namespace System.Runtime.InteropServices { using System; -[System.Runtime.InteropServices.ComVisible(true)] public interface ICustomFactory { MarshalByRefObject CreateInstance(Type serverType); diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomMarshaler.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomMarshaler.cs index 4db4acc..d9ed289 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomMarshaler.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomMarshaler.cs @@ -15,7 +15,6 @@ namespace System.Runtime.InteropServices { using System; -[System.Runtime.InteropServices.ComVisible(true)] public interface ICustomMarshaler { Object MarshalNativeToManaged( IntPtr pNativeData ); diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomQueryInterface.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomQueryInterface.cs index c7d7937..5675b1f 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomQueryInterface.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/ICustomQueryInterface.cs @@ -19,7 +19,6 @@ namespace System.Runtime.InteropServices { // The enum of the return value of IQuerable.GetInterface //==================================================================== [Serializable] - [System.Runtime.InteropServices.ComVisible(false)] public enum CustomQueryInterfaceResult { Handled = 0, @@ -30,7 +29,6 @@ namespace System.Runtime.InteropServices { //==================================================================== // The interface for customizing IQueryInterface //==================================================================== - [System.Runtime.InteropServices.ComVisible(false)] public interface ICustomQueryInterface { CustomQueryInterfaceResult GetInterface([In]ref Guid iid, out IntPtr ppv); diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/IException.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/IException.cs index 2330365..57f5683 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/IException.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/IException.cs @@ -22,7 +22,6 @@ namespace System.Runtime.InteropServices { [GuidAttribute("b36b5c63-42ef-38bc-a07e-0b34c98f164a")] [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual)] [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(true)] public interface _Exception { // diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/InvalidComObjectException.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/InvalidComObjectException.cs index ac8258b..760210b 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/InvalidComObjectException.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/InvalidComObjectException.cs @@ -16,7 +16,6 @@ namespace System.Runtime.InteropServices { using System; using System.Runtime.Serialization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class InvalidComObjectException : SystemException { public InvalidComObjectException() diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs index 60c9aa6..4ca3da5 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs @@ -15,7 +15,6 @@ namespace System.Runtime.InteropServices { using System; using System.Runtime.Serialization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class InvalidOleVariantTypeException : SystemException { public InvalidOleVariantTypeException() diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/LayoutKind.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/LayoutKind.cs index 2317798..f7def3a 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/LayoutKind.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/LayoutKind.cs @@ -7,7 +7,6 @@ namespace System.Runtime.InteropServices { using System; // Used in the StructLayoutAttribute class - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public enum LayoutKind { diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs index e83305e..7d8b20e 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs @@ -213,7 +213,6 @@ namespace System.Runtime.InteropServices //==================================================================== // SizeOf() //==================================================================== - [System.Runtime.InteropServices.ComVisible(true)] public static int SizeOf(Object structure) { if (structure == null) @@ -840,7 +839,6 @@ namespace System.Runtime.InteropServices // "fDeleteOld" is true, this routine will call DestroyStructure() first. //==================================================================== [MethodImplAttribute(MethodImplOptions.InternalCall), ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] - [System.Runtime.InteropServices.ComVisible(true)] public static extern void StructureToPtr(Object structure, IntPtr ptr, bool fDeleteOld); public static void StructureToPtr(T structure, IntPtr ptr, bool fDeleteOld) @@ -851,7 +849,6 @@ namespace System.Runtime.InteropServices //==================================================================== // Marshals data from a native memory block to a preallocated structure class. //==================================================================== - [System.Runtime.InteropServices.ComVisible(true)] public static void PtrToStructure(IntPtr ptr, Object structure) { PtrToStructureHelper(ptr, structure, false); @@ -866,7 +863,6 @@ namespace System.Runtime.InteropServices // Creates a new instance of "structuretype" and marshals data from a // native memory block to it. //==================================================================== - [System.Runtime.InteropServices.ComVisible(true)] [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable public static Object PtrToStructure(IntPtr ptr, Type structureType) { @@ -907,7 +903,6 @@ namespace System.Runtime.InteropServices // "structureclass" is used to provide layout information. //==================================================================== [MethodImplAttribute(MethodImplOptions.InternalCall)] - [System.Runtime.InteropServices.ComVisible(true)] public static extern void DestroyStructure(IntPtr ptr, Type structuretype); public static void DestroyStructure(IntPtr ptr) diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs index b916778..ec1014e 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs @@ -16,7 +16,6 @@ namespace System.Runtime.InteropServices { using System; using System.Runtime.Serialization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class MarshalDirectiveException : SystemException { public MarshalDirectiveException() diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/RuntimeEnvironment.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/RuntimeEnvironment.cs index 03c4cd7..434585b 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/RuntimeEnvironment.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/RuntimeEnvironment.cs @@ -25,7 +25,6 @@ using StackCrawlMark = System.Threading.StackCrawlMark; namespace System.Runtime.InteropServices { - [System.Runtime.InteropServices.ComVisible(true)] static public class RuntimeEnvironment { [MethodImplAttribute(MethodImplOptions.InternalCall)] diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/SEHException.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/SEHException.cs index b418d91..72b9873 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/SEHException.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/SEHException.cs @@ -17,7 +17,6 @@ namespace System.Runtime.InteropServices { using System.Runtime.Serialization; // Exception for Structured Exception Handler exceptions. // - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class SEHException : ExternalException { public SEHException() diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs index 0f4caa2..12bf7e7 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs @@ -15,7 +15,6 @@ namespace System.Runtime.InteropServices { using System; using System.Runtime.Serialization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class SafeArrayRankMismatchException : SystemException { public SafeArrayRankMismatchException() diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs index a5711c1..050772a 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs @@ -16,7 +16,6 @@ namespace System.Runtime.InteropServices { using System; using System.Runtime.Serialization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class SafeArrayTypeMismatchException : SystemException { public SafeArrayTypeMismatchException() diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/UnknownWrapper.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/UnknownWrapper.cs index 69ef2dc..1f70108 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/UnknownWrapper.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/UnknownWrapper.cs @@ -16,7 +16,6 @@ namespace System.Runtime.InteropServices { using System; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class UnknownWrapper { public UnknownWrapper(Object obj) diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ManagedActivationFactory.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ManagedActivationFactory.cs index 2d08cab..2fefa3f 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ManagedActivationFactory.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ManagedActivationFactory.cs @@ -27,7 +27,6 @@ namespace System.Runtime.InteropServices.WindowsRuntime // // In order to be activatable via the ManagedActivationFactory type, the type must be decorated with either // ActivatableAttribute, or StaticAttribute. - [ComVisible(true)] [ClassInterface(ClassInterfaceType.None)] internal sealed class ManagedActivationFactory : IActivationFactory, IManagedActivationFactory { diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeMetadata.cs b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeMetadata.cs index ce1bd46..f097c6a 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeMetadata.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeMetadata.cs @@ -58,7 +58,6 @@ namespace System.Runtime.InteropServices.WindowsRuntime } #if FEATURE_REFLECTION_ONLY_LOAD - [ComVisible(false)] public class NamespaceResolveEventArgs : EventArgs { private string _NamespaceName; @@ -98,7 +97,6 @@ namespace System.Runtime.InteropServices.WindowsRuntime } #endif //FEATURE_REFLECTION_ONLY - [ComVisible(false)] internal class DesignerNamespaceResolveEventArgs : EventArgs { private string _NamespaceName; diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/Reliability/CriticalFinalizerObject.cs b/src/coreclr/src/mscorlib/src/System/Runtime/Reliability/CriticalFinalizerObject.cs index eb5a186..032f0d8 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/Reliability/CriticalFinalizerObject.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/Reliability/CriticalFinalizerObject.cs @@ -22,7 +22,6 @@ using System.Runtime.InteropServices; namespace System.Runtime.ConstrainedExecution { - [System.Runtime.InteropServices.ComVisible(true)] public abstract class CriticalFinalizerObject { [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/Remoting/ObjectHandle.cs b/src/coreclr/src/mscorlib/src/System/Runtime/Remoting/ObjectHandle.cs index 0298d01..e03befe 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/Remoting/ObjectHandle.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/Remoting/ObjectHandle.cs @@ -20,7 +20,6 @@ namespace System.Runtime.Remoting using System.Runtime.InteropServices; [ClassInterface(ClassInterfaceType.AutoDual)] - [System.Runtime.InteropServices.ComVisible(true)] public class ObjectHandle { private Object WrappedObject; diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/FormatterConverter.cs b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/FormatterConverter.cs index 03638ab..27f7ecf 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/FormatterConverter.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/FormatterConverter.cs @@ -17,7 +17,6 @@ namespace System.Runtime.Serialization { using System.Globalization; using System.Diagnostics.Contracts; -[System.Runtime.InteropServices.ComVisible(true)] internal class FormatterConverter : IFormatterConverter { public FormatterConverter() { diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs index 191ca00..a9425f7 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs @@ -29,7 +29,6 @@ namespace System.Runtime.Serialization { using System.Diagnostics; using System.Diagnostics.Contracts; - [System.Runtime.InteropServices.ComVisible(true)] public static class FormatterServices { // Gets a new instance of the object. The entire object is initalized to 0 and no diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/IDeserializationCallback.cs b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/IDeserializationCallback.cs index e2497e5..2911a40 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/IDeserializationCallback.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/IDeserializationCallback.cs @@ -16,7 +16,6 @@ namespace System.Runtime.Serialization { using System; // Interface does not need to be marked with the serializable attribute - [System.Runtime.InteropServices.ComVisible(true)] public interface IDeserializationCallback { void OnDeserialization(Object sender); } diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/IFormatterConverter.cs b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/IFormatterConverter.cs index 182cc93..0be0db9 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/IFormatterConverter.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/IFormatterConverter.cs @@ -17,7 +17,6 @@ namespace System.Runtime.Serialization { using System; [CLSCompliant(false)] -[System.Runtime.InteropServices.ComVisible(true)] public interface IFormatterConverter { Object Convert(Object value, Type type); Object Convert(Object value, TypeCode typeCode); diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/IObjectReference.cs b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/IObjectReference.cs index 42662a1..c863747 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/IObjectReference.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/IObjectReference.cs @@ -20,7 +20,6 @@ namespace System.Runtime.Serialization { using System; using System.Security.Permissions; // Interface does not need to be marked with the serializable attribute -[System.Runtime.InteropServices.ComVisible(true)] public interface IObjectReference { Object GetRealObject(StreamingContext context); } diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/ISerializable.cs b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/ISerializable.cs index fc283d4..9791b4e 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/ISerializable.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/ISerializable.cs @@ -20,7 +20,6 @@ namespace System.Runtime.Serialization { using System; using System.Reflection; - [System.Runtime.InteropServices.ComVisible(true)] public interface ISerializable { void GetObjectData(SerializationInfo info, StreamingContext context); } diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationAttributes.cs b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationAttributes.cs index 27c5751..38abffa 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationAttributes.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationAttributes.cs @@ -17,7 +17,6 @@ namespace System.Runtime.Serialization using System.Reflection; [AttributeUsage(AttributeTargets.Field, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class OptionalFieldAttribute : Attribute { int versionAdded = 1; @@ -38,25 +37,21 @@ namespace System.Runtime.Serialization } [AttributeUsage(AttributeTargets.Method, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class OnSerializingAttribute : Attribute { } [AttributeUsage(AttributeTargets.Method, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class OnSerializedAttribute : Attribute { } [AttributeUsage(AttributeTargets.Method, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class OnDeserializingAttribute : Attribute { } [AttributeUsage(AttributeTargets.Method, Inherited=false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class OnDeserializedAttribute : Attribute { } diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationException.cs b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationException.cs index b88ccfd..e9cb79b 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationException.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationException.cs @@ -17,7 +17,6 @@ namespace System.Runtime.Serialization { using System; using System.Runtime.Serialization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class SerializationException : SystemException { diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationInfo.cs b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationInfo.cs index 567ad9c..45521f2 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationInfo.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationInfo.cs @@ -24,7 +24,6 @@ namespace System.Runtime.Serialization using System.Security; using System.Runtime.CompilerServices; - [System.Runtime.InteropServices.ComVisible(true)] public sealed class SerializationInfo { private const int defaultSize = 4; @@ -428,7 +427,6 @@ namespace System.Runtime.Serialization return m_data[index]; } - [System.Runtime.InteropServices.ComVisible(true)] private Object GetElementNoThrow(String name, out Type foundType) { int index = FindElement(name); @@ -479,7 +477,6 @@ namespace System.Runtime.Serialization return m_converter.Convert(value, type); } - [System.Runtime.InteropServices.ComVisible(true)] internal Object GetValueNoThrow(String name, Type type) { Type foundType; diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationInfoEnumerator.cs b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationInfoEnumerator.cs index 32c6549..0858dfc 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationInfoEnumerator.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/SerializationInfoEnumerator.cs @@ -21,7 +21,6 @@ namespace System.Runtime.Serialization { // // The tuple returned by SerializationInfoEnumerator.Current. // -[System.Runtime.InteropServices.ComVisible(true)] public struct SerializationEntry { private Type m_type; private Object m_value; @@ -57,7 +56,6 @@ namespace System.Runtime.Serialization { // This does not snapshot the values, it just keeps pointers to the // member variables of the SerializationInfo that created it. // -[System.Runtime.InteropServices.ComVisible(true)] public sealed class SerializationInfoEnumerator : IEnumerator { String[] m_members; Object[] m_data; diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/StreamingContext.cs b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/StreamingContext.cs index ef4a096..c01a3ed 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/StreamingContext.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/Serialization/StreamingContext.cs @@ -16,7 +16,6 @@ namespace System.Runtime.Serialization { using System.Runtime.Remoting; using System; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public struct StreamingContext { internal Object m_additionalContext; internal StreamingContextStates m_state; @@ -59,7 +58,6 @@ namespace System.Runtime.Serialization { // ********************************************************** [Serializable] [Flags] -[System.Runtime.InteropServices.ComVisible(true)] public enum StreamingContextStates { CrossProcess=0x01, CrossMachine=0x02, diff --git a/src/coreclr/src/mscorlib/src/System/RuntimeArgumentHandle.cs b/src/coreclr/src/mscorlib/src/System/RuntimeArgumentHandle.cs index d1bc86b..3e13614 100644 --- a/src/coreclr/src/mscorlib/src/System/RuntimeArgumentHandle.cs +++ b/src/coreclr/src/mscorlib/src/System/RuntimeArgumentHandle.cs @@ -13,7 +13,6 @@ namespace System { // This corresponds to EE VARARGS cookie. // Cannot be serialized - [System.Runtime.InteropServices.ComVisible(true)] public struct RuntimeArgumentHandle { private IntPtr m_ptr; diff --git a/src/coreclr/src/mscorlib/src/System/RuntimeHandles.cs b/src/coreclr/src/mscorlib/src/System/RuntimeHandles.cs index 0811ea1..7320ae0 100644 --- a/src/coreclr/src/mscorlib/src/System/RuntimeHandles.cs +++ b/src/coreclr/src/mscorlib/src/System/RuntimeHandles.cs @@ -25,7 +25,6 @@ namespace System using StackCrawlMark = System.Threading.StackCrawlMark; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public unsafe struct RuntimeTypeHandle : ISerializable { // Returns handle for interop with EE. The handle is guaranteed to be non-null. @@ -772,7 +771,6 @@ namespace System } [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public unsafe struct RuntimeMethodHandle : ISerializable { // Returns handle for interop with EE. The handle is guaranteed to be non-null. @@ -1165,7 +1163,6 @@ namespace System } [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public unsafe struct RuntimeFieldHandle : ISerializable { // Returns handle for interop with EE. The handle is guaranteed to be non-null. @@ -1347,7 +1344,6 @@ namespace System } } -[System.Runtime.InteropServices.ComVisible(true)] public unsafe struct ModuleHandle { // Returns handle for interop with EE. The handle is guaranteed to be non-null. diff --git a/src/coreclr/src/mscorlib/src/System/SByte.cs b/src/coreclr/src/mscorlib/src/System/SByte.cs index da6ac5c..e738dfc 100644 --- a/src/coreclr/src/mscorlib/src/System/SByte.cs +++ b/src/coreclr/src/mscorlib/src/System/SByte.cs @@ -19,7 +19,6 @@ namespace System { // A place holder class for signed bytes. [Serializable] [CLSCompliant(false), System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)] -[System.Runtime.InteropServices.ComVisible(true)] public struct SByte : IComparable, IFormattable, IConvertible , IComparable, IEquatable { diff --git a/src/coreclr/src/mscorlib/src/System/Security/Attributes.cs b/src/coreclr/src/mscorlib/src/System/Security/Attributes.cs index e4ebc53..f67a9f0 100644 --- a/src/coreclr/src/mscorlib/src/System/Security/Attributes.cs +++ b/src/coreclr/src/mscorlib/src/System/Security/Attributes.cs @@ -19,7 +19,6 @@ namespace System.Security // Indicates that the target P/Invoke method(s) should skip the per-call // security checked for unmanaged code permission. [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = true, Inherited = false )] - [System.Runtime.InteropServices.ComVisible(true)] sealed public class SuppressUnmanagedCodeSecurityAttribute : System.Attribute { } @@ -27,7 +26,6 @@ namespace System.Security // UnverifiableCodeAttribute: // Indicates that the target module contains unverifiable code. [AttributeUsage(AttributeTargets.Module, AllowMultiple = true, Inherited = false )] -[System.Runtime.InteropServices.ComVisible(true)] sealed public class UnverifiableCodeAttribute : System.Attribute { } @@ -38,7 +36,6 @@ namespace System.Security // For v.1, this is valid only on Assemblies, but could be expanded to // include Module, Method, class [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false )] - [System.Runtime.InteropServices.ComVisible(true)] sealed public class AllowPartiallyTrustedCallersAttribute : System.Attribute { private PartialTrustVisibilityLevel _visibilityLevel; diff --git a/src/coreclr/src/mscorlib/src/System/Security/SecurityException.cs b/src/coreclr/src/mscorlib/src/System/Security/SecurityException.cs index 09264b1..57ac999 100644 --- a/src/coreclr/src/mscorlib/src/System/Security/SecurityException.cs +++ b/src/coreclr/src/mscorlib/src/System/Security/SecurityException.cs @@ -26,7 +26,6 @@ namespace System.Security using System.Globalization; using System.Diagnostics.Contracts; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class SecurityException : SystemException { diff --git a/src/coreclr/src/mscorlib/src/System/Security/VerificationException.cs b/src/coreclr/src/mscorlib/src/System/Security/VerificationException.cs index b0823ca..5defbd6 100644 --- a/src/coreclr/src/mscorlib/src/System/Security/VerificationException.cs +++ b/src/coreclr/src/mscorlib/src/System/Security/VerificationException.cs @@ -9,7 +9,6 @@ namespace System.Security { using System; using System.Runtime.Serialization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class VerificationException : SystemException { public VerificationException() diff --git a/src/coreclr/src/mscorlib/src/System/SerializableAttribute.cs b/src/coreclr/src/mscorlib/src/System/SerializableAttribute.cs index bceca68..1c99654 100644 --- a/src/coreclr/src/mscorlib/src/System/SerializableAttribute.cs +++ b/src/coreclr/src/mscorlib/src/System/SerializableAttribute.cs @@ -16,7 +16,6 @@ namespace System { using System.Reflection; [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Delegate, Inherited = false)] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class SerializableAttribute : Attribute { internal static Attribute GetCustomAttribute(RuntimeType type) diff --git a/src/coreclr/src/mscorlib/src/System/Single.cs b/src/coreclr/src/mscorlib/src/System/Single.cs index 481c088..c24e29d 100644 --- a/src/coreclr/src/mscorlib/src/System/Single.cs +++ b/src/coreclr/src/mscorlib/src/System/Single.cs @@ -21,7 +21,6 @@ namespace System { [Serializable] [System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)] -[System.Runtime.InteropServices.ComVisible(true)] public struct Single : IComparable, IFormattable, IConvertible , IComparable, IEquatable { diff --git a/src/coreclr/src/mscorlib/src/System/String.Comparison.cs b/src/coreclr/src/mscorlib/src/System/String.Comparison.cs index 07f2f9d..287e06c 100644 --- a/src/coreclr/src/mscorlib/src/System/String.Comparison.cs +++ b/src/coreclr/src/mscorlib/src/System/String.Comparison.cs @@ -716,7 +716,6 @@ namespace System } [Pure] - [ComVisible(false)] public Boolean EndsWith(String value, StringComparison comparisonType) { if( (Object)value == null) { throw new ArgumentNullException(nameof(value)); @@ -1069,7 +1068,6 @@ namespace System } [Pure] - [ComVisible(false)] public Boolean StartsWith(String value, StringComparison comparisonType) { if( (Object)value == null) { throw new ArgumentNullException(nameof(value)); diff --git a/src/coreclr/src/mscorlib/src/System/String.Manipulation.cs b/src/coreclr/src/mscorlib/src/System/String.Manipulation.cs index 12b28f0..e06141d 100644 --- a/src/coreclr/src/mscorlib/src/System/String.Manipulation.cs +++ b/src/coreclr/src/mscorlib/src/System/String.Manipulation.cs @@ -172,7 +172,6 @@ namespace System return result; } - [ComVisible(false)] public static string Concat(IEnumerable values) { if (values == null) @@ -223,7 +222,6 @@ namespace System } - [ComVisible(false)] public static string Concat(IEnumerable values) { if (values == null) @@ -571,7 +569,6 @@ namespace System return Join(separator, value, 0, value.Length); } - [ComVisible(false)] public unsafe static string Join(string separator, params object[] values) { separator = separator ?? string.Empty; @@ -582,7 +579,6 @@ namespace System } } - [ComVisible(false)] public unsafe static string Join(string separator, IEnumerable values) { separator = separator ?? string.Empty; @@ -593,7 +589,6 @@ namespace System } } - [ComVisible(false)] public static string Join(string separator, IEnumerable values) { if (values == null) @@ -1039,13 +1034,11 @@ namespace System return ReplaceInternal(oldValue, newValue); } - [ComVisible(false)] public unsafe String[] Split(char separator, StringSplitOptions options = StringSplitOptions.None) { Contract.Ensures(Contract.Result() != null); return SplitInternal(&separator, 1, int.MaxValue, options); } - [ComVisible(false)] public unsafe String[] Split(char separator, int count, StringSplitOptions options = StringSplitOptions.None) { Contract.Ensures(Contract.Result() != null); return SplitInternal(&separator, 1, count, options); @@ -1081,13 +1074,11 @@ namespace System return SplitInternal(separator, count, StringSplitOptions.None); } - [ComVisible(false)] public String[] Split(char[] separator, StringSplitOptions options) { Contract.Ensures(Contract.Result() != null); return SplitInternal(separator, Int32.MaxValue, options); } - [ComVisible(false)] public String[] Split(char[] separator, int count, StringSplitOptions options) { Contract.Ensures(Contract.Result() != null); @@ -1144,25 +1135,21 @@ namespace System } } - [ComVisible(false)] public String[] Split(String separator, StringSplitOptions options = StringSplitOptions.None) { Contract.Ensures(Contract.Result() != null); return SplitInternal(separator ?? String.Empty, null, Int32.MaxValue, options); } - [ComVisible(false)] public String[] Split(String separator, Int32 count, StringSplitOptions options = StringSplitOptions.None) { Contract.Ensures(Contract.Result() != null); return SplitInternal(separator ?? String.Empty, null, count, options); } - [ComVisible(false)] public String [] Split(String[] separator, StringSplitOptions options) { Contract.Ensures(Contract.Result() != null); return SplitInternal(null, separator, Int32.MaxValue, options); } - [ComVisible(false)] public String[] Split(String[] separator, Int32 count, StringSplitOptions options) { Contract.Ensures(Contract.Result() != null); return SplitInternal(null, separator, count, options); diff --git a/src/coreclr/src/mscorlib/src/System/String.cs b/src/coreclr/src/mscorlib/src/System/String.cs index 5a8e167..203ca8b 100644 --- a/src/coreclr/src/mscorlib/src/System/String.cs +++ b/src/coreclr/src/mscorlib/src/System/String.cs @@ -37,7 +37,6 @@ namespace System { // implemented as a part of String. As with arrays, character positions // (indices) are zero-based. - [ComVisible(true)] [Serializable] public sealed partial class String : IComparable, ICloneable, IConvertible, IEnumerable , IComparable, IEnumerable, IEquatable diff --git a/src/coreclr/src/mscorlib/src/System/StringComparer.cs b/src/coreclr/src/mscorlib/src/System/StringComparer.cs index c8cd75e..cf65c48 100644 --- a/src/coreclr/src/mscorlib/src/System/StringComparer.cs +++ b/src/coreclr/src/mscorlib/src/System/StringComparer.cs @@ -13,7 +13,6 @@ namespace System { [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public abstract class StringComparer : IComparer, IEqualityComparer, IComparer, IEqualityComparer{ private static readonly StringComparer _invariantCulture = new CultureAwareComparer(CultureInfo.InvariantCulture, false); private static readonly StringComparer _invariantCultureIgnoreCase = new CultureAwareComparer(CultureInfo.InvariantCulture, true); diff --git a/src/coreclr/src/mscorlib/src/System/Text/ASCIIEncoding.cs b/src/coreclr/src/mscorlib/src/System/Text/ASCIIEncoding.cs index fc7589f..9226bb2 100644 --- a/src/coreclr/src/mscorlib/src/System/Text/ASCIIEncoding.cs +++ b/src/coreclr/src/mscorlib/src/System/Text/ASCIIEncoding.cs @@ -22,7 +22,6 @@ namespace System.Text // [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public class ASCIIEncoding : Encoding { // Used by Encoding.ASCII for lazy initialization @@ -72,7 +71,6 @@ namespace System.Text } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public override unsafe int GetByteCount(char* chars, int count) { return EncodingForwarder.GetByteCount(this, chars, count); @@ -100,7 +98,6 @@ namespace System.Text } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public override unsafe int GetBytes(char* chars, int charCount, byte* bytes, int byteCount) { return EncodingForwarder.GetBytes(this, chars, charCount, bytes, byteCount); @@ -115,7 +112,6 @@ namespace System.Text } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public override unsafe int GetCharCount(byte* bytes, int count) { return EncodingForwarder.GetCharCount(this, bytes, count); @@ -128,7 +124,6 @@ namespace System.Text } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public unsafe override int GetChars(byte* bytes, int byteCount, char* chars, int charCount) { return EncodingForwarder.GetChars(this, bytes, byteCount, chars, charCount); @@ -741,7 +736,6 @@ namespace System.Text // True if and only if the encoding only uses single byte code points. (Ie, ASCII, 1252, etc) - [System.Runtime.InteropServices.ComVisible(false)] public override bool IsSingleByte { get @@ -750,14 +744,12 @@ namespace System.Text } } - [System.Runtime.InteropServices.ComVisible(false)] public override Decoder GetDecoder() { return new DecoderNLS(this); } - [System.Runtime.InteropServices.ComVisible(false)] public override Encoder GetEncoder() { return new EncoderNLS(this); diff --git a/src/coreclr/src/mscorlib/src/System/Text/Decoder.cs b/src/coreclr/src/mscorlib/src/System/Text/Decoder.cs index 0ebbacd..a9fea82 100644 --- a/src/coreclr/src/mscorlib/src/System/Text/Decoder.cs +++ b/src/coreclr/src/mscorlib/src/System/Text/Decoder.cs @@ -20,7 +20,6 @@ namespace System.Text // class are typically obtained through calls to the GetDecoder method // of Encoding objects. // - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public abstract class Decoder { @@ -39,7 +38,6 @@ namespace System.Text // We don't call default reset because default reset probably isn't good if we aren't initialized. } - [System.Runtime.InteropServices.ComVisible(false)] public DecoderFallback Fallback { get @@ -65,7 +63,6 @@ namespace System.Text // Note: we don't test for threading here because async access to Encoders and Decoders // doesn't work anyway. - [System.Runtime.InteropServices.ComVisible(false)] public DecoderFallbackBuffer FallbackBuffer { get @@ -99,7 +96,6 @@ namespace System.Text // // Virtual implimentation has to call GetChars with flush and a big enough buffer to clear a 0 byte string // We avoid GetMaxCharCount() because a) we can't call the base encoder and b) it might be really big. - [System.Runtime.InteropServices.ComVisible(false)] public virtual void Reset() { byte[] byteTemp = Array.Empty(); @@ -117,7 +113,6 @@ namespace System.Text // public abstract int GetCharCount(byte[] bytes, int index, int count); - [System.Runtime.InteropServices.ComVisible(false)] public virtual int GetCharCount(byte[] bytes, int index, int count, bool flush) { return GetCharCount(bytes, index, count); @@ -126,7 +121,6 @@ namespace System.Text // We expect this to be the workhorse for NLS Encodings, but for existing // ones we need a working (if slow) default implimentation) [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public virtual unsafe int GetCharCount(byte* bytes, int count, bool flush) { // Validate input parameters @@ -190,7 +184,6 @@ namespace System.Text // could easily overflow our output buffer. Therefore we do an extra test // when we copy the buffer so that we don't overflow charCount either. [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public virtual unsafe int GetChars(byte* bytes, int byteCount, char* chars, int charCount, bool flush) { @@ -248,7 +241,6 @@ namespace System.Text // Note that if all of the input bytes are not consumed, then we'll do a /2, which means // that its likely that we didn't consume as many bytes as we could have. For some // applications this could be slow. (Like trying to exactly fill an output buffer from a bigger stream) - [System.Runtime.InteropServices.ComVisible(false)] public virtual void Convert(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed) @@ -306,7 +298,6 @@ namespace System.Text // that its likely that we didn't consume as many bytes as we could have. For some // applications this could be slow. (Like trying to exactly fill an output buffer from a bigger stream) [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public virtual unsafe void Convert(byte* bytes, int byteCount, char* chars, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed) diff --git a/src/coreclr/src/mscorlib/src/System/Text/Encoder.cs b/src/coreclr/src/mscorlib/src/System/Text/Encoder.cs index b9d4581..f766f98 100644 --- a/src/coreclr/src/mscorlib/src/System/Text/Encoder.cs +++ b/src/coreclr/src/mscorlib/src/System/Text/Encoder.cs @@ -20,7 +20,6 @@ namespace System.Text // class are typically obtained through calls to the GetEncoder method // of Encoding objects. // - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public abstract class Encoder { @@ -39,7 +38,6 @@ namespace System.Text // We don't call default reset because default reset probably isn't good if we aren't initialized. } - [System.Runtime.InteropServices.ComVisible(false)] public EncoderFallback Fallback { get @@ -65,7 +63,6 @@ namespace System.Text // Note: we don't test for threading here because async access to Encoders and Decoders // doesn't work anyway. - [System.Runtime.InteropServices.ComVisible(false)] public EncoderFallbackBuffer FallbackBuffer { get @@ -99,7 +96,6 @@ namespace System.Text // // Virtual implimentation has to call GetBytes with flush and a big enough buffer to clear a 0 char string // We avoid GetMaxByteCount() because a) we can't call the base encoder and b) it might be really big. - [System.Runtime.InteropServices.ComVisible(false)] public virtual void Reset() { char[] charTemp = {}; @@ -122,7 +118,6 @@ namespace System.Text // unfortunately for existing overrides, it has to call the [] version, // which is really slow, so avoid this method if you might be calling external encodings. [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public virtual unsafe int GetByteCount(char* chars, int count, bool flush) { // Validate input parameters @@ -183,7 +178,6 @@ namespace System.Text // could easily overflow our output buffer. Therefore we do an extra test // when we copy the buffer so that we don't overflow byteCount either. [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public virtual unsafe int GetBytes(char* chars, int charCount, byte* bytes, int byteCount, bool flush) { @@ -240,7 +234,6 @@ namespace System.Text // Note that if all of the input chars are not consumed, then we'll do a /2, which means // that its likely that we didn't consume as many chars as we could have. For some // applications this could be slow. (Like trying to exactly fill an output buffer from a bigger stream) - [System.Runtime.InteropServices.ComVisible(false)] public virtual void Convert(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex, int byteCount, bool flush, out int charsUsed, out int bytesUsed, out bool completed) @@ -299,7 +292,6 @@ namespace System.Text // that its likely that we didn't consume as many chars as we could have. For some // applications this could be slow. (Like trying to exactly fill an output buffer from a bigger stream) [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public virtual unsafe void Convert(char* chars, int charCount, byte* bytes, int byteCount, bool flush, out int charsUsed, out int bytesUsed, out bool completed) diff --git a/src/coreclr/src/mscorlib/src/System/Text/Encoding.cs b/src/coreclr/src/mscorlib/src/System/Text/Encoding.cs index aa273e2..fdc093a 100644 --- a/src/coreclr/src/mscorlib/src/System/Text/Encoding.cs +++ b/src/coreclr/src/mscorlib/src/System/Text/Encoding.cs @@ -83,7 +83,6 @@ namespace System.Text // generally executes faster. // - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public abstract class Encoding : ICloneable { @@ -627,7 +626,6 @@ namespace System.Text // True if and only if the encoding only uses single byte code points. (Ie, ASCII, 1252, etc) - [System.Runtime.InteropServices.ComVisible(false)] public virtual bool IsSingleByte { get @@ -637,7 +635,6 @@ namespace System.Text } - [System.Runtime.InteropServices.ComVisible(false)] public EncoderFallback EncoderFallback { get @@ -659,7 +656,6 @@ namespace System.Text } - [System.Runtime.InteropServices.ComVisible(false)] public DecoderFallback DecoderFallback { get @@ -681,7 +677,6 @@ namespace System.Text } - [System.Runtime.InteropServices.ComVisible(false)] public virtual Object Clone() { Encoding newEncoding = (Encoding)this.MemberwiseClone(); @@ -692,7 +687,6 @@ namespace System.Text } - [System.Runtime.InteropServices.ComVisible(false)] public bool IsReadOnly { get @@ -781,7 +775,6 @@ namespace System.Text // a 3rd party encoding. [Pure] [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public virtual unsafe int GetByteCount(char* chars, int count) { // Validate input parameters @@ -943,7 +936,6 @@ namespace System.Text // when we copy the buffer so that we don't overflow byteCount either. [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public virtual unsafe int GetBytes(char* chars, int charCount, byte* bytes, int byteCount) { @@ -1012,7 +1004,6 @@ namespace System.Text // ones we need a working (if slow) default implimentation) [Pure] [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public virtual unsafe int GetCharCount(byte* bytes, int count) { // Validate input parameters @@ -1099,7 +1090,6 @@ namespace System.Text // when we copy the buffer so that we don't overflow charCount either. [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public virtual unsafe int GetChars(byte* bytes, int byteCount, char* chars, int charCount) { @@ -1154,7 +1144,6 @@ namespace System.Text [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public unsafe string GetString(byte* bytes, int byteCount) { if (bytes == null) @@ -1183,14 +1172,12 @@ namespace System.Text // IsAlwaysNormalized // Returns true if the encoding is always normalized for the specified encoding form [Pure] - [System.Runtime.InteropServices.ComVisible(false)] public bool IsAlwaysNormalized() { return this.IsAlwaysNormalized(NormalizationForm.FormC); } [Pure] - [System.Runtime.InteropServices.ComVisible(false)] public virtual bool IsAlwaysNormalized(NormalizationForm form) { // Assume false unless the encoding knows otherwise diff --git a/src/coreclr/src/mscorlib/src/System/Text/EncodingNLS.cs b/src/coreclr/src/mscorlib/src/System/Text/EncodingNLS.cs index fbddf37..cb6ed8a 100644 --- a/src/coreclr/src/mscorlib/src/System/Text/EncodingNLS.cs +++ b/src/coreclr/src/mscorlib/src/System/Text/EncodingNLS.cs @@ -15,7 +15,6 @@ namespace System.Text // This class overrides Encoding with the things we need for our NLS Encodings - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] internal abstract class EncodingNLS : Encoding { diff --git a/src/coreclr/src/mscorlib/src/System/Text/EncodingProvider.cs b/src/coreclr/src/mscorlib/src/System/Text/EncodingProvider.cs index a7f745a..734d1ac 100644 --- a/src/coreclr/src/mscorlib/src/System/Text/EncodingProvider.cs +++ b/src/coreclr/src/mscorlib/src/System/Text/EncodingProvider.cs @@ -8,7 +8,6 @@ namespace System.Text using System.Collections; using System.Collections.Generic; - [System.Runtime.InteropServices.ComVisible(true)] public abstract class EncodingProvider { public EncodingProvider() { } diff --git a/src/coreclr/src/mscorlib/src/System/Text/Normalization.cs b/src/coreclr/src/mscorlib/src/System/Text/Normalization.cs index 4ed921f..c81149d 100644 --- a/src/coreclr/src/mscorlib/src/System/Text/Normalization.cs +++ b/src/coreclr/src/mscorlib/src/System/Text/Normalization.cs @@ -5,7 +5,6 @@ namespace System.Text { // This is the enumeration for Normalization Forms -[System.Runtime.InteropServices.ComVisible(true)] public enum NormalizationForm { FormC = 1, diff --git a/src/coreclr/src/mscorlib/src/System/Text/StringBuilder.cs b/src/coreclr/src/mscorlib/src/System/Text/StringBuilder.cs index 9d221ce..72247c3 100644 --- a/src/coreclr/src/mscorlib/src/System/Text/StringBuilder.cs +++ b/src/coreclr/src/mscorlib/src/System/Text/StringBuilder.cs @@ -41,7 +41,6 @@ namespace System.Text { // Console.WriteLine(sb1); // Console.WriteLine(sb2); // - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public sealed class StringBuilder : ISerializable { @@ -715,20 +714,17 @@ namespace System.Text { } } - [System.Runtime.InteropServices.ComVisible(false)] public StringBuilder AppendLine() { Contract.Ensures(Contract.Result() != null); return Append(Environment.NewLine); } - [System.Runtime.InteropServices.ComVisible(false)] public StringBuilder AppendLine(string value) { Contract.Ensures(Contract.Result() != null); Append(value); return Append(Environment.NewLine); } - [System.Runtime.InteropServices.ComVisible(false)] public void CopyTo(int sourceIndex, char[] destination, int destinationIndex, int count) { if (destination == null) { throw new ArgumentNullException(nameof(destination)); diff --git a/src/coreclr/src/mscorlib/src/System/Text/UTF7Encoding.cs b/src/coreclr/src/mscorlib/src/System/Text/UTF7Encoding.cs index 624ca73..0626625 100644 --- a/src/coreclr/src/mscorlib/src/System/Text/UTF7Encoding.cs +++ b/src/coreclr/src/mscorlib/src/System/Text/UTF7Encoding.cs @@ -16,7 +16,6 @@ namespace System.Text [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class UTF7Encoding : Encoding { private const String base64Chars = @@ -127,7 +126,6 @@ namespace System.Text - [System.Runtime.InteropServices.ComVisible(false)] public override bool Equals(Object value) { UTF7Encoding that = value as UTF7Encoding; @@ -142,7 +140,6 @@ namespace System.Text // Compared to all the other encodings, variations of UTF7 are unlikely - [System.Runtime.InteropServices.ComVisible(false)] public override int GetHashCode() { return this.CodePage + this.EncoderFallback.GetHashCode() + this.DecoderFallback.GetHashCode(); @@ -170,20 +167,17 @@ namespace System.Text return EncodingForwarder.GetByteCount(this, chars, index, count); } - [System.Runtime.InteropServices.ComVisible(false)] public override int GetByteCount(String s) { return EncodingForwarder.GetByteCount(this, s); } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public override unsafe int GetByteCount(char* chars, int count) { return EncodingForwarder.GetByteCount(this, chars, count); } - [System.Runtime.InteropServices.ComVisible(false)] public override int GetBytes(String s, int charIndex, int charCount, byte[] bytes, int byteIndex) { @@ -206,7 +200,6 @@ namespace System.Text } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public override unsafe int GetBytes(char* chars, int charCount, byte* bytes, int byteCount) { return EncodingForwarder.GetBytes(this, chars, charCount, bytes, byteCount); @@ -221,7 +214,6 @@ namespace System.Text } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public override unsafe int GetCharCount(byte* bytes, int count) { return EncodingForwarder.GetCharCount(this, bytes, count); @@ -234,7 +226,6 @@ namespace System.Text } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public unsafe override int GetChars(byte* bytes, int byteCount, char* chars, int charCount) { return EncodingForwarder.GetChars(this, bytes, byteCount, chars, charCount); @@ -243,7 +234,6 @@ namespace System.Text // Returns a string containing the decoded representation of a range of // bytes in a byte array. - [System.Runtime.InteropServices.ComVisible(false)] public override String GetString(byte[] bytes, int index, int count) { return EncodingForwarder.GetString(this, bytes, index, count); diff --git a/src/coreclr/src/mscorlib/src/System/Text/UTF8Encoding.cs b/src/coreclr/src/mscorlib/src/System/Text/UTF8Encoding.cs index ba19649..58ab4f7 100644 --- a/src/coreclr/src/mscorlib/src/System/Text/UTF8Encoding.cs +++ b/src/coreclr/src/mscorlib/src/System/Text/UTF8Encoding.cs @@ -37,7 +37,6 @@ namespace System.Text // switch the byte orderings. [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public class UTF8Encoding : Encoding { /* @@ -131,7 +130,6 @@ namespace System.Text } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public override unsafe int GetByteCount(char* chars, int count) { return EncodingForwarder.GetByteCount(this, chars, count); @@ -159,7 +157,6 @@ namespace System.Text } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public override unsafe int GetBytes(char* chars, int charCount, byte* bytes, int byteCount) { return EncodingForwarder.GetBytes(this, chars, charCount, bytes, byteCount); @@ -174,7 +171,6 @@ namespace System.Text } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public override unsafe int GetCharCount(byte* bytes, int count) { return EncodingForwarder.GetCharCount(this, bytes, count); @@ -187,7 +183,6 @@ namespace System.Text } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public unsafe override int GetChars(byte* bytes, int byteCount, char* chars, int charCount) { return EncodingForwarder.GetChars(this, bytes, byteCount, chars, charCount); @@ -196,7 +191,6 @@ namespace System.Text // Returns a string containing the decoded representation of a range of // bytes in a byte array. - [System.Runtime.InteropServices.ComVisible(false)] public override String GetString(byte[] bytes, int index, int count) { return EncodingForwarder.GetString(this, bytes, index, count); diff --git a/src/coreclr/src/mscorlib/src/System/Text/UnicodeEncoding.cs b/src/coreclr/src/mscorlib/src/System/Text/UnicodeEncoding.cs index 25255c3..3b95ab3 100644 --- a/src/coreclr/src/mscorlib/src/System/Text/UnicodeEncoding.cs +++ b/src/coreclr/src/mscorlib/src/System/Text/UnicodeEncoding.cs @@ -17,7 +17,6 @@ namespace System.Text [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class UnicodeEncoding : Encoding { // Used by Encoding.BigEndianUnicode/Unicode for lazy initialization @@ -111,7 +110,6 @@ namespace System.Text } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public override unsafe int GetByteCount(char* chars, int count) { return EncodingForwarder.GetByteCount(this, chars, count); @@ -139,7 +137,6 @@ namespace System.Text } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public override unsafe int GetBytes(char* chars, int charCount, byte* bytes, int byteCount) { return EncodingForwarder.GetBytes(this, chars, charCount, bytes, byteCount); @@ -154,7 +151,6 @@ namespace System.Text } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public override unsafe int GetCharCount(byte* bytes, int count) { return EncodingForwarder.GetCharCount(this, bytes, count); @@ -167,7 +163,6 @@ namespace System.Text } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(false)] public unsafe override int GetChars(byte* bytes, int byteCount, char* chars, int charCount) { return EncodingForwarder.GetChars(this, bytes, byteCount, chars, charCount); @@ -176,7 +171,6 @@ namespace System.Text // Returns a string containing the decoded representation of a range of // bytes in a byte array. - [System.Runtime.InteropServices.ComVisible(false)] public override String GetString(byte[] bytes, int index, int count) { return EncodingForwarder.GetString(this, bytes, index, count); @@ -1659,7 +1653,6 @@ namespace System.Text } - [System.Runtime.InteropServices.ComVisible(false)] public override System.Text.Encoder GetEncoder() { return new EncoderNLS(this); diff --git a/src/coreclr/src/mscorlib/src/System/Threading/ApartmentState.cs b/src/coreclr/src/mscorlib/src/System/Threading/ApartmentState.cs index 844f85e..1edf0af 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/ApartmentState.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/ApartmentState.cs @@ -15,7 +15,6 @@ namespace System.Threading { [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum ApartmentState { /*========================================================================= diff --git a/src/coreclr/src/mscorlib/src/System/Threading/AutoResetEvent.cs b/src/coreclr/src/mscorlib/src/System/Threading/AutoResetEvent.cs index 78a6fa1..8a27860 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/AutoResetEvent.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/AutoResetEvent.cs @@ -17,7 +17,6 @@ namespace System.Threading { using System.Security.Permissions; using System.Runtime.InteropServices; - [System.Runtime.InteropServices.ComVisible(true)] public sealed class AutoResetEvent : EventWaitHandle { public AutoResetEvent(bool initialState) : base(initialState,EventResetMode.AutoReset){ } diff --git a/src/coreclr/src/mscorlib/src/System/Threading/CancellationToken.cs b/src/coreclr/src/mscorlib/src/System/Threading/CancellationToken.cs index 2ebdb08..d22c3af 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/CancellationToken.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/CancellationToken.cs @@ -38,7 +38,6 @@ namespace System.Threading /// All members of this struct are thread-safe and may be used concurrently from multiple threads. /// /// - [ComVisible(false)] [DebuggerDisplay("IsCancellationRequested = {IsCancellationRequested}")] public struct CancellationToken { diff --git a/src/coreclr/src/mscorlib/src/System/Threading/CancellationTokenSource.cs b/src/coreclr/src/mscorlib/src/System/Threading/CancellationTokenSource.cs index 2caa4f2..7b9aa85 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/CancellationTokenSource.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/CancellationTokenSource.cs @@ -35,7 +35,6 @@ namespace System.Threading /// concurrently from multiple threads. /// /// - [ComVisible(false)] public class CancellationTokenSource : IDisposable { diff --git a/src/coreclr/src/mscorlib/src/System/Threading/CountdownEvent.cs b/src/coreclr/src/mscorlib/src/System/Threading/CountdownEvent.cs index d86a2cc..a62c296 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/CountdownEvent.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/CountdownEvent.cs @@ -30,7 +30,6 @@ namespace System.Threading /// completed, and Reset, which should only be used when no other threads are /// accessing the event. /// - [ComVisible(false)] [DebuggerDisplay("Initial Count={InitialCount}, Current Count={CurrentCount}")] public class CountdownEvent : IDisposable { diff --git a/src/coreclr/src/mscorlib/src/System/Threading/ExecutionContext.cs b/src/coreclr/src/mscorlib/src/System/Threading/ExecutionContext.cs index 162f4e8..d063af7 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/ExecutionContext.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/ExecutionContext.cs @@ -27,7 +27,6 @@ namespace System.Threading using System.Diagnostics.Contracts; using System.Diagnostics.CodeAnalysis; - [System.Runtime.InteropServices.ComVisible(true)] public delegate void ContextCallback(Object state); internal struct ExecutionContextSwitcher diff --git a/src/coreclr/src/mscorlib/src/System/Threading/Interlocked.cs b/src/coreclr/src/mscorlib/src/System/Threading/Interlocked.cs index 8a0b527..53b2264 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/Interlocked.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/Interlocked.cs @@ -86,7 +86,6 @@ namespace System.Threading public static extern IntPtr Exchange(ref IntPtr location1, IntPtr value); [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] - [System.Runtime.InteropServices.ComVisible(false)] public static T Exchange(ref T location1, T value) where T : class { _Exchange(__makeref(location1), __makeref(value)); @@ -157,7 +156,6 @@ namespace System.Threading *****************************************************************/ [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] - [System.Runtime.InteropServices.ComVisible(false)] public static T CompareExchange(ref T location1, T value, T comparand) where T : class { // _CompareExchange() passes back the value read from location1 via local named 'value' diff --git a/src/coreclr/src/mscorlib/src/System/Threading/ManualResetEvent.cs b/src/coreclr/src/mscorlib/src/System/Threading/ManualResetEvent.cs index 0004156..a4d5f5e 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/ManualResetEvent.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/ManualResetEvent.cs @@ -17,7 +17,6 @@ namespace System.Threading { using System.Security.Permissions; using System.Runtime.InteropServices; -[System.Runtime.InteropServices.ComVisible(true)] public sealed class ManualResetEvent : EventWaitHandle { public ManualResetEvent(bool initialState) : base(initialState,EventResetMode.ManualReset){} diff --git a/src/coreclr/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs b/src/coreclr/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs index 509af5b..ed44e80 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs @@ -45,7 +45,6 @@ namespace System.Threading /// completed, and Reset, which should only be used when no other threads are /// accessing the event. /// - [ComVisible(false)] [DebuggerDisplay("Set = {IsSet}")] public class ManualResetEventSlim : IDisposable { diff --git a/src/coreclr/src/mscorlib/src/System/Threading/Monitor.cs b/src/coreclr/src/mscorlib/src/System/Threading/Monitor.cs index 94dec13..27f6296 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/Monitor.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/Monitor.cs @@ -27,7 +27,6 @@ namespace System.Threading { using System.Diagnostics; using System.Diagnostics.Contracts; - [System.Runtime.InteropServices.ComVisible(true)] public static class Monitor { /*========================================================================= diff --git a/src/coreclr/src/mscorlib/src/System/Threading/Mutex.cs b/src/coreclr/src/mscorlib/src/System/Threading/Mutex.cs index ea53a34..bf1730c 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/Mutex.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/Mutex.cs @@ -27,7 +27,6 @@ namespace System.Threading using System.Diagnostics; using System.Diagnostics.Contracts; - [ComVisible(true)] public sealed class Mutex : WaitHandle { static bool dummyBool; diff --git a/src/coreclr/src/mscorlib/src/System/Threading/Overlapped.cs b/src/coreclr/src/mscorlib/src/System/Threading/Overlapped.cs index 129bea6..92b4074 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/Overlapped.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/Overlapped.cs @@ -44,7 +44,6 @@ namespace System.Threading // The first five matches OVERLAPPED structure. // The remaining are reserved at the end [System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)] - [System.Runtime.InteropServices.ComVisible(true)] public struct NativeOverlapped { public IntPtr InternalLow; @@ -222,7 +221,6 @@ namespace System.Threading return AllocateNativeOverlapped(); } - [ComVisible(false)] internal IntPtr UserHandle { get { return m_nativeOverlapped.EventHandle; } @@ -248,7 +246,6 @@ namespace System.Threading #region class Overlapped /// - [System.Runtime.InteropServices.ComVisible(true)] public class Overlapped { private OverlappedData m_overlappedData; @@ -300,7 +297,6 @@ namespace System.Threading set { m_overlappedData.UserHandle = new IntPtr(value); } } - [ComVisible(false)] public IntPtr EventHandleIntPtr { get { return m_overlappedData.UserHandle; } @@ -329,7 +325,7 @@ namespace System.Threading return Pack (iocb, null); } - [CLSCompliant(false),ComVisible(false)] + [CLSCompliant(false)] unsafe public NativeOverlapped* Pack(IOCompletionCallback iocb, Object userData) { return m_overlappedData.Pack(iocb, userData); @@ -342,7 +338,7 @@ namespace System.Threading return UnsafePack (iocb, null); } - [CLSCompliant(false), ComVisible(false)] + [CLSCompliant(false)] unsafe public NativeOverlapped* UnsafePack(IOCompletionCallback iocb, Object userData) { return m_overlappedData.UnsafePack(iocb, userData); diff --git a/src/coreclr/src/mscorlib/src/System/Threading/SemaphoreSlim.cs b/src/coreclr/src/mscorlib/src/System/Threading/SemaphoreSlim.cs index 29b8f79..0477dcf 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/SemaphoreSlim.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/SemaphoreSlim.cs @@ -39,7 +39,6 @@ namespace System.Threading /// completed. /// /// - [ComVisible(false)] [DebuggerDisplay("Current Count = {m_currentCount}")] public class SemaphoreSlim : IDisposable { diff --git a/src/coreclr/src/mscorlib/src/System/Threading/SynchronizationLockException.cs b/src/coreclr/src/mscorlib/src/System/Threading/SynchronizationLockException.cs index 0610a60..de42c1f 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/SynchronizationLockException.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/SynchronizationLockException.cs @@ -17,7 +17,6 @@ namespace System.Threading { using System; using System.Runtime.Serialization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class SynchronizationLockException : SystemException { public SynchronizationLockException() diff --git a/src/coreclr/src/mscorlib/src/System/Threading/Thread.cs b/src/coreclr/src/mscorlib/src/System/Threading/Thread.cs index f05e104..5088af6 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/Thread.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/Thread.cs @@ -206,7 +206,6 @@ namespace System.Threading { SetStartHelper((Delegate)start, maxStackSize); } - [ComVisible(false)] public override int GetHashCode() { return m_ManagedThreadId; diff --git a/src/coreclr/src/mscorlib/src/System/Threading/ThreadAbortException.cs b/src/coreclr/src/mscorlib/src/System/Threading/ThreadAbortException.cs index 1b5443e..2592504 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/ThreadAbortException.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/ThreadAbortException.cs @@ -21,7 +21,6 @@ namespace System.Threading using System.Runtime.Serialization; using System.Runtime.CompilerServices; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public sealed class ThreadAbortException : SystemException { diff --git a/src/coreclr/src/mscorlib/src/System/Threading/ThreadInterruptedException.cs b/src/coreclr/src/mscorlib/src/System/Threading/ThreadInterruptedException.cs index 0056611..71c0964 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/ThreadInterruptedException.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/ThreadInterruptedException.cs @@ -17,7 +17,6 @@ namespace System.Threading { using System; using System.Runtime.Serialization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class ThreadInterruptedException : SystemException { public ThreadInterruptedException() diff --git a/src/coreclr/src/mscorlib/src/System/Threading/ThreadPool.cs b/src/coreclr/src/mscorlib/src/System/Threading/ThreadPool.cs index 8076a76..eb3f20b 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/ThreadPool.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/ThreadPool.cs @@ -844,7 +844,6 @@ namespace System.Threading private static extern bool UnregisterWaitNative(IntPtr handle, SafeHandle waitObject); } - [System.Runtime.InteropServices.ComVisible(true)] public sealed class RegisteredWaitHandle : MarshalByRefObject { private readonly RegisteredWaitHandleSafe internalRegisteredWait; @@ -863,7 +862,6 @@ namespace System.Threading internalRegisteredWait.SetWaitObject(waitObject); } - [System.Runtime.InteropServices.ComVisible(true)] // This is the only public method on this class public bool Unregister( WaitHandle waitObject // object to be notified when all callbacks to delegates have completed @@ -873,10 +871,8 @@ namespace System.Threading } } - [System.Runtime.InteropServices.ComVisible(true)] public delegate void WaitCallback(Object state); - [System.Runtime.InteropServices.ComVisible(true)] public delegate void WaitOrTimerCallback(Object state, bool timedOut); // signalled or timed out // @@ -1086,7 +1082,6 @@ namespace System.Threading } [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(true)] unsafe public delegate void IOCompletionCallback(uint errorCode, // Error code uint numBytes, // No. of bytes transferred NativeOverlapped* pOVERLAP // ptr to OVERLAP structure diff --git a/src/coreclr/src/mscorlib/src/System/Threading/ThreadPriority.cs b/src/coreclr/src/mscorlib/src/System/Threading/ThreadPriority.cs index c56156e..6303c2f 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/ThreadPriority.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/ThreadPriority.cs @@ -16,7 +16,6 @@ namespace System.Threading { using System.Threading; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public enum ThreadPriority { /*========================================================================= diff --git a/src/coreclr/src/mscorlib/src/System/Threading/ThreadStart.cs b/src/coreclr/src/mscorlib/src/System/Threading/ThreadStart.cs index b968117..d288c47 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/ThreadStart.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/ThreadStart.cs @@ -20,6 +20,5 @@ namespace System.Threading { // Define the delegate // NOTE: If you change the signature here, there is code in COMSynchronization // that invokes this delegate in native. -[System.Runtime.InteropServices.ComVisible(true)] public delegate void ThreadStart(); } diff --git a/src/coreclr/src/mscorlib/src/System/Threading/ThreadState.cs b/src/coreclr/src/mscorlib/src/System/Threading/ThreadState.cs index 007e1bf..2d953f3 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/ThreadState.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/ThreadState.cs @@ -16,7 +16,6 @@ namespace System.Threading { [Serializable] [Flags] -[System.Runtime.InteropServices.ComVisible(true)] public enum ThreadState { /*========================================================================= diff --git a/src/coreclr/src/mscorlib/src/System/Threading/ThreadStateException.cs b/src/coreclr/src/mscorlib/src/System/Threading/ThreadStateException.cs index 535dffc..97c03ce 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/ThreadStateException.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/ThreadStateException.cs @@ -16,7 +16,6 @@ namespace System.Threading { using System; using System.Runtime.Serialization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class ThreadStateException : SystemException { public ThreadStateException() diff --git a/src/coreclr/src/mscorlib/src/System/Threading/Timeout.cs b/src/coreclr/src/mscorlib/src/System/Threading/Timeout.cs index 99e2415..80bdbcc 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/Timeout.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/Timeout.cs @@ -8,10 +8,8 @@ namespace System.Threading { // A constant used by methods that take a timeout (Object.Wait, Thread.Sleep // etc) to indicate that no timeout should occur. // - [System.Runtime.InteropServices.ComVisible(true)] public static class Timeout { - [System.Runtime.InteropServices.ComVisible(false)] public static readonly TimeSpan InfiniteTimeSpan = new TimeSpan(0, 0, 0, 0, Timeout.Infinite); public const int Infinite = -1; diff --git a/src/coreclr/src/mscorlib/src/System/Threading/Timer.cs b/src/coreclr/src/mscorlib/src/System/Threading/Timer.cs index 263e47a..d497153 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/Timer.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/Timer.cs @@ -21,7 +21,6 @@ namespace System.Threading - [System.Runtime.InteropServices.ComVisible(true)] public delegate void TimerCallback(Object state); // @@ -659,7 +658,6 @@ namespace System.Threading } - [System.Runtime.InteropServices.ComVisible(true)] public sealed class Timer : MarshalByRefObject, IDisposable { private const UInt32 MAX_SUPPORTED_TIMEOUT = (uint)0xfffffffe; diff --git a/src/coreclr/src/mscorlib/src/System/Threading/WaitHandle.cs b/src/coreclr/src/mscorlib/src/System/Threading/WaitHandle.cs index 7638c8b..714f1a4 100644 --- a/src/coreclr/src/mscorlib/src/System/Threading/WaitHandle.cs +++ b/src/coreclr/src/mscorlib/src/System/Threading/WaitHandle.cs @@ -27,7 +27,6 @@ namespace System.Threading using System.Diagnostics.CodeAnalysis; using Win32Native = Microsoft.Win32.Win32Native; - [System.Runtime.InteropServices.ComVisible(true)] public abstract class WaitHandle : MarshalByRefObject, IDisposable { public const int WaitTimeout = 0x102; diff --git a/src/coreclr/src/mscorlib/src/System/TimeSpan.cs b/src/coreclr/src/mscorlib/src/System/TimeSpan.cs index a594da2..7b71b48 100644 --- a/src/coreclr/src/mscorlib/src/System/TimeSpan.cs +++ b/src/coreclr/src/mscorlib/src/System/TimeSpan.cs @@ -28,7 +28,6 @@ namespace System { // details of this type should change, or new fields added, we need to remember to add // an appropriate custom ILMarshaler to keep WInRT interop scenarios enabled. // - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public struct TimeSpan : IComparable , IComparable, IEquatable, IFormattable { diff --git a/src/coreclr/src/mscorlib/src/System/TimeZone.cs b/src/coreclr/src/mscorlib/src/System/TimeZone.cs index c0a369f..8ede492 100644 --- a/src/coreclr/src/mscorlib/src/System/TimeZone.cs +++ b/src/coreclr/src/mscorlib/src/System/TimeZone.cs @@ -26,7 +26,6 @@ namespace System { using System.Globalization; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] [Obsolete("System.TimeZone has been deprecated. Please investigate the use of System.TimeZoneInfo instead.")] public abstract class TimeZone { private static volatile TimeZone currentTimeZone = null; diff --git a/src/coreclr/src/mscorlib/src/System/Type.cs b/src/coreclr/src/mscorlib/src/System/Type.cs index 30ddb29..fcb8435 100644 --- a/src/coreclr/src/mscorlib/src/System/Type.cs +++ b/src/coreclr/src/mscorlib/src/System/Type.cs @@ -375,7 +375,6 @@ namespace System // This method will search for the specified constructor. For constructors, // unlike everything else, the default is to not look for static methods. The // reason is that we don't typically expose the class initializer. - [System.Runtime.InteropServices.ComVisible(true)] public ConstructorInfo GetConstructor(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, @@ -392,7 +391,6 @@ namespace System return GetConstructorImpl(bindingAttr, binder, callConvention, types, modifiers); } - [System.Runtime.InteropServices.ComVisible(true)] public ConstructorInfo GetConstructor(BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers) { if (types == null) @@ -404,7 +402,6 @@ namespace System return GetConstructorImpl(bindingAttr, binder, CallingConventions.Any, types, modifiers); } - [System.Runtime.InteropServices.ComVisible(true)] public ConstructorInfo GetConstructor(Type[] types) { // The arguments are checked in the called version of GetConstructor. @@ -421,15 +418,12 @@ namespace System // This routine will return an array of all constructors supported by the class. // Unlike everything else, the default is to not look for static methods. The // reason is that we don't typically expose the class initializer. - [System.Runtime.InteropServices.ComVisible(true)] public ConstructorInfo[] GetConstructors() { return GetConstructors(BindingFlags.Public | BindingFlags.Instance); } - [System.Runtime.InteropServices.ComVisible(true)] abstract public ConstructorInfo[] GetConstructors(BindingFlags bindingAttr); - [System.Runtime.InteropServices.ComVisible(true)] public ConstructorInfo TypeInitializer { get { return GetConstructorImpl(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, @@ -1577,7 +1571,6 @@ namespace System // else returns false. If this class and c are the same class false is // returned. // - [System.Runtime.InteropServices.ComVisible(true)] [Pure] public virtual bool IsSubclassOf(Type c) { @@ -1754,7 +1747,6 @@ namespace System // This method will return an interface mapping for the interface // requested. It will throw an argument exception if the Type doesn't // implemenet the interface. - [System.Runtime.InteropServices.ComVisible(true)] public virtual InterfaceMapping GetInterfaceMap(Type interfaceType) { throw new NotSupportedException(Environment.GetResourceString("NotSupported_SubclassOverride")); diff --git a/src/coreclr/src/mscorlib/src/System/TypeLoadException.cs b/src/coreclr/src/mscorlib/src/System/TypeLoadException.cs index d73a97f..8145a3a 100644 --- a/src/coreclr/src/mscorlib/src/System/TypeLoadException.cs +++ b/src/coreclr/src/mscorlib/src/System/TypeLoadException.cs @@ -24,7 +24,6 @@ namespace System { using System.Diagnostics.Contracts; [Serializable] - [System.Runtime.InteropServices.ComVisible(true)] public class TypeLoadException : SystemException, ISerializable { public TypeLoadException() diff --git a/src/coreclr/src/mscorlib/src/System/TypeUnloadedException.cs b/src/coreclr/src/mscorlib/src/System/TypeUnloadedException.cs index 511314d..f05d673 100644 --- a/src/coreclr/src/mscorlib/src/System/TypeUnloadedException.cs +++ b/src/coreclr/src/mscorlib/src/System/TypeUnloadedException.cs @@ -15,7 +15,6 @@ namespace System { using System.Runtime.Serialization; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class TypeUnloadedException : SystemException { public TypeUnloadedException() diff --git a/src/coreclr/src/mscorlib/src/System/TypedReference.cs b/src/coreclr/src/mscorlib/src/System/TypedReference.cs index b65652e..c3bc47d 100644 --- a/src/coreclr/src/mscorlib/src/System/TypedReference.cs +++ b/src/coreclr/src/mscorlib/src/System/TypedReference.cs @@ -16,7 +16,6 @@ namespace System { using System.Diagnostics.Contracts; [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(true)] [System.Runtime.Versioning.NonVersionable] // This only applies to field layout public struct TypedReference { diff --git a/src/coreclr/src/mscorlib/src/System/UInt16.cs b/src/coreclr/src/mscorlib/src/System/UInt16.cs index 399ef02..5cd1a65 100644 --- a/src/coreclr/src/mscorlib/src/System/UInt16.cs +++ b/src/coreclr/src/mscorlib/src/System/UInt16.cs @@ -19,7 +19,6 @@ namespace System { // Wrapper for unsigned 16 bit integers. [Serializable] [CLSCompliant(false), System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)] -[System.Runtime.InteropServices.ComVisible(true)] public struct UInt16 : IComparable, IFormattable, IConvertible , IComparable, IEquatable { diff --git a/src/coreclr/src/mscorlib/src/System/UInt32.cs b/src/coreclr/src/mscorlib/src/System/UInt32.cs index f3d6009..fc3f10f 100644 --- a/src/coreclr/src/mscorlib/src/System/UInt32.cs +++ b/src/coreclr/src/mscorlib/src/System/UInt32.cs @@ -21,7 +21,6 @@ namespace System { // * Wrapper for unsigned 32 bit integers. [Serializable] [CLSCompliant(false), System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)] - [System.Runtime.InteropServices.ComVisible(true)] public struct UInt32 : IComparable, IFormattable, IConvertible , IComparable, IEquatable { diff --git a/src/coreclr/src/mscorlib/src/System/UInt64.cs b/src/coreclr/src/mscorlib/src/System/UInt64.cs index b55cd7c..3b64f05 100644 --- a/src/coreclr/src/mscorlib/src/System/UInt64.cs +++ b/src/coreclr/src/mscorlib/src/System/UInt64.cs @@ -19,7 +19,6 @@ namespace System { // Wrapper for unsigned 64 bit integers. [Serializable] [CLSCompliant(false), System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)] -[System.Runtime.InteropServices.ComVisible(true)] public struct UInt64 : IComparable, IFormattable, IConvertible , IComparable, IEquatable { diff --git a/src/coreclr/src/mscorlib/src/System/UIntPtr.cs b/src/coreclr/src/mscorlib/src/System/UIntPtr.cs index eab424f..d0f988d 100644 --- a/src/coreclr/src/mscorlib/src/System/UIntPtr.cs +++ b/src/coreclr/src/mscorlib/src/System/UIntPtr.cs @@ -21,7 +21,6 @@ namespace System { [Serializable] [CLSCompliant(false)] - [System.Runtime.InteropServices.ComVisible(true)] public struct UIntPtr : IEquatable, ISerializable { unsafe private void* m_value; diff --git a/src/coreclr/src/mscorlib/src/System/ValueType.cs b/src/coreclr/src/mscorlib/src/System/ValueType.cs index 102a0d2..06a64e3 100644 --- a/src/coreclr/src/mscorlib/src/System/ValueType.cs +++ b/src/coreclr/src/mscorlib/src/System/ValueType.cs @@ -17,7 +17,6 @@ namespace System { using System.Runtime.Versioning; [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public abstract class ValueType { public override bool Equals (Object obj) { diff --git a/src/coreclr/src/mscorlib/src/System/Version.cs b/src/coreclr/src/mscorlib/src/System/Version.cs index 501571f..7c58d3c 100644 --- a/src/coreclr/src/mscorlib/src/System/Version.cs +++ b/src/coreclr/src/mscorlib/src/System/Version.cs @@ -25,7 +25,6 @@ namespace System { // specified component. [Serializable] -[System.Runtime.InteropServices.ComVisible(true)] public sealed class Version : ICloneable, IComparable , IComparable, IEquatable { diff --git a/src/coreclr/src/mscorlib/src/System/WeakReference.cs b/src/coreclr/src/mscorlib/src/System/WeakReference.cs index d564852..0da8876 100644 --- a/src/coreclr/src/mscorlib/src/System/WeakReference.cs +++ b/src/coreclr/src/mscorlib/src/System/WeakReference.cs @@ -19,7 +19,6 @@ namespace System { using System.Diagnostics; using System.Diagnostics.Contracts; - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] public class WeakReference : ISerializable {