From: Santiago Fernandez Madero Date: Fri, 7 Aug 2020 03:03:19 +0000 (-0500) Subject: Add DesignerAttribute to types that had it in full framework (#40425) X-Git-Tag: submit/tizen/20210909.063632~6167 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a81e48ffb17aa98adf6144eec4d52e10acf5e999;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Add DesignerAttribute to types that had it in full framework (#40425) * Add DesignerAttribute to types that had it in full framework * Move DesignerAttributeTests to Primitives and fix test errors * Remove DesignerAttribute.cs from TypeConverter --- diff --git a/eng/DefaultGenApiDocIds.txt b/eng/DefaultGenApiDocIds.txt index 5576d9f..51ea598 100644 --- a/eng/DefaultGenApiDocIds.txt +++ b/eng/DefaultGenApiDocIds.txt @@ -1,6 +1,5 @@ // These attributes should be excluded from reference assemblies. -T:System.ComponentModel.DesignerAttribute T:System.ComponentModel.Design.Serialization.DesignerSerializerAttribute T:System.ComponentModel.Design.Serialization.RootDesignerSerializerAttribute T:System.ComponentModel.EditorAttribute diff --git a/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs b/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs index 11285fc..77a375b 100644 --- a/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs +++ b/src/libraries/System.ComponentModel.Primitives/ref/System.ComponentModel.Primitives.cs @@ -86,6 +86,20 @@ namespace System.ComponentModel public override int GetHashCode() { throw null; } public override bool IsDefaultAttribute() { throw null; } } + [System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true, Inherited=true)] + public sealed partial class DesignerAttribute : System.Attribute + { + public DesignerAttribute(string designerTypeName) { } + public DesignerAttribute(string designerTypeName, string designerBaseTypeName) { } + public DesignerAttribute(string designerTypeName, System.Type designerBaseType) { } + public DesignerAttribute(System.Type designerType) { } + public DesignerAttribute(System.Type designerType, System.Type designerBaseType) { } + public string DesignerBaseTypeName { get { throw null; } } + public string DesignerTypeName { get { throw null; } } + public override object TypeId { get { throw null; } } + public override bool Equals(object? obj) { throw null; } + public override int GetHashCode() { throw null; } + } [System.AttributeUsageAttribute(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)] public sealed partial class DesignerCategoryAttribute : System.Attribute { @@ -153,6 +167,8 @@ namespace System.ComponentModel public void Dispose() { } public void RemoveHandler(object key, System.Delegate? value) { } } + [System.ComponentModel.DesignerAttribute("System.ComponentModel.Design.ComponentDesigner, System.Design, Version=4.0.0.0, PublicKeyToken=b03f5f7f11d50a3a")] + [System.ComponentModel.DesignerAttribute("System.Windows.Forms.Design.ComponentDocumentDesigner, System.Design, Version=4.0.0.0, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.TypeConverterAttribute("System.ComponentModel.ComponentConverter, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public partial interface IComponent : System.IDisposable { diff --git a/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj b/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj index aa386aa..52c0c07 100644 --- a/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj +++ b/src/libraries/System.ComponentModel.Primitives/src/System.ComponentModel.Primitives.csproj @@ -10,6 +10,7 @@ + diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/DesignerAttribute.cs b/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/DesignerAttribute.cs similarity index 92% rename from src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/DesignerAttribute.cs rename to src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/DesignerAttribute.cs index 06f34b9..bde0162 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/DesignerAttribute.cs +++ b/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/DesignerAttribute.cs @@ -11,7 +11,7 @@ namespace System.ComponentModel [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = true, Inherited = true)] public sealed class DesignerAttribute : Attribute { - private string _typeId; + private string? _typeId; /// /// Initializes a new instance of the class using the name of the type that @@ -20,7 +20,7 @@ namespace System.ComponentModel public DesignerAttribute(string designerTypeName) { DesignerTypeName = designerTypeName ?? throw new ArgumentNullException(nameof(designerTypeName)); - DesignerBaseTypeName = typeof(IDesigner).FullName; + DesignerBaseTypeName = "System.ComponentModel.Design.IDesigner, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"; } /// @@ -34,8 +34,8 @@ namespace System.ComponentModel throw new ArgumentNullException(nameof(designerType)); } - DesignerTypeName = designerType.AssemblyQualifiedName; - DesignerBaseTypeName = typeof(IDesigner).FullName; + DesignerTypeName = designerType.AssemblyQualifiedName!; + DesignerBaseTypeName = "System.ComponentModel.Design.IDesigner, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"; } /// @@ -64,7 +64,7 @@ namespace System.ComponentModel } DesignerTypeName = designerTypeName; - DesignerBaseTypeName = designerBaseType.AssemblyQualifiedName; + DesignerBaseTypeName = designerBaseType.AssemblyQualifiedName!; } /// @@ -82,8 +82,8 @@ namespace System.ComponentModel throw new ArgumentNullException(nameof(designerBaseType)); } - DesignerTypeName = designerType.AssemblyQualifiedName; - DesignerBaseTypeName = designerBaseType.AssemblyQualifiedName; + DesignerTypeName = designerType.AssemblyQualifiedName!; + DesignerBaseTypeName = designerBaseType.AssemblyQualifiedName!; } /// @@ -121,7 +121,7 @@ namespace System.ComponentModel } } - public override bool Equals(object obj) + public override bool Equals(object? obj) { if (obj == this) { diff --git a/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/IComponent.cs b/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/IComponent.cs index a94e4f7..bf95354 100644 --- a/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/IComponent.cs +++ b/src/libraries/System.ComponentModel.Primitives/src/System/ComponentModel/IComponent.cs @@ -19,6 +19,8 @@ namespace System.ComponentModel /// provided "site". /// Provides functionality required by all components. /// + [Designer("System.ComponentModel.Design.ComponentDesigner, System.Design, Version=4.0.0.0, PublicKeyToken=b03f5f7f11d50a3a")] + [Designer("System.Windows.Forms.Design.ComponentDocumentDesigner, System.Design, Version=4.0.0.0, PublicKeyToken=b03f5f7f11d50a3a")] [TypeConverter("System.ComponentModel.ComponentConverter, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public interface IComponent : IDisposable { diff --git a/src/libraries/System.ComponentModel.Primitives/tests/System.ComponentModel.Primitives.Tests.csproj b/src/libraries/System.ComponentModel.Primitives/tests/System.ComponentModel.Primitives.Tests.csproj index 2994d54..ab75a03 100644 --- a/src/libraries/System.ComponentModel.Primitives/tests/System.ComponentModel.Primitives.Tests.csproj +++ b/src/libraries/System.ComponentModel.Primitives/tests/System.ComponentModel.Primitives.Tests.csproj @@ -8,6 +8,7 @@ + diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/DesignerAttributeTests.cs b/src/libraries/System.ComponentModel.Primitives/tests/System/ComponentModel/DesignerAttributeTests.cs similarity index 95% rename from src/libraries/System.ComponentModel.TypeConverter/tests/DesignerAttributeTests.cs rename to src/libraries/System.ComponentModel.Primitives/tests/System/ComponentModel/DesignerAttributeTests.cs index fcd64ec..4b7246e 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/DesignerAttributeTests.cs +++ b/src/libraries/System.ComponentModel.Primitives/tests/System/ComponentModel/DesignerAttributeTests.cs @@ -17,7 +17,7 @@ namespace System.ComponentModel.Tests { var attribute = new DesignerAttribute(designerTypeName); Assert.Equal(designerTypeName, attribute.DesignerTypeName); - Assert.Equal(typeof(IDesigner).FullName, attribute.DesignerBaseTypeName); + Assert.Equal("System.ComponentModel.Design.IDesigner, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", attribute.DesignerBaseTypeName); } [Theory] @@ -28,7 +28,7 @@ namespace System.ComponentModel.Tests { var attribute = new DesignerAttribute(designerType); Assert.Equal(designerType.AssemblyQualifiedName, attribute.DesignerTypeName); - Assert.Equal(typeof(IDesigner).FullName, attribute.DesignerBaseTypeName); + Assert.Equal("System.ComponentModel.Design.IDesigner, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", attribute.DesignerBaseTypeName); } [Theory] diff --git a/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.Forwards.cs b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.Forwards.cs index a789d29..9fa6997 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.Forwards.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.Forwards.cs @@ -4,9 +4,10 @@ // Changes to this file must follow the https://aka.ms/api-review process. // ------------------------------------------------------------------------------ +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Component))] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.DesignerAttribute))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.InvalidAsynchronousStateException))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.InvalidEnumArgumentException))] -[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Component))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.ISupportInitialize))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.TypeConverterAttribute))] [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.TypeDescriptionProviderAttribute))] diff --git a/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs index 74a1e68..cfe811b 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/ref/System.ComponentModel.TypeConverter.cs @@ -381,20 +381,6 @@ namespace System.ComponentModel public override bool Equals(object obj) { throw null; } public override int GetHashCode() { throw null; } } - [System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true, Inherited=true)] - public sealed partial class DesignerAttribute : System.Attribute - { - public DesignerAttribute(string designerTypeName) { } - public DesignerAttribute(string designerTypeName, string designerBaseTypeName) { } - public DesignerAttribute(string designerTypeName, System.Type designerBaseType) { } - public DesignerAttribute(System.Type designerType) { } - public DesignerAttribute(System.Type designerType, System.Type designerBaseType) { } - public string DesignerBaseTypeName { get { throw null; } } - public string DesignerTypeName { get { throw null; } } - public override object TypeId { get { throw null; } } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - } [System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Interface)] public sealed partial class DesignTimeVisibleAttribute : System.Attribute { @@ -833,6 +819,7 @@ namespace System.ComponentModel public override bool Equals(object obj) { throw null; } public override int GetHashCode() { throw null; } } + [System.ComponentModel.DesignerAttribute("System.Windows.Forms.Design.ComponentDocumentDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.ComponentModel.Design.IRootDesigner))] [System.ComponentModel.DesignerCategoryAttribute("Component")] [System.ComponentModel.TypeConverterAttribute(typeof(System.ComponentModel.ComponentConverter))] public partial class MarshalByValueComponent : System.ComponentModel.IComponent, System.IDisposable, System.IServiceProvider @@ -1349,9 +1336,9 @@ namespace System.ComponentModel internal TypeDescriptor() { } [System.ObsoleteAttribute("This property has been deprecated. Use a type description provider to supply type information for COM types instead. https://go.microsoft.com/fwlink/?linkid=14202")] public static System.ComponentModel.IComNativeDescriptorHandler ComNativeDescriptorHandler { get { throw null; } set { } } - public static System.Type ComObjectType { get { throw null; } } + public static System.Type ComObjectType { [return: System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - public static System.Type InterfaceType { get { throw null; } } + public static System.Type InterfaceType { [return: System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] get { throw null; } } public static event System.ComponentModel.RefreshEventHandler Refreshed { add { } remove { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.ComponentModel.TypeDescriptionProvider AddAttributes(object instance, params System.Attribute[] attributes) { throw null; } diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj b/src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj index dfdb2e9..f102c54 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System.ComponentModel.TypeConverter.csproj @@ -119,7 +119,6 @@ - diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj b/src/libraries/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj index eb8dda3..a7d84bb 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj @@ -6,14 +6,12 @@ 9.9.9.9 $(NetCoreAppCurrent) - + - - @@ -72,7 +70,6 @@ - diff --git a/src/libraries/System.Data.Common/ref/System.Data.Common.cs b/src/libraries/System.Data.Common/ref/System.Data.Common.cs index 51be327..24cdb3d 100644 --- a/src/libraries/System.Data.Common/ref/System.Data.Common.cs +++ b/src/libraries/System.Data.Common/ref/System.Data.Common.cs @@ -65,7 +65,7 @@ namespace System.Data { internal ConstraintCollection() { } public System.Data.Constraint this[int index] { get { throw null; } } - public System.Data.Constraint this[string name] { get { throw null; } } + public System.Data.Constraint? this[string? name] { get { throw null; } } protected override System.Collections.ArrayList List { get { throw null; } } public event System.ComponentModel.CollectionChangeEventHandler? CollectionChanged { add { } remove { } } public void Add(System.Data.Constraint constraint) { } @@ -167,7 +167,7 @@ namespace System.Data public System.Data.DataColumn this[int index] { get { throw null; } } public System.Data.DataColumn? this[string name] { get { throw null; } } protected override System.Collections.ArrayList List { get { throw null; } } - public event System.ComponentModel.CollectionChangeEventHandler CollectionChanged { add { } remove { } } + public event System.ComponentModel.CollectionChangeEventHandler? CollectionChanged { add { } remove { } } public System.Data.DataColumn Add() { throw null; } public void Add(System.Data.DataColumn column) { } public System.Data.DataColumn Add(string? columnName) { throw null; } @@ -261,7 +261,7 @@ namespace System.Data { protected DataRelationCollection() { } public abstract System.Data.DataRelation this[int index] { get; } - public abstract System.Data.DataRelation? this[string name] { get; } + public abstract System.Data.DataRelation? this[string? name] { get; } public event System.ComponentModel.CollectionChangeEventHandler? CollectionChanged { add { } remove { } } public virtual System.Data.DataRelation Add(System.Data.DataColumn parentColumn, System.Data.DataColumn childColumn) { throw null; } public virtual System.Data.DataRelation Add(System.Data.DataColumn[] parentColumns, System.Data.DataColumn[] childColumns) { throw null; } @@ -274,7 +274,7 @@ namespace System.Data public virtual void AddRange(System.Data.DataRelation[]? relations) { } public virtual bool CanRemove(System.Data.DataRelation? relation) { throw null; } public virtual void Clear() { } - public virtual bool Contains(string name) { throw null; } + public virtual bool Contains(string? name) { throw null; } public void CopyTo(System.Data.DataRelation[] array, int index) { } protected abstract System.Data.DataSet GetDataSet(); public virtual int IndexOf(System.Data.DataRelation? relation) { throw null; } @@ -378,8 +378,8 @@ namespace System.Data public void Add(System.Data.DataRow row) { } public System.Data.DataRow Add(params object?[] values) { throw null; } public void Clear() { } - public bool Contains(object key) { throw null; } - public bool Contains(object[] keys) { throw null; } + public bool Contains(object? key) { throw null; } + public bool Contains(object?[] keys) { throw null; } public override void CopyTo(System.Array ar, int index) { } public void CopyTo(System.Data.DataRow[] array, int index) { } public System.Data.DataRow? Find(object? key) { throw null; } @@ -477,6 +477,7 @@ namespace System.Data object System.ComponentModel.ICustomTypeDescriptor.GetPropertyOwner(System.ComponentModel.PropertyDescriptor pd) { throw null; } #nullable enable } + [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.Data.VS.DataSetDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.DefaultPropertyAttribute("DataSetName")] [System.Xml.Serialization.XmlRootAttribute("DataSet")] [System.Xml.Serialization.XmlSchemaProviderAttribute("GetDataSetSchema")] @@ -868,6 +869,7 @@ namespace System.Data public override bool NextResult() { throw null; } public override bool Read() { throw null; } } + [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.Data.VS.DataViewDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.DefaultEventAttribute("PositionChanged")] [System.ComponentModel.DefaultPropertyAttribute("Table")] public partial class DataView : System.ComponentModel.MarshalByValueComponent, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList, System.ComponentModel.IBindingList, System.ComponentModel.IBindingListView, System.ComponentModel.ISupportInitialize, System.ComponentModel.ISupportInitializeNotification, System.ComponentModel.ITypedList @@ -965,6 +967,7 @@ namespace System.Data protected void UpdateIndex() { } protected virtual void UpdateIndex(bool force) { } } + [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.Data.VS.DataViewManagerDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public partial class DataViewManager : System.ComponentModel.MarshalByValueComponent, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList, System.ComponentModel.IBindingList, System.ComponentModel.ITypedList { public DataViewManager() { } diff --git a/src/libraries/System.Data.Common/src/System/Data/DataSet.cs b/src/libraries/System.Data.Common/src/System/Data/DataSet.cs index 10e27f3..20af212 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataSet.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataSet.cs @@ -23,6 +23,7 @@ namespace System.Data /// /// Represents an in-memory cache of data. /// + [Designer("Microsoft.VSDesigner.Data.VS.DataSetDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [DefaultProperty(nameof(DataSetName))] [Serializable] [XmlSchemaProvider(nameof(GetDataSetSchema))] diff --git a/src/libraries/System.Data.Common/src/System/Data/DataView.cs b/src/libraries/System.Data.Common/src/System/Data/DataView.cs index 931f1eb..aa750a4 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataView.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataView.cs @@ -15,6 +15,7 @@ namespace System.Data /// Represents a databindable, customized view of a /// for sorting, filtering, searching, editing, and navigation. /// + [Designer("Microsoft.VSDesigner.Data.VS.DataViewDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [DefaultProperty(nameof(Table))] [DefaultEvent("PositionChanged")] public class DataView : MarshalByValueComponent, IBindingListView, System.ComponentModel.ITypedList, ISupportInitializeNotification diff --git a/src/libraries/System.Data.Common/src/System/Data/DataViewManager.cs b/src/libraries/System.Data.Common/src/System/Data/DataViewManager.cs index e10db24..0f76e3d 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataViewManager.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataViewManager.cs @@ -10,6 +10,7 @@ using System.Xml; namespace System.Data { + [Designer("Microsoft.VSDesigner.Data.VS.DataViewManagerDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public class DataViewManager : MarshalByValueComponent, IBindingList, System.ComponentModel.ITypedList { private DataViewSettingCollection _dataViewSettingsCollection; diff --git a/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs b/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs index 934b48c..858ecbf 100644 --- a/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs +++ b/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.cs @@ -6,6 +6,7 @@ namespace System.Data.Odbc { + [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.Data.VS.OdbcCommandDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public sealed partial class OdbcCommand : System.Data.Common.DbCommand, System.ICloneable { public OdbcCommand() { } @@ -44,7 +45,7 @@ namespace System.Data.Odbc public override object? ExecuteScalar() { throw null; } public override void Prepare() { } public void ResetCommandTimeout() { } - object System.ICloneable.Clone() { throw null; } + object? System.ICloneable.Clone() { throw null; } } public sealed partial class OdbcCommandBuilder : System.Data.Common.DbCommandBuilder { @@ -63,16 +64,17 @@ namespace System.Data.Odbc public new System.Data.Odbc.OdbcCommand GetUpdateCommand() { throw null; } public new System.Data.Odbc.OdbcCommand GetUpdateCommand(bool useColumnsForParameterNames) { throw null; } public override string QuoteIdentifier(string unquotedIdentifier) { throw null; } - public string QuoteIdentifier(string unquotedIdentifier, System.Data.Odbc.OdbcConnection connection) { throw null; } + public string QuoteIdentifier(string unquotedIdentifier, System.Data.Odbc.OdbcConnection? connection) { throw null; } protected override void SetRowUpdatingHandler(System.Data.Common.DbDataAdapter adapter) { } public override string UnquoteIdentifier(string quotedIdentifier) { throw null; } - public string UnquoteIdentifier(string quotedIdentifier, System.Data.Odbc.OdbcConnection connection) { throw null; } + public string UnquoteIdentifier(string quotedIdentifier, System.Data.Odbc.OdbcConnection? connection) { throw null; } } public sealed partial class OdbcConnection : System.Data.Common.DbConnection, System.ICloneable { public OdbcConnection() { } public OdbcConnection(string? connectionString) { } - public override string? ConnectionString { get { throw null; } set { } } + [System.Diagnostics.CodeAnalysis.AllowNullAttribute] + public override string ConnectionString { get { throw null; } set { } } [System.ComponentModel.DefaultValueAttribute(15)] [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] public new int ConnectionTimeout { get { throw null; } set { } } @@ -120,8 +122,9 @@ namespace System.Data.Odbc public override void Clear() { } public override bool ContainsKey(string keyword) { throw null; } public override bool Remove(string keyword) { throw null; } - public override bool TryGetValue(string keyword, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out object? value) { throw null; } + public override bool TryGetValue(string keyword, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out object? value) { throw null; } } + [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.Data.VS.OdbcDataAdapterDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public sealed partial class OdbcDataAdapter : System.Data.Common.DbDataAdapter, System.Data.IDataAdapter, System.Data.IDbDataAdapter, System.ICloneable { public OdbcDataAdapter() { } @@ -142,7 +145,7 @@ namespace System.Data.Odbc protected override System.Data.Common.RowUpdatingEventArgs CreateRowUpdatingEvent(System.Data.DataRow dataRow, System.Data.IDbCommand? command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) { throw null; } protected override void OnRowUpdated(System.Data.Common.RowUpdatedEventArgs value) { } protected override void OnRowUpdating(System.Data.Common.RowUpdatingEventArgs value) { } - object System.ICloneable.Clone() { throw null; } + object? System.ICloneable.Clone() { throw null; } } public sealed partial class OdbcDataReader : System.Data.Common.DbDataReader { @@ -252,7 +255,7 @@ namespace System.Data.Odbc public OdbcParameter(string? name, System.Data.Odbc.OdbcType type) { } public OdbcParameter(string? name, System.Data.Odbc.OdbcType type, int size) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - public OdbcParameter(string? parameterName, System.Data.Odbc.OdbcType odbcType, int size, System.Data.ParameterDirection parameterDirection, bool isNullable, byte precision, byte scale, string srcColumn, System.Data.DataRowVersion srcVersion, object? value) { } + public OdbcParameter(string? parameterName, System.Data.Odbc.OdbcType odbcType, int size, System.Data.ParameterDirection parameterDirection, bool isNullable, byte precision, byte scale, string? srcColumn, System.Data.DataRowVersion srcVersion, object? value) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public OdbcParameter(string? parameterName, System.Data.Odbc.OdbcType odbcType, int size, System.Data.ParameterDirection parameterDirection, byte precision, byte scale, string? sourceColumn, System.Data.DataRowVersion sourceVersion, bool sourceColumnNullMapping, object? value) { } public OdbcParameter(string? name, System.Data.Odbc.OdbcType type, int size, string? sourcecolumn) { } @@ -275,7 +278,7 @@ namespace System.Data.Odbc public override object? Value { get { throw null; } set { } } public override void ResetDbType() { } public void ResetOdbcType() { } - object System.ICloneable.Clone() { throw null; } + object? System.ICloneable.Clone() { throw null; } public override string ToString() { throw null; } } public sealed partial class OdbcParameterCollection : System.Data.Common.DbParameterCollection diff --git a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcCommand.cs b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcCommand.cs index ad7b21c..ca88997 100644 --- a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcCommand.cs +++ b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcCommand.cs @@ -16,6 +16,7 @@ using System.Runtime.CompilerServices; namespace System.Data.Odbc { + [Designer("Microsoft.VSDesigner.Data.VS.OdbcCommandDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public sealed class OdbcCommand : DbCommand, ICloneable { private static int s_objectTypeCount; // Bid counter diff --git a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcDataAdapter.cs b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcDataAdapter.cs index 29b6dcc..77630d1 100644 --- a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcDataAdapter.cs +++ b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcDataAdapter.cs @@ -1,10 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Data.Common; namespace System.Data.Odbc { + [Designer("Microsoft.VSDesigner.Data.VS.OdbcDataAdapterDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public sealed class OdbcDataAdapter : DbDataAdapter, IDbDataAdapter, ICloneable { private static readonly object s_eventRowUpdated = new object(); diff --git a/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs b/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs index 7ad5fdf..eaaff82 100644 --- a/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs +++ b/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs @@ -6,6 +6,7 @@ namespace System.Data.OleDb { + [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.Data.VS.OleDbCommandDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public sealed partial class OleDbCommand : System.Data.Common.DbCommand, System.Data.IDbCommand, System.ICloneable, System.IDisposable { public OleDbCommand() { } @@ -108,7 +109,7 @@ namespace System.Data.OleDb protected override System.Data.Common.DbCommand CreateDbCommand() { throw null; } protected override void Dispose(bool disposing) { } public override void EnlistTransaction(System.Transactions.Transaction? transaction) { } - public System.Data.DataTable GetOleDbSchemaTable(System.Guid schema, object?[]? restrictions) { throw null; } + public System.Data.DataTable? GetOleDbSchemaTable(System.Guid schema, object?[]? restrictions) { throw null; } public override System.Data.DataTable GetSchema() { throw null; } public override System.Data.DataTable GetSchema(string collectionName) { throw null; } public override System.Data.DataTable GetSchema(string collectionName, string?[]? restrictionValues) { throw null; } @@ -140,6 +141,7 @@ namespace System.Data.OleDb public override bool Remove(string keyword) { throw null; } public override bool TryGetValue(string keyword, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out object? value) { throw null; } } + [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.Data.VS.OleDbDataAdapterDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public sealed partial class OleDbDataAdapter : System.Data.Common.DbDataAdapter, System.Data.IDataAdapter, System.Data.IDbDataAdapter, System.ICloneable { public OleDbDataAdapter() { } @@ -160,13 +162,13 @@ namespace System.Data.OleDb public new System.Data.OleDb.OleDbCommand? UpdateCommand { get { throw null; } set { } } public event System.Data.OleDb.OleDbRowUpdatedEventHandler? RowUpdated { add { } remove { } } public event System.Data.OleDb.OleDbRowUpdatingEventHandler? RowUpdating { add { } remove { } } - protected override System.Data.Common.RowUpdatedEventArgs CreateRowUpdatedEvent(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) { throw null; } - protected override System.Data.Common.RowUpdatingEventArgs CreateRowUpdatingEvent(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) { throw null; } + protected override System.Data.Common.RowUpdatedEventArgs CreateRowUpdatedEvent(System.Data.DataRow dataRow, System.Data.IDbCommand? command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) { throw null; } + protected override System.Data.Common.RowUpdatingEventArgs CreateRowUpdatingEvent(System.Data.DataRow dataRow, System.Data.IDbCommand? command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) { throw null; } public int Fill(System.Data.DataSet dataSet, object ADODBRecordSet, string srcTable) { throw null; } public int Fill(System.Data.DataTable dataTable, object ADODBRecordSet) { throw null; } protected override void OnRowUpdated(System.Data.Common.RowUpdatedEventArgs value) { } protected override void OnRowUpdating(System.Data.Common.RowUpdatingEventArgs value) { } - object System.ICloneable.Clone() { throw null; } + object? System.ICloneable.Clone() { throw null; } } public sealed partial class OleDbDataReader : System.Data.Common.DbDataReader { @@ -350,7 +352,7 @@ namespace System.Data.OleDb public override object? Value { get { throw null; } set { } } public override void ResetDbType() { } public void ResetOleDbType() { } - object System.ICloneable.Clone() { throw null; } + object? System.ICloneable.Clone() { throw null; } public override string ToString() { throw null; } } public sealed partial class OleDbParameterCollection : System.Data.Common.DbParameterCollection @@ -399,13 +401,13 @@ namespace System.Data.OleDb } public sealed partial class OleDbRowUpdatedEventArgs : System.Data.Common.RowUpdatedEventArgs { - public OleDbRowUpdatedEventArgs(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) : base (default(System.Data.DataRow), default(System.Data.IDbCommand), default(System.Data.StatementType), default(System.Data.Common.DataTableMapping)) { } + public OleDbRowUpdatedEventArgs(System.Data.DataRow dataRow, System.Data.IDbCommand? command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) : base (default(System.Data.DataRow), default(System.Data.IDbCommand), default(System.Data.StatementType), default(System.Data.Common.DataTableMapping)) { } public new System.Data.OleDb.OleDbCommand? Command { get { throw null; } } } public delegate void OleDbRowUpdatedEventHandler(object sender, System.Data.OleDb.OleDbRowUpdatedEventArgs e); public sealed partial class OleDbRowUpdatingEventArgs : System.Data.Common.RowUpdatingEventArgs { - public OleDbRowUpdatingEventArgs(System.Data.DataRow dataRow, System.Data.IDbCommand command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) : base (default(System.Data.DataRow), default(System.Data.IDbCommand), default(System.Data.StatementType), default(System.Data.Common.DataTableMapping)) { } + public OleDbRowUpdatingEventArgs(System.Data.DataRow dataRow, System.Data.IDbCommand? command, System.Data.StatementType statementType, System.Data.Common.DataTableMapping tableMapping) : base (default(System.Data.DataRow), default(System.Data.IDbCommand), default(System.Data.StatementType), default(System.Data.Common.DataTableMapping)) { } protected override System.Data.IDbCommand? BaseCommand { get { throw null; } set { } } public new System.Data.OleDb.OleDbCommand? Command { get { throw null; } set { } } } diff --git a/src/libraries/System.Data.OleDb/src/OleDbCommand.cs b/src/libraries/System.Data.OleDb/src/OleDbCommand.cs index 329200e..458335b 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbCommand.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbCommand.cs @@ -12,6 +12,7 @@ using System.Threading; namespace System.Data.OleDb { + [Designer("Microsoft.VSDesigner.Data.VS.OleDbCommandDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public sealed class OleDbCommand : DbCommand, ICloneable, IDbCommand { // command data diff --git a/src/libraries/System.Data.OleDb/src/OleDbDataAdapter.cs b/src/libraries/System.Data.OleDb/src/OleDbDataAdapter.cs index 05714ce..e4e7ba4 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbDataAdapter.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbDataAdapter.cs @@ -8,6 +8,7 @@ using System.Runtime.InteropServices; namespace System.Data.OleDb { + [Designer("Microsoft.VSDesigner.Data.VS.OleDbDataAdapterDesigner, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public sealed class OleDbDataAdapter : DbDataAdapter, IDbDataAdapter, ICloneable { private static readonly object EventRowUpdated = new object(); diff --git a/src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs b/src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs index 57c2a5c..74fa2a1 100644 --- a/src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs +++ b/src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs @@ -26,6 +26,7 @@ namespace System.Diagnostics public MonitoringDescriptionAttribute(string description) { } public override string Description { get { throw null; } } } + [System.ComponentModel.DesignerAttribute("System.Diagnostics.Design.ProcessDesigner, System.Design, Version=4.0.0.0, PublicKeyToken=b03f5f7f11d50a3a")] public partial class Process : System.ComponentModel.Component, System.IDisposable { public Process() { } @@ -117,17 +118,18 @@ namespace System.Diagnostics public static System.Diagnostics.Process Start(string fileName, string arguments) { throw null; } [System.CLSCompliantAttribute(false)] [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] - public static System.Diagnostics.Process Start(string fileName, string userName, System.Security.SecureString password, string domain) { throw null; } + public static System.Diagnostics.Process? Start(string fileName, string userName, System.Security.SecureString password, string domain) { throw null; } [System.CLSCompliantAttribute(false)] [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] - public static System.Diagnostics.Process Start(string fileName, string arguments, string userName, System.Security.SecureString password, string domain) { throw null; } + public static System.Diagnostics.Process? Start(string fileName, string arguments, string userName, System.Security.SecureString password, string domain) { throw null; } public override string ToString() { throw null; } public void WaitForExit() { } public bool WaitForExit(int milliseconds) { throw null; } - public System.Threading.Tasks.Task WaitForExitAsync(System.Threading.CancellationToken cancellationToken = default) { throw null; } + public System.Threading.Tasks.Task WaitForExitAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public bool WaitForInputIdle() { throw null; } public bool WaitForInputIdle(int milliseconds) { throw null; } } + [System.ComponentModel.DesignerAttribute("System.Diagnostics.Design.ProcessModuleDesigner, System.Design, Version=4.0.0.0, PublicKeyToken=b03f5f7f11d50a3a")] public partial class ProcessModule : System.ComponentModel.Component { internal ProcessModule() { } @@ -194,6 +196,7 @@ namespace System.Diagnostics public System.Diagnostics.ProcessWindowStyle WindowStyle { get { throw null; } set { } } public string WorkingDirectory { get { throw null; } set { } } } + [System.ComponentModel.DesignerAttribute("System.Diagnostics.Design.ProcessThreadDesigner, System.Design, Version=4.0.0.0, PublicKeyToken=b03f5f7f11d50a3a")] public partial class ProcessThread : System.ComponentModel.Component { internal ProcessThread() { } diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs index 6d33ac0..7349b31 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs @@ -20,6 +20,7 @@ namespace System.Diagnostics /// processes. Enables you to start and stop system processes. /// /// + [Designer("System.Diagnostics.Design.ProcessDesigner, System.Design, Version=4.0.0.0, PublicKeyToken=b03f5f7f11d50a3a")] public partial class Process : Component { private bool _haveProcessId; diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessModule.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessModule.cs index 4d6f5aa..b2abe82 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessModule.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessModule.cs @@ -10,6 +10,7 @@ namespace System.Diagnostics /// a particular process. Using this component, you can determine /// information about the module. /// + [Designer("System.Diagnostics.Design.ProcessModuleDesigner, System.Design, Version=4.0.0.0, PublicKeyToken=b03f5f7f11d50a3a")] public class ProcessModule : Component { private FileVersionInfo? _fileVersionInfo; diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessThread.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessThread.cs index f5ec77c..6ff4caf 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessThread.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessThread.cs @@ -13,6 +13,7 @@ namespace System.Diagnostics /// returned from the System.Diagnostics.Process.ProcessThread property of the System.Diagnostics.Process component. /// /// + [Designer("System.Diagnostics.Design.ProcessThreadDesigner, System.Design, Version=4.0.0.0, PublicKeyToken=b03f5f7f11d50a3a")] public partial class ProcessThread : Component { private readonly bool _isRemoteMachine; diff --git a/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs b/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs index e11cbf4..8fc328b 100644 --- a/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs +++ b/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs @@ -57,6 +57,7 @@ namespace System.ServiceProcess public void ServiceMainCallback(int argCount, System.IntPtr argPointer) { } public void Stop() { } } + [System.ComponentModel.DesignerAttribute("System.ServiceProcess.Design.ServiceControllerDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public partial class ServiceController : System.ComponentModel.Component { public ServiceController() { } diff --git a/src/libraries/System.ServiceProcess.ServiceController/src/System/ServiceProcess/ServiceController.cs b/src/libraries/System.ServiceProcess.ServiceController/src/System/ServiceProcess/ServiceController.cs index 6717ada..fdb4d99 100644 --- a/src/libraries/System.ServiceProcess.ServiceController/src/System/ServiceProcess/ServiceController.cs +++ b/src/libraries/System.ServiceProcess.ServiceController/src/System/ServiceProcess/ServiceController.cs @@ -17,6 +17,7 @@ namespace System.ServiceProcess { /// This class represents an NT service. It allows you to connect to a running or stopped service /// and manipulate it or get information about it. + [Designer("System.ServiceProcess.Design.ServiceControllerDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] public class ServiceController : Component { private string _machineName; // Never null