From 3ac170acc89adde016b1297f7c29232cda61c102 Mon Sep 17 00:00:00 2001 From: Krzysztof Wicher Date: Wed, 9 Sep 2020 18:15:30 +0200 Subject: [PATCH] Ensure enable on System.IO.Packaging and S.Resources.Extensions (#41731) Fix src ref diffs --- .../ref/System.ComponentModel.Annotations.cs | 12 ++--- .../DataAnnotations/UIHintAttribute.cs | 2 +- .../System/ComponentModel/ProgressChangedEvent.cs | 2 +- .../System.Data.Common/ref/System.Data.Common.cs | 25 ++++++----- .../ref/System.Data.Common.manual.cs | 2 +- .../src/System/Data/DataException.cs | 4 +- .../System.Data.Common/src/System/Data/DataSet.cs | 13 +++--- .../src/System/Data/DataTableCollection.cs | 8 ++-- .../System.Data.Common/src/System/Data/DataView.cs | 6 ++- .../src/System/Data/LinqDataView.cs | 4 +- .../System.Data.OleDb/ref/System.Data.OleDb.cs | 3 +- .../System.Data.OleDb/src/OleDbTransaction.cs | 4 +- .../System.Diagnostics.DiagnosticSourceActivity.cs | 38 ++++++++-------- .../src/System/Diagnostics/Activity.cs | 2 +- .../src/System/Diagnostics/ActivityEvent.cs | 2 +- .../src/System/Diagnostics/ActivityLink.cs | 2 +- .../System/Diagnostics/ActivityLink.netcoreapp.cs | 2 +- .../src/System/Diagnostics/ActivitySource.cs | 2 +- .../System/Diagnostics/ActivityTagsCollection.cs | 50 ++++++++++----------- .../Diagnostics/DelimitedListTraceListener.cs | 4 +- .../ref/System.IO.Packaging.PackUriScheme.cs | 8 ++-- .../ref/System.IO.Packaging.csproj | 1 + .../System.IO.Pipelines/ref/System.IO.Pipelines.cs | 4 +- .../System.Net.Mail/ref/System.Net.Mail.cs | 4 +- .../System.Net.Ping/ref/System.Net.Ping.cs | 2 +- .../ref/System.Net.Primitives.cs | 2 +- .../System.Net.Sockets/ref/System.Net.Sockets.cs | 2 +- .../src/System/Net/WebClient.cs | 2 +- .../ref/System.Net.WebSockets.cs | 2 +- .../ref/System.Reflection.TypeExtensions.cs | 2 +- .../ref/System.Resources.Extensions.csproj | 1 + .../src/System.Resources.Extensions.csproj | 2 +- .../ref/System.Runtime.InteropServices.cs | 4 +- src/libraries/System.Runtime/ref/System.Runtime.cs | 6 +-- .../ref/System.Security.Claims.cs | 2 +- .../ref/System.Security.Cryptography.Csp.cs | 2 +- ...System.Security.Cryptography.Pkcs.netcoreapp.cs | 52 +++++++++++----------- .../System/Security/Principal/WindowsIdentity.cs | 4 +- .../System.Text.Json/ref/System.Text.Json.cs | 6 +-- .../src/System/Text/Json/JsonException.cs | 2 +- .../ref/System.Text.RegularExpressions.cs | 4 +- 41 files changed, 152 insertions(+), 149 deletions(-) diff --git a/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs b/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs index 4db1cfd..ec83158 100644 --- a/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs +++ b/src/libraries/System.ComponentModel.Annotations/ref/System.ComponentModel.Annotations.cs @@ -35,7 +35,7 @@ namespace System.ComponentModel.DataAnnotations public string? OtherPropertyDisplayName { get { throw null; } } public override bool RequiresValidationContext { get { throw null; } } public override string FormatErrorMessage(string name) { throw null; } - protected override System.ComponentModel.DataAnnotations.ValidationResult IsValid(object value, System.ComponentModel.DataAnnotations.ValidationContext validationContext) { throw null; } + protected override System.ComponentModel.DataAnnotations.ValidationResult? IsValid(object? value, System.ComponentModel.DataAnnotations.ValidationContext validationContext) { throw null; } } [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)] public sealed partial class ConcurrencyCheckAttribute : System.Attribute @@ -103,7 +103,7 @@ namespace System.ComponentModel.DataAnnotations public string? ShortName { get { throw null; } set { } } public bool? GetAutoGenerateField() { throw null; } public bool? GetAutoGenerateFilter() { throw null; } - public string GetDescription() { throw null; } + public string? GetDescription() { throw null; } public string? GetGroupName() { throw null; } public string? GetName() { throw null; } public int? GetOrder() { throw null; } @@ -166,8 +166,8 @@ namespace System.ComponentModel.DataAnnotations { public FilterUIHintAttribute(string filterUIHint) { } public FilterUIHintAttribute(string filterUIHint, string? presentationLayer) { } - public FilterUIHintAttribute(string filterUIHint, string? presentationLayer, params object[] controlParameters) { } - public System.Collections.Generic.IDictionary ControlParameters { get { throw null; } } + public FilterUIHintAttribute(string filterUIHint, string? presentationLayer, params object?[] controlParameters) { } + public System.Collections.Generic.IDictionary ControlParameters { get { throw null; } } public string FilterUIHint { get { throw null; } } public string? PresentationLayer { get { throw null; } } public override bool Equals(object? obj) { throw null; } @@ -292,14 +292,14 @@ namespace System.ComponentModel.DataAnnotations public virtual string FormatErrorMessage(string name) { throw null; } public System.ComponentModel.DataAnnotations.ValidationResult? GetValidationResult(object? value, System.ComponentModel.DataAnnotations.ValidationContext validationContext) { throw null; } public virtual bool IsValid(object? value) { throw null; } - protected virtual System.ComponentModel.DataAnnotations.ValidationResult IsValid(object? value, System.ComponentModel.DataAnnotations.ValidationContext validationContext) { throw null; } + protected virtual System.ComponentModel.DataAnnotations.ValidationResult? IsValid(object? value, System.ComponentModel.DataAnnotations.ValidationContext validationContext) { throw null; } public void Validate(object? value, System.ComponentModel.DataAnnotations.ValidationContext validationContext) { } public void Validate(object? value, string name) { } } public sealed partial class ValidationContext : System.IServiceProvider { public ValidationContext(object instance) { } - public ValidationContext(object instance, System.Collections.Generic.IDictionary? items) { } + public ValidationContext(object instance, System.Collections.Generic.IDictionary? items) { } public ValidationContext(object instance, System.IServiceProvider? serviceProvider, System.Collections.Generic.IDictionary? items) { } public string DisplayName { get { throw null; } set { } } public System.Collections.Generic.IDictionary Items { get { throw null; } } diff --git a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/UIHintAttribute.cs b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/UIHintAttribute.cs index f92ebaa..4b48198 100644 --- a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/UIHintAttribute.cs +++ b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/UIHintAttribute.cs @@ -30,7 +30,7 @@ namespace System.ComponentModel.DataAnnotations /// /// The name of the control to use /// The name of the presentation layer that supports this control - public UIHintAttribute(string uiHint, string presentationLayer) + public UIHintAttribute(string uiHint, string? presentationLayer) : this(uiHint, presentationLayer, Array.Empty()) { } diff --git a/src/libraries/System.ComponentModel.EventBasedAsync/src/System/ComponentModel/ProgressChangedEvent.cs b/src/libraries/System.ComponentModel.EventBasedAsync/src/System/ComponentModel/ProgressChangedEvent.cs index 78656df..2c3b672 100644 --- a/src/libraries/System.ComponentModel.EventBasedAsync/src/System/ComponentModel/ProgressChangedEvent.cs +++ b/src/libraries/System.ComponentModel.EventBasedAsync/src/System/ComponentModel/ProgressChangedEvent.cs @@ -3,7 +3,7 @@ namespace System.ComponentModel { - public delegate void ProgressChangedEventHandler(object sender, ProgressChangedEventArgs e); + public delegate void ProgressChangedEventHandler(object? sender, ProgressChangedEventArgs e); public class ProgressChangedEventArgs : EventArgs { 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 537b12b..8541ef6 100644 --- a/src/libraries/System.Data.Common/ref/System.Data.Common.cs +++ b/src/libraries/System.Data.Common/ref/System.Data.Common.cs @@ -597,13 +597,13 @@ namespace System.Data public void WriteXml(System.Xml.XmlWriter? writer) { } public void WriteXml(System.Xml.XmlWriter? writer, System.Data.XmlWriteMode mode) { } public void WriteXmlSchema(System.IO.Stream? stream) { } - public void WriteXmlSchema(System.IO.Stream? stream, System.Converter? multipleTargetConverter) { } + public void WriteXmlSchema(System.IO.Stream? stream, System.Converter multipleTargetConverter) { } public void WriteXmlSchema(System.IO.TextWriter? writer) { } - public void WriteXmlSchema(System.IO.TextWriter? writer, System.Converter? multipleTargetConverter) { } + public void WriteXmlSchema(System.IO.TextWriter? writer, System.Converter multipleTargetConverter) { } public void WriteXmlSchema(string fileName) { } - public void WriteXmlSchema(string fileName, System.Converter? multipleTargetConverter) { } + public void WriteXmlSchema(string fileName, System.Converter multipleTargetConverter) { } public void WriteXmlSchema(System.Xml.XmlWriter? writer) { } - public void WriteXmlSchema(System.Xml.XmlWriter? writer, System.Converter? multipleTargetConverter) { } + public void WriteXmlSchema(System.Xml.XmlWriter? writer, System.Converter multipleTargetConverter) { } } public enum DataSetDateTime { @@ -706,7 +706,7 @@ namespace System.Data public System.Data.DataRow[] GetErrors() { throw null; } public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } protected virtual System.Type GetRowType() { throw null; } - protected virtual System.Xml.Schema.XmlSchema GetSchema() { throw null; } + protected virtual System.Xml.Schema.XmlSchema? GetSchema() { throw null; } public void ImportRow(System.Data.DataRow? row) { } public void Load(System.Data.IDataReader reader) { } public void Load(System.Data.IDataReader reader, System.Data.LoadOption loadOption) { } @@ -807,7 +807,7 @@ namespace System.Data public bool Contains(string? name) { throw null; } public bool Contains(string name, string tableNamespace) { throw null; } public void CopyTo(System.Data.DataTable[] array, int index) { } - public int IndexOf(System.Data.DataTable table) { throw null; } + public int IndexOf(System.Data.DataTable? table) { throw null; } public int IndexOf(string? tableName) { throw null; } public int IndexOf(string tableName, string tableNamespace) { throw null; } public void Remove(System.Data.DataTable table) { } @@ -863,7 +863,7 @@ namespace System.Data public override System.Type GetProviderSpecificFieldType(int ordinal) { throw null; } public override object GetProviderSpecificValue(int ordinal) { throw null; } public override int GetProviderSpecificValues(object[] values) { throw null; } - public override System.Data.DataTable? GetSchemaTable() { throw null; } + public override System.Data.DataTable GetSchemaTable() { throw null; } public override string GetString(int ordinal) { throw null; } public override object GetValue(int ordinal) { throw null; } public override int GetValues(object[] values) { throw null; } @@ -903,7 +903,8 @@ namespace System.Data [System.ComponentModel.DefaultValueAttribute(System.Data.DataViewRowState.CurrentRows)] public System.Data.DataViewRowState RowStateFilter { get { throw null; } set { } } [System.ComponentModel.DefaultValueAttribute("")] - public string? Sort { get { throw null; } set { } } + [System.Diagnostics.CodeAnalysis.AllowNullAttribute] + public string Sort { get { throw null; } set { } } bool System.Collections.ICollection.IsSynchronized { get { throw null; } } object System.Collections.ICollection.SyncRoot { get { throw null; } } bool System.Collections.IList.IsFixedSize { get { throw null; } } @@ -1598,7 +1599,7 @@ namespace System.Data public UniqueConstraint(string? name, System.Data.DataColumn[] columns) { } public UniqueConstraint(string? name, System.Data.DataColumn[] columns, bool isPrimaryKey) { } [System.ComponentModel.BrowsableAttribute(false)] - public UniqueConstraint(string name, string[]? columnNames, bool isPrimaryKey) { } + public UniqueConstraint(string? name, string[]? columnNames, bool isPrimaryKey) { } [System.ComponentModel.ReadOnlyAttribute(true)] public virtual System.Data.DataColumn[] Columns { get { throw null; } } public bool IsPrimaryKey { get { throw null; } } @@ -1711,7 +1712,7 @@ namespace System.Data.Common [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public System.Data.DataColumn? GetDataColumnBySchemaAction(System.Data.DataTable dataTable, System.Type? dataType, System.Data.MissingSchemaAction schemaAction) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - public static System.Data.DataColumn GetDataColumnBySchemaAction(string? sourceColumn, string? dataSetColumn, System.Data.DataTable dataTable, System.Type? dataType, System.Data.MissingSchemaAction schemaAction) { throw null; } + public static System.Data.DataColumn? GetDataColumnBySchemaAction(string? sourceColumn, string? dataSetColumn, System.Data.DataTable dataTable, System.Type? dataType, System.Data.MissingSchemaAction schemaAction) { throw null; } object System.ICloneable.Clone() { throw null; } public override string ToString() { throw null; } } @@ -2558,8 +2559,8 @@ namespace System.Data.SqlTypes public sealed partial class SqlAlreadyFilledException : System.Data.SqlTypes.SqlTypeException { public SqlAlreadyFilledException() { } - public SqlAlreadyFilledException(string message) { } - public SqlAlreadyFilledException(string message, System.Exception e) { } + public SqlAlreadyFilledException(string? message) { } + public SqlAlreadyFilledException(string? message, System.Exception? e) { } } [System.Xml.Serialization.XmlSchemaProviderAttribute("GetXsdType")] public partial struct SqlBinary : System.Data.SqlTypes.INullable, System.IComparable, System.Xml.Serialization.IXmlSerializable diff --git a/src/libraries/System.Data.Common/ref/System.Data.Common.manual.cs b/src/libraries/System.Data.Common/ref/System.Data.Common.manual.cs index 692155e..538ef71 100644 --- a/src/libraries/System.Data.Common/ref/System.Data.Common.manual.cs +++ b/src/libraries/System.Data.Common/ref/System.Data.Common.manual.cs @@ -41,7 +41,7 @@ namespace System.Data [System.ComponentModel.DefaultValueAttribute(null)] [System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)] [System.ComponentModel.TypeConverter(typeof(DataTableTypeConverter))] - public System.Data.DataTable Table { get { throw null; } set { } } + public System.Data.DataTable? Table { get { throw null; } set { } } } internal class DataTableTypeConverter { } } diff --git a/src/libraries/System.Data.Common/src/System/Data/DataException.cs b/src/libraries/System.Data.Common/src/System/Data/DataException.cs index 4df7e0b..dfc6806 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataException.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataException.cs @@ -358,8 +358,8 @@ namespace System.Data // public static Exception CannotModifyCollection() => _Argument(SR.Data_CannotModifyCollection); - public static Exception CaseInsensitiveNameConflict(string name) => _Argument(SR.Format(SR.Data_CaseInsensitiveNameConflict, name)); - public static Exception NamespaceNameConflict(string name) => _Argument(SR.Format(SR.Data_NamespaceNameConflict, name)); + public static Exception CaseInsensitiveNameConflict(string? name) => _Argument(SR.Format(SR.Data_CaseInsensitiveNameConflict, name)); + public static Exception NamespaceNameConflict(string? name) => _Argument(SR.Format(SR.Data_NamespaceNameConflict, name)); public static Exception InvalidOffsetLength() => _Argument(SR.Data_InvalidOffsetLength); // 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 8089963..9e4a168 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataSet.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataSet.cs @@ -1962,9 +1962,9 @@ namespace System.Data } #endregion - public XmlReadMode ReadXml(XmlReader reader) => ReadXml(reader, false); + public XmlReadMode ReadXml(XmlReader? reader) => ReadXml(reader, false); - internal XmlReadMode ReadXml(XmlReader reader, bool denyResolving) + internal XmlReadMode ReadXml(XmlReader? reader, bool denyResolving) { IDisposable? restrictedScope = null; long logScopeId = DataCommonEventSource.Log.EnterScope(" {0}, denyResolving={1}", ObjectID, denyResolving); @@ -2243,7 +2243,7 @@ namespace System.Data } } - public XmlReadMode ReadXml(Stream stream) + public XmlReadMode ReadXml(Stream? stream) { if (stream == null) { @@ -2258,7 +2258,7 @@ namespace System.Data return ReadXml(xr, false); } - public XmlReadMode ReadXml(TextReader reader) + public XmlReadMode ReadXml(TextReader? reader) { if (reader == null) { @@ -3355,7 +3355,7 @@ namespace System.Data protected virtual System.Xml.Schema.XmlSchema? GetSchemaSerializable() => null; - public static XmlSchemaComplexType GetDataSetSchema(XmlSchemaSet schemaSet) + public static XmlSchemaComplexType GetDataSetSchema(XmlSchemaSet? schemaSet) { // For performance reasons we are exploiting the fact that config files content is constant // for a given appdomain so we can safely cache the prepared schema complex type and reuse it @@ -3387,8 +3387,6 @@ namespace System.Data private static bool PublishLegacyWSDL() => false; -// TODO: Enable after System.Private.Xml is annotated -#nullable disable #pragma warning disable 8632 XmlSchema? IXmlSerializable.GetSchema() { @@ -3446,7 +3444,6 @@ namespace System.Data WriteXml(writer, XmlWriteMode.DiffGram); } #pragma warning restore 8632 -#nullable enable public virtual void Load(IDataReader reader, LoadOption loadOption, FillErrorEventHandler? errorHandler, params DataTable[] tables) { diff --git a/src/libraries/System.Data.Common/src/System/Data/DataTableCollection.cs b/src/libraries/System.Data.Common/src/System/Data/DataTableCollection.cs index 7446a84..5677da8 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataTableCollection.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataTableCollection.cs @@ -68,7 +68,7 @@ namespace System.Data /// /// Gets the table in the collection with the given name (not case-sensitive). /// - public DataTable? this[string name] + public DataTable? this[string? name] { get { @@ -85,7 +85,7 @@ namespace System.Data } } - public DataTable? this[string name, string tableNamespace] + public DataTable? this[string? name, string tableNamespace] { get { @@ -197,7 +197,7 @@ namespace System.Data /// /// Creates a table with the given name and adds it to the collection. /// - public DataTable? Add(string? name) + public DataTable Add(string? name) { DataTable table = new DataTable(name); Add(table); @@ -662,7 +662,7 @@ namespace System.Data // >= 0: find the match // -1: No match // -2: At least two matches with different cases - internal int InternalIndexOf(string tableName, string tableNamespace) + internal int InternalIndexOf(string? tableName, string tableNamespace) { int cachedI = -1; if ((null != tableName) && (0 < tableName.Length)) 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 8496446..11ed8cd 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataView.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataView.cs @@ -5,6 +5,7 @@ using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.CompilerServices; using System.Text; @@ -414,6 +415,7 @@ namespace System.Data /// /// Gets or sets the sort column or columns, and sort order for the table. /// + [AllowNull] [DefaultValue("")] public string Sort { @@ -722,11 +724,11 @@ namespace System.Data /// /// Finds a row in the by the specified primary key value. /// - public int Find(object key) => FindByKey(key); + public int Find(object? key) => FindByKey(key); /// Find index of a DataRowView instance that matches the specified primary key value. // TODO: This will throw NRE if _index isn't set (e.g. default ctor) - internal virtual int FindByKey(object key) => _index!.FindRecordByKey(key); + internal virtual int FindByKey(object? key) => _index!.FindRecordByKey(key); /// /// Finds a row in the by the specified primary key values. diff --git a/src/libraries/System.Data.Common/src/System/Data/LinqDataView.cs b/src/libraries/System.Data.Common/src/System/Data/LinqDataView.cs index e80c87e..92753db 100644 --- a/src/libraries/System.Data.Common/src/System/Data/LinqDataView.cs +++ b/src/libraries/System.Data.Common/src/System/Data/LinqDataView.cs @@ -105,7 +105,7 @@ namespace System.Data /// /// Value of the key to find /// Index of the first match of input key - internal override int FindByKey(object key) + internal override int FindByKey(object? key) { Debug.Assert(base.Sort != null); Debug.Assert(!(!string.IsNullOrEmpty(base.Sort) && base.SortComparison != null), @@ -128,7 +128,7 @@ namespace System.Data Index.ComparisonBySelector compareDelg = new Index.ComparisonBySelector(comparerKeyRow!); - List keyList = new List(); + List keyList = new List(); keyList.Add(key); Range range = FindRecords(compareDelg, keyList); 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 8b53b0f..9011a9f 100644 --- a/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs +++ b/src/libraries/System.Data.OleDb/ref/System.Data.OleDb.cs @@ -17,7 +17,8 @@ namespace System.Data.OleDb [System.ComponentModel.DefaultValueAttribute("")] [System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.Data.ADO.Design.OleDbCommandTextEditor, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)] - public override string? CommandText { get { throw null; } set { } } + [System.Diagnostics.CodeAnalysis.AllowNullAttribute] + public override string CommandText { get { throw null; } set { } } public override int CommandTimeout { get { throw null; } set { } } [System.ComponentModel.DefaultValueAttribute(System.Data.CommandType.Text)] [System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)] diff --git a/src/libraries/System.Data.OleDb/src/OleDbTransaction.cs b/src/libraries/System.Data.OleDb/src/OleDbTransaction.cs index d871248..26a2035 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbTransaction.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbTransaction.cs @@ -137,7 +137,7 @@ namespace System.Data.OleDb _isolationLevel = isolevel; } - public new OleDbConnection Connection + public new OleDbConnection? Connection { get { @@ -145,7 +145,7 @@ namespace System.Data.OleDb } } - protected override DbConnection DbConnection + protected override DbConnection? DbConnection { get { diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSourceActivity.cs b/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSourceActivity.cs index 2896367..9af9963 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSourceActivity.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/ref/System.Diagnostics.DiagnosticSourceActivity.cs @@ -47,7 +47,7 @@ namespace System.Diagnostics public System.Diagnostics.ActivitySpanId SpanId { get { throw null; } } public System.DateTime StartTimeUtc { get { throw null; } } public System.Collections.Generic.IEnumerable> Tags { get { throw null; } } - public System.Collections.Generic.IEnumerable> TagObjects { get { throw null; } } + public System.Collections.Generic.IEnumerable> TagObjects { get { throw null; } } public System.Collections.Generic.IEnumerable Events { get { throw null; } } public System.Collections.Generic.IEnumerable Links { get { throw null; } } public System.Diagnostics.ActivityTraceId TraceId { get { throw null; } } @@ -55,8 +55,8 @@ namespace System.Diagnostics public System.Diagnostics.Activity AddBaggage(string key, string? value) { throw null; } public System.Diagnostics.Activity AddEvent(System.Diagnostics.ActivityEvent e) { throw null; } public System.Diagnostics.Activity AddTag(string key, string? value) { throw null; } - public System.Diagnostics.Activity AddTag(string key, object value) { throw null; } - public System.Diagnostics.Activity SetTag(string key, object value) { throw null; } + public System.Diagnostics.Activity AddTag(string key, object? value) { throw null; } + public System.Diagnostics.Activity SetTag(string key, object? value) { throw null; } public string? GetBaggageItem(string key) { throw null; } public System.Diagnostics.Activity SetEndTime(System.DateTime endTimeUtc) { throw null; } public System.Diagnostics.Activity SetIdFormat(System.Diagnostics.ActivityIdFormat format) { throw null; } @@ -71,31 +71,31 @@ namespace System.Diagnostics public object? GetCustomProperty(string propertyName) { throw null; } public ActivityContext Context { get { throw null; } } } - public class ActivityTagsCollection : System.Collections.Generic.IDictionary + public class ActivityTagsCollection : System.Collections.Generic.IDictionary { public ActivityTagsCollection() { throw null; } - public ActivityTagsCollection(System.Collections.Generic.IEnumerable> list) { throw null; } + public ActivityTagsCollection(System.Collections.Generic.IEnumerable> list) { throw null; } public object? this[string key] { get { throw null; } set { } } public System.Collections.Generic.ICollection Keys { get { throw null; } } - public System.Collections.Generic.ICollection Values { get { throw null; } } + public System.Collections.Generic.ICollection Values { get { throw null; } } public int Count { get { throw null; } } public bool IsReadOnly { get { throw null; } } - public void Add(string key, object value) { throw null; } - public void Add(System.Collections.Generic.KeyValuePair item) { throw null; } + public void Add(string key, object? value) { throw null; } + public void Add(System.Collections.Generic.KeyValuePair item) { throw null; } public void Clear() { throw null; } - public bool Contains(System.Collections.Generic.KeyValuePair item) { throw null; } + public bool Contains(System.Collections.Generic.KeyValuePair item) { throw null; } public bool ContainsKey(string key) { throw null; } - public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { throw null; } - System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } + public void CopyTo(System.Collections.Generic.KeyValuePair[] array, int arrayIndex) { throw null; } + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } public bool Remove(string key) { throw null; } - public bool Remove(System.Collections.Generic.KeyValuePair item) { throw null; } - public bool TryGetValue(string key, out object value) { throw null; } + public bool Remove(System.Collections.Generic.KeyValuePair item) { throw null; } + public bool TryGetValue(string key, out object? value) { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } public Enumerator GetEnumerator() { throw null; } - public struct Enumerator : System.Collections.Generic.IEnumerator>, System.Collections.IEnumerator + public struct Enumerator : System.Collections.Generic.IEnumerator>, System.Collections.IEnumerator { - public System.Collections.Generic.KeyValuePair Current { get { throw null; } } + public System.Collections.Generic.KeyValuePair Current { get { throw null; } } object System.Collections.IEnumerator.Current { get { throw null; } } public void Dispose() { throw null; } public bool MoveNext() { throw null; } @@ -200,7 +200,7 @@ namespace System.Diagnostics public ActivityEvent(string name, System.DateTimeOffset timestamp = default, System.Diagnostics.ActivityTagsCollection? tags = null) { throw null; } public string Name { get { throw null; } } public System.DateTimeOffset Timestamp { get { throw null; } } - public System.Collections.Generic.IEnumerable> Tags { get { throw null; } } + public System.Collections.Generic.IEnumerable> Tags { get { throw null; } } } public readonly struct ActivityContext : System.IEquatable { @@ -222,7 +222,7 @@ namespace System.Diagnostics { public ActivityLink(System.Diagnostics.ActivityContext context, System.Diagnostics.ActivityTagsCollection? tags = null) { throw null; } public System.Diagnostics.ActivityContext Context { get { throw null; } } - public System.Collections.Generic.IEnumerable>? Tags { get { throw null; } } + public System.Collections.Generic.IEnumerable>? Tags { get { throw null; } } public override bool Equals(object? obj) { throw null; } public bool Equals(System.Diagnostics.ActivityLink value) { throw null; } public static bool operator ==(System.Diagnostics.ActivityLink left, System.Diagnostics.ActivityLink right) { throw null; } @@ -235,8 +235,8 @@ namespace System.Diagnostics public string Name { get { throw null; } } public System.Diagnostics.ActivityKind Kind { get { throw null; } } public T Parent { get { throw null; } } - public System.Collections.Generic.IEnumerable> Tags { get { throw null; } } - public System.Collections.Generic.IEnumerable Links { get { throw null; } } + public System.Collections.Generic.IEnumerable>? Tags { get { throw null; } } + public System.Collections.Generic.IEnumerable? Links { get { throw null; } } public System.Diagnostics.ActivityTagsCollection SamplingTags { get { throw null; } } public System.Diagnostics.ActivityTraceId TraceId { get { throw null; } } } diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs index f507390..b63b7ac 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs @@ -392,7 +392,7 @@ namespace System.Diagnostics /// The tag key name /// The tag value mapped to the input key /// 'this' for convenient chaining - public Activity SetTag(string key, object value) + public Activity SetTag(string key, object? value) { KeyValuePair kvp = new KeyValuePair(key, value); diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityEvent.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityEvent.cs index 1b1e201..6399fa4 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityEvent.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityEvent.cs @@ -47,6 +47,6 @@ namespace System.Diagnostics /// /// Gets the collection of tags associated with the event. /// - public IEnumerable> Tags { get; } + public IEnumerable> Tags { get; } } } diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityLink.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityLink.cs index d34c688..9d3744d 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityLink.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityLink.cs @@ -32,7 +32,7 @@ namespace System.Diagnostics /// /// Retrieve the key-value pair list of tags attached with the . /// - public IEnumerable>? Tags { get; } + public IEnumerable>? Tags { get; } public override bool Equals(object? obj) => (obj is ActivityLink link) && this.Equals(link); diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityLink.netcoreapp.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityLink.netcoreapp.cs index e370bdd..513b89d 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityLink.netcoreapp.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityLink.netcoreapp.cs @@ -19,7 +19,7 @@ namespace System.Diagnostics hashCode.Add(Context); if (Tags != null) { - foreach (KeyValuePair kvp in Tags) + foreach (KeyValuePair kvp in Tags) { hashCode.Add(kvp.Key); hashCode.Add(kvp.Value); diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySource.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySource.cs index 8d3f3e9..781e9dd 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySource.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySource.cs @@ -168,7 +168,7 @@ namespace System.Diagnostics } else { - foreach (KeyValuePair tag in atc) + foreach (KeyValuePair tag in atc) { samplerTags.Add(tag); } diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityTagsCollection.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityTagsCollection.cs index 2069de9..8005e02 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityTagsCollection.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityTagsCollection.cs @@ -19,9 +19,9 @@ namespace System.Diagnostics /// - Otherwise, the item will be added to the collection. /// - Add method will add a new item to the collection if an item doesn't already exist with the same key. Otherwise, it will throw an exception. /// - public class ActivityTagsCollection : IDictionary + public class ActivityTagsCollection : IDictionary { - private List> _list = new List>(); + private List> _list = new List>(); /// /// Create a new instance of the collection. @@ -34,14 +34,14 @@ namespace System.Diagnostics /// Create a new instance of the collection and store the input list items in the collection. /// /// Initial list to store in the collection. - public ActivityTagsCollection(IEnumerable> list) + public ActivityTagsCollection(IEnumerable> list) { if (list == null) { throw new ArgumentNullException(nameof(list)); } - foreach (KeyValuePair kvp in list) + foreach (KeyValuePair kvp in list) { if (kvp.Key != null) { @@ -58,12 +58,12 @@ namespace System.Diagnostics /// - Otherwise, a new item will get added to the collection. /// /// Object mapped to the key - public object this[string key] + public object? this[string key] { get { int index = _list.FindIndex(kvp => kvp.Key == key); - return index < 0 ? null! : _list[index].Value; + return index < 0 ? null : _list[index].Value; } set @@ -85,11 +85,11 @@ namespace System.Diagnostics if (index >= 0) { - _list[index] = new KeyValuePair(key, value); + _list[index] = new KeyValuePair(key, value); } else { - _list.Add(new KeyValuePair(key, value)); + _list.Add(new KeyValuePair(key, value)); } } } @@ -102,7 +102,7 @@ namespace System.Diagnostics get { List list = new List(_list.Count); - foreach (KeyValuePair kvp in _list) + foreach (KeyValuePair kvp in _list) { list.Add(kvp.Key); } @@ -113,12 +113,12 @@ namespace System.Diagnostics /// /// Get the list of the values of all stored tags. /// - public ICollection Values + public ICollection Values { get { - List list = new List(_list.Count); - foreach (KeyValuePair kvp in _list) + List list = new List(_list.Count); + foreach (KeyValuePair kvp in _list) { list.Add(kvp.Value); } @@ -142,7 +142,7 @@ namespace System.Diagnostics /// /// The tag key. /// The tag value. - public void Add(string key, object value) + public void Add(string key, object? value) { if (key == null) { @@ -155,14 +155,14 @@ namespace System.Diagnostics throw new InvalidOperationException(SR.Format(SR.KeyAlreadyExist, key)); } - _list.Add(new KeyValuePair(key, value)); + _list.Add(new KeyValuePair(key, value)); } /// /// Adds an item to the collection /// /// Key and value pair of the tag to add to the collection. - public void Add(KeyValuePair item) + public void Add(KeyValuePair item) { if (item.Key == null) { @@ -183,7 +183,7 @@ namespace System.Diagnostics /// public void Clear() => _list.Clear(); - public bool Contains(KeyValuePair item) => _list.Contains(item); + public bool Contains(KeyValuePair item) => _list.Contains(item); /// /// Determines whether the collection contains an element with the specified key. @@ -197,12 +197,12 @@ namespace System.Diagnostics /// /// The array that is the destination of the elements copied from collection. /// The zero-based index in array at which copying begins. - public void CopyTo(KeyValuePair[] array, int arrayIndex) => _list.CopyTo(array, arrayIndex); + public void CopyTo(KeyValuePair[] array, int arrayIndex) => _list.CopyTo(array, arrayIndex); /// /// Returns an enumerator that iterates through the collection. /// - IEnumerator> IEnumerable>.GetEnumerator() => new Enumerator(_list); + IEnumerator> IEnumerable>.GetEnumerator() => new Enumerator(_list); /// /// Returns an enumerator that iterates through the collection. @@ -241,7 +241,7 @@ namespace System.Diagnostics /// /// The tag key value pair to remove. /// True if item was successfully removed from the collection; otherwise, false. This method also returns false if item is not found in the original collection. - public bool Remove(KeyValuePair item) => _list.Remove(item); + public bool Remove(KeyValuePair item) => _list.Remove(item); /// /// Gets the value associated with the specified key. @@ -249,7 +249,7 @@ namespace System.Diagnostics /// The tag key. /// The tag value. /// When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized. - public bool TryGetValue(string key, [MaybeNullWhen(false)] out object value) + public bool TryGetValue(string key, out object? value) { int index = _list.FindIndex(kvp => kvp.Key == key); if (index >= 0) @@ -262,16 +262,16 @@ namespace System.Diagnostics return false; } - public struct Enumerator : IEnumerator>, IEnumerator + public struct Enumerator : IEnumerator>, IEnumerator { - private List>.Enumerator _enumerator; - internal Enumerator(List> list) => _enumerator = list.GetEnumerator(); + private List>.Enumerator _enumerator; + internal Enumerator(List> list) => _enumerator = list.GetEnumerator(); - public KeyValuePair Current => _enumerator.Current; + public KeyValuePair Current => _enumerator.Current; object IEnumerator.Current => ((IEnumerator)_enumerator).Current; public void Dispose() => _enumerator.Dispose(); public bool MoveNext() => _enumerator.MoveNext(); void IEnumerator.Reset() => ((IEnumerator)_enumerator).Reset(); } } -} \ No newline at end of file +} diff --git a/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System/Diagnostics/DelimitedListTraceListener.cs b/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System/Diagnostics/DelimitedListTraceListener.cs index 5545869..4397987 100644 --- a/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System/Diagnostics/DelimitedListTraceListener.cs +++ b/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System/Diagnostics/DelimitedListTraceListener.cs @@ -32,11 +32,11 @@ namespace System.Diagnostics { } - public DelimitedListTraceListener(string fileName) : base(fileName) + public DelimitedListTraceListener(string? fileName) : base(fileName) { } - public DelimitedListTraceListener(string fileName, string? name) : base(fileName, name) + public DelimitedListTraceListener(string? fileName, string? name) : base(fileName, name) { } diff --git a/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.PackUriScheme.cs b/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.PackUriScheme.cs index c265ec9..29a4438 100644 --- a/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.PackUriScheme.cs +++ b/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.PackUriScheme.cs @@ -8,11 +8,11 @@ namespace System.IO.Packaging { public static partial class PackUriHelper { - public static int ComparePackUri(System.Uri firstPackUri, System.Uri secondPackUri) { throw null; } + public static int ComparePackUri(System.Uri? firstPackUri, System.Uri? secondPackUri) { throw null; } public static System.Uri Create(System.Uri packageUri) { throw null; } - public static System.Uri Create(System.Uri packageUri, System.Uri partUri) { throw null; } - public static System.Uri Create(System.Uri packageUri, System.Uri partUri, string fragment) { throw null; } + public static System.Uri Create(System.Uri packageUri, System.Uri? partUri) { throw null; } + public static System.Uri Create(System.Uri packageUri, System.Uri? partUri, string? fragment) { throw null; } public static System.Uri GetPackageUri(System.Uri packUri) { throw null; } - public static System.Uri GetPartUri(System.Uri packUri) { throw null; } + public static System.Uri? GetPartUri(System.Uri packUri) { throw null; } } } diff --git a/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.csproj b/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.csproj index bb30574..bcee4b7 100644 --- a/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.csproj +++ b/src/libraries/System.IO.Packaging/ref/System.IO.Packaging.csproj @@ -6,6 +6,7 @@ $(DefineConstants);netcoreapp true + enable diff --git a/src/libraries/System.IO.Pipelines/ref/System.IO.Pipelines.cs b/src/libraries/System.IO.Pipelines/ref/System.IO.Pipelines.cs index 8e1fcb8..c3536cd 100644 --- a/src/libraries/System.IO.Pipelines/ref/System.IO.Pipelines.cs +++ b/src/libraries/System.IO.Pipelines/ref/System.IO.Pipelines.cs @@ -51,7 +51,7 @@ namespace System.IO.Pipelines public virtual System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.IO.Pipelines.PipeReader Create(System.IO.Stream stream, System.IO.Pipelines.StreamPipeReaderOptions? readerOptions = null) { throw null; } [System.ObsoleteAttribute("OnWriterCompleted may not be invoked on all implementations of PipeReader. This will be removed in a future release.")] - public virtual void OnWriterCompleted(System.Action callback, object state) { } + public virtual void OnWriterCompleted(System.Action callback, object? state) { } public abstract System.Threading.Tasks.ValueTask ReadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); public abstract bool TryRead(out System.IO.Pipelines.ReadResult result); } @@ -76,7 +76,7 @@ namespace System.IO.Pipelines public abstract System.Memory GetMemory(int sizeHint = 0); public abstract System.Span GetSpan(int sizeHint = 0); [System.ObsoleteAttribute("OnReaderCompleted may not be invoked on all implementations of PipeWriter. This will be removed in a future release.")] - public virtual void OnReaderCompleted(System.Action callback, object state) { } + public virtual void OnReaderCompleted(System.Action callback, object? state) { } public virtual System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public readonly partial struct ReadResult diff --git a/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs b/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs index 8ce1f9d..e59605e 100644 --- a/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs +++ b/src/libraries/System.Net.Mail/ref/System.Net.Mail.cs @@ -43,7 +43,7 @@ namespace System.Net.Mail public System.Text.Encoding? NameEncoding { get { throw null; } set { } } public static System.Net.Mail.Attachment CreateAttachmentFromString(string content, System.Net.Mime.ContentType contentType) { throw null; } public static System.Net.Mail.Attachment CreateAttachmentFromString(string content, string? name) { throw null; } - public static System.Net.Mail.Attachment CreateAttachmentFromString(string content, string? name, System.Text.Encoding? contentEncoding, string mediaType) { throw null; } + public static System.Net.Mail.Attachment CreateAttachmentFromString(string content, string? name, System.Text.Encoding? contentEncoding, string? mediaType) { throw null; } } public abstract partial class AttachmentBase : System.IDisposable { @@ -114,7 +114,7 @@ namespace System.Net.Mail public override int GetHashCode() { throw null; } public static bool TryCreate(string address, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out MailAddress? result) { throw null; } public static bool TryCreate(string address, string? displayName, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out MailAddress? result) { throw null; } - public static bool TryCreate(string address, string? displayName, System.Text.Encoding displayNameEncoding, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out MailAddress? result) { throw null; } + public static bool TryCreate(string address, string? displayName, System.Text.Encoding? displayNameEncoding, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out MailAddress? result) { throw null; } public override string ToString() { throw null; } } public partial class MailAddressCollection : System.Collections.ObjectModel.Collection diff --git a/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs b/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs index 8d1436f..82dcd06 100644 --- a/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs +++ b/src/libraries/System.Net.Ping/ref/System.Net.Ping.cs @@ -68,7 +68,7 @@ namespace System.Net.NetworkInformation public partial class PingCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { internal PingCompletedEventArgs() : base (default(System.Exception), default(bool), default(object)) { } - public System.Net.NetworkInformation.PingReply Reply { get { throw null; } } + public System.Net.NetworkInformation.PingReply? Reply { get { throw null; } } } public delegate void PingCompletedEventHandler(object sender, System.Net.NetworkInformation.PingCompletedEventArgs e); public partial class PingException : System.InvalidOperationException diff --git a/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs b/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs index 899fa7d..635513e 100644 --- a/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs +++ b/src/libraries/System.Net.Primitives/ref/System.Net.Primitives.cs @@ -276,7 +276,7 @@ namespace System.Net public static System.Net.IPEndPoint Parse(string s) { throw null; } public override System.Net.SocketAddress Serialize() { throw null; } public override string ToString() { throw null; } - public static bool TryParse(System.ReadOnlySpan s, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Net.IPEndPoint result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Net.IPEndPoint? result) { throw null; } public static bool TryParse(string s, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Net.IPEndPoint? result) { throw null; } } public partial interface IWebProxy diff --git a/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.cs b/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.cs index e965b80..d8ccc33 100644 --- a/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.cs +++ b/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.cs @@ -688,7 +688,7 @@ namespace System.Net.Sockets protected virtual void Dispose(bool disposing) { } public void DropMulticastGroup(System.Net.IPAddress multicastAddr) { } public void DropMulticastGroup(System.Net.IPAddress multicastAddr, int ifindex) { } - public byte[] EndReceive(System.IAsyncResult asyncResult, ref System.Net.IPEndPoint remoteEP) { throw null; } + public byte[] EndReceive(System.IAsyncResult asyncResult, ref System.Net.IPEndPoint? remoteEP) { throw null; } public int EndSend(System.IAsyncResult asyncResult) { throw null; } public void JoinMulticastGroup(int ifindex, System.Net.IPAddress multicastAddr) { } public void JoinMulticastGroup(System.Net.IPAddress multicastAddr) { } diff --git a/src/libraries/System.Net.WebClient/src/System/Net/WebClient.cs b/src/libraries/System.Net.WebClient/src/System/Net/WebClient.cs index 37e0a0f..8849777 100644 --- a/src/libraries/System.Net.WebClient/src/System/Net/WebClient.cs +++ b/src/libraries/System.Net.WebClient/src/System/Net/WebClient.cs @@ -2009,7 +2009,7 @@ namespace System.Net [Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)] [EditorBrowsable(EditorBrowsableState.Never)] - public event WriteStreamClosedEventHandler WriteStreamClosed { add { } remove { } } + public event WriteStreamClosedEventHandler? WriteStreamClosed { add { } remove { } } [Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)] [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs b/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs index 9d72394..e4ff945 100644 --- a/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs +++ b/src/libraries/System.Net.WebSockets/ref/System.Net.WebSockets.cs @@ -27,7 +27,7 @@ namespace System.Net.WebSockets public abstract System.Threading.Tasks.Task CloseOutputAsync(System.Net.WebSockets.WebSocketCloseStatus closeStatus, string? statusDescription, System.Threading.CancellationToken cancellationToken); public static System.ArraySegment CreateClientBuffer(int receiveBufferSize, int sendBufferSize) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static System.Net.WebSockets.WebSocket CreateClientWebSocket(System.IO.Stream innerStream, string subProtocol, int receiveBufferSize, int sendBufferSize, System.TimeSpan keepAliveInterval, bool useZeroMaskingKey, System.ArraySegment internalBuffer) { throw null; } + public static System.Net.WebSockets.WebSocket CreateClientWebSocket(System.IO.Stream innerStream, string? subProtocol, int receiveBufferSize, int sendBufferSize, System.TimeSpan keepAliveInterval, bool useZeroMaskingKey, System.ArraySegment internalBuffer) { throw null; } public static System.Net.WebSockets.WebSocket CreateFromStream(System.IO.Stream stream, bool isServer, string? subProtocol, System.TimeSpan keepAliveInterval) { throw null; } public static System.ArraySegment CreateServerBuffer(int receiveBufferSize) { throw null; } public abstract void Dispose(); diff --git a/src/libraries/System.Reflection.TypeExtensions/ref/System.Reflection.TypeExtensions.cs b/src/libraries/System.Reflection.TypeExtensions/ref/System.Reflection.TypeExtensions.cs index 4ca0a30..0f3ffe4 100644 --- a/src/libraries/System.Reflection.TypeExtensions/ref/System.Reflection.TypeExtensions.cs +++ b/src/libraries/System.Reflection.TypeExtensions/ref/System.Reflection.TypeExtensions.cs @@ -28,7 +28,7 @@ namespace System.Reflection } public static partial class MethodInfoExtensions { - public static System.Reflection.MethodInfo? GetBaseDefinition(this System.Reflection.MethodInfo method) { throw null; } + public static System.Reflection.MethodInfo GetBaseDefinition(this System.Reflection.MethodInfo method) { throw null; } } public static partial class ModuleExtensions { diff --git a/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj b/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj index 2be3515..184133a 100644 --- a/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj +++ b/src/libraries/System.Resources.Extensions/ref/System.Resources.Extensions.csproj @@ -1,6 +1,7 @@ netstandard2.0;net461 + enable diff --git a/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj b/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj index 17b4f8e..dc0af1d 100644 --- a/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj +++ b/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj @@ -3,7 +3,7 @@ true netstandard2.0;net461 $(DefineConstants);RESOURCES_EXTENSIONS - annotations + enable destination, out int charsWritten, System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider? provider = null) { throw null; } public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Half result) { throw null; } public static bool TryParse(System.ReadOnlySpan s, out System.Half result) { throw null; } - public static bool TryParse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Half result) { throw null; } - public static bool TryParse(string s, out System.Half result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Half result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out System.Half result) { throw null; } } public partial struct HashCode { diff --git a/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs b/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs index 03c67d6..e4fbe50 100644 --- a/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs +++ b/src/libraries/System.Security.Claims/ref/System.Security.Claims.cs @@ -20,7 +20,7 @@ namespace System.Security.Claims protected virtual byte[]? CustomSerializationData { get { throw null; } } public string Issuer { get { throw null; } } public string OriginalIssuer { get { throw null; } } - public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } public System.Security.Claims.ClaimsIdentity? Subject { get { throw null; } } public string Type { get { throw null; } } public string Value { get { throw null; } } diff --git a/src/libraries/System.Security.Cryptography.Csp/ref/System.Security.Cryptography.Csp.cs b/src/libraries/System.Security.Cryptography.Csp/ref/System.Security.Cryptography.Csp.cs index 35ccd65..ce402e6 100644 --- a/src/libraries/System.Security.Cryptography.Csp/ref/System.Security.Cryptography.Csp.cs +++ b/src/libraries/System.Security.Cryptography.Csp/ref/System.Security.Cryptography.Csp.cs @@ -176,7 +176,7 @@ namespace System.Security.Cryptography { public RNGCryptoServiceProvider() { } public RNGCryptoServiceProvider(byte[] rgb) { } - public RNGCryptoServiceProvider(System.Security.Cryptography.CspParameters cspParams) { } + public RNGCryptoServiceProvider(System.Security.Cryptography.CspParameters? cspParams) { } public RNGCryptoServiceProvider(string str) { } protected override void Dispose(bool disposing) { } public override void GetBytes(byte[] data) { } diff --git a/src/libraries/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.netcoreapp.cs b/src/libraries/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.netcoreapp.cs index 478772d..925be44 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.netcoreapp.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/ref/System.Security.Cryptography.Pkcs.netcoreapp.cs @@ -10,12 +10,12 @@ namespace System.Security.Cryptography.Pkcs { public CmsRecipient(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.RSAEncryptionPadding rsaEncryptionPadding) { } public CmsRecipient(System.Security.Cryptography.Pkcs.SubjectIdentifierType recipientIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.RSAEncryptionPadding rsaEncryptionPadding) { } - public System.Security.Cryptography.RSAEncryptionPadding RSAEncryptionPadding { get { throw null; } } + public System.Security.Cryptography.RSAEncryptionPadding? RSAEncryptionPadding { get { throw null; } } } public sealed partial class CmsSigner { - public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.AsymmetricAlgorithm privateKey) { } - public System.Security.Cryptography.AsymmetricAlgorithm PrivateKey { get { throw null; } set { } } + public CmsSigner(System.Security.Cryptography.Pkcs.SubjectIdentifierType signerIdentifierType, System.Security.Cryptography.X509Certificates.X509Certificate2? certificate, System.Security.Cryptography.AsymmetricAlgorithm? privateKey) { } + public System.Security.Cryptography.AsymmetricAlgorithm? PrivateKey { get { throw null; } set { } } } public sealed partial class ContentInfo { @@ -24,20 +24,20 @@ namespace System.Security.Cryptography.Pkcs public sealed partial class EnvelopedCms { public void Decode(System.ReadOnlySpan encodedMessage) { } - public void Decrypt(System.Security.Cryptography.Pkcs.RecipientInfo recipientInfo, System.Security.Cryptography.AsymmetricAlgorithm privateKey) { } + public void Decrypt(System.Security.Cryptography.Pkcs.RecipientInfo recipientInfo, System.Security.Cryptography.AsymmetricAlgorithm? privateKey) { } } public sealed partial class Pkcs12Builder { public Pkcs12Builder() { } public bool IsSealed { get { throw null; } } - public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, byte[] passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { } + public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, byte[]? passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { } public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, System.ReadOnlySpan passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { } public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters) { } - public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, string password, System.Security.Cryptography.PbeParameters pbeParameters) { } + public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, string? password, System.Security.Cryptography.PbeParameters pbeParameters) { } public void AddSafeContentsUnencrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents) { } public byte[] Encode() { throw null; } public void SealWithMac(System.ReadOnlySpan password, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int iterationCount) { } - public void SealWithMac(string password, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int iterationCount) { } + public void SealWithMac(string? password, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int iterationCount) { } public void SealWithoutIntegrity() { } public bool TryEncode(System.Span destination, out int bytesWritten) { throw null; } } @@ -63,7 +63,7 @@ namespace System.Security.Cryptography.Pkcs public System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode IntegrityMode { get { throw null; } } public static System.Security.Cryptography.Pkcs.Pkcs12Info Decode(System.ReadOnlyMemory encodedBytes, out int bytesConsumed, bool skipCopy = false) { throw null; } public bool VerifyMac(System.ReadOnlySpan password) { throw null; } - public bool VerifyMac(string password) { throw null; } + public bool VerifyMac(string? password) { throw null; } } public enum Pkcs12IntegrityMode { @@ -96,20 +96,20 @@ namespace System.Security.Cryptography.Pkcs public System.Security.Cryptography.Pkcs.Pkcs12SafeContentsBag AddNestedContents(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents) { throw null; } public void AddSafeBag(System.Security.Cryptography.Pkcs.Pkcs12SafeBag safeBag) { } public System.Security.Cryptography.Pkcs.Pkcs12SecretBag AddSecret(System.Security.Cryptography.Oid secretType, System.ReadOnlyMemory secretValue) { throw null; } - public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, byte[] passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; } + public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, byte[]? passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; } public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, System.ReadOnlySpan passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; } public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; } - public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, string password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; } - public void Decrypt(byte[] passwordBytes) { } + public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, string? password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; } + public void Decrypt(byte[]? passwordBytes) { } public void Decrypt(System.ReadOnlySpan passwordBytes) { } public void Decrypt(System.ReadOnlySpan password) { } - public void Decrypt(string password) { } + public void Decrypt(string? password) { } public System.Collections.Generic.IEnumerable GetBags() { throw null; } } public sealed partial class Pkcs12SafeContentsBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag { internal Pkcs12SafeContentsBag() : base (default(string), default(System.ReadOnlyMemory), default(bool)) { } - public System.Security.Cryptography.Pkcs.Pkcs12SafeContents SafeContents { get { throw null; } } + public System.Security.Cryptography.Pkcs.Pkcs12SafeContents? SafeContents { get { throw null; } } } public sealed partial class Pkcs12SecretBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag { @@ -152,19 +152,19 @@ namespace System.Security.Cryptography.Pkcs internal Rfc3161TimestampRequest() { } public bool HasExtensions { get { throw null; } } public System.Security.Cryptography.Oid HashAlgorithmId { get { throw null; } } - public System.Security.Cryptography.Oid RequestedPolicyId { get { throw null; } } + public System.Security.Cryptography.Oid? RequestedPolicyId { get { throw null; } } public bool RequestSignerCertificate { get { throw null; } } public int Version { get { throw null; } } - public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromData(System.ReadOnlySpan data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = null, System.ReadOnlyMemory? nonce = default(System.ReadOnlyMemory?), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; } - public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash(System.ReadOnlyMemory hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = null, System.ReadOnlyMemory? nonce = default(System.ReadOnlyMemory?), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; } - public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash(System.ReadOnlyMemory hash, System.Security.Cryptography.Oid hashAlgorithmId, System.Security.Cryptography.Oid requestedPolicyId = null, System.ReadOnlyMemory? nonce = default(System.ReadOnlyMemory?), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; } - public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromSignerInfo(System.Security.Cryptography.Pkcs.SignerInfo signerInfo, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = null, System.ReadOnlyMemory? nonce = default(System.ReadOnlyMemory?), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; } + public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromData(System.ReadOnlySpan data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid? requestedPolicyId = null, System.ReadOnlyMemory? nonce = default(System.ReadOnlyMemory?), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection? extensions = null) { throw null; } + public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash(System.ReadOnlyMemory hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid? requestedPolicyId = null, System.ReadOnlyMemory? nonce = default(System.ReadOnlyMemory?), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection? extensions = null) { throw null; } + public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash(System.ReadOnlyMemory hash, System.Security.Cryptography.Oid hashAlgorithmId, System.Security.Cryptography.Oid? requestedPolicyId = null, System.ReadOnlyMemory? nonce = default(System.ReadOnlyMemory?), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection? extensions = null) { throw null; } + public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromSignerInfo(System.Security.Cryptography.Pkcs.SignerInfo signerInfo, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid? requestedPolicyId = null, System.ReadOnlyMemory? nonce = default(System.ReadOnlyMemory?), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection? extensions = null) { throw null; } public byte[] Encode() { throw null; } public System.Security.Cryptography.X509Certificates.X509ExtensionCollection GetExtensions() { throw null; } public System.ReadOnlyMemory GetMessageHash() { throw null; } public System.ReadOnlyMemory? GetNonce() { throw null; } public System.Security.Cryptography.Pkcs.Rfc3161TimestampToken ProcessResponse(System.ReadOnlyMemory responseBytes, out int bytesConsumed) { throw null; } - public static bool TryDecode(System.ReadOnlyMemory encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest request, out int bytesConsumed) { throw null; } + public static bool TryDecode(System.ReadOnlyMemory encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest? request, out int bytesConsumed) { throw null; } public bool TryEncode(System.Span destination, out int bytesWritten) { throw null; } } public sealed partial class Rfc3161TimestampToken @@ -172,15 +172,15 @@ namespace System.Security.Cryptography.Pkcs internal Rfc3161TimestampToken() { } public System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo TokenInfo { get { throw null; } } public System.Security.Cryptography.Pkcs.SignedCms AsSignedCms() { throw null; } - public static bool TryDecode(System.ReadOnlyMemory encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampToken token, out int bytesConsumed) { throw null; } - public bool VerifySignatureForData(System.ReadOnlySpan data, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; } - public bool VerifySignatureForHash(System.ReadOnlySpan hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; } - public bool VerifySignatureForHash(System.ReadOnlySpan hash, System.Security.Cryptography.Oid hashAlgorithmId, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; } - public bool VerifySignatureForSignerInfo(System.Security.Cryptography.Pkcs.SignerInfo signerInfo, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; } + public static bool TryDecode(System.ReadOnlyMemory encodedBytes, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Security.Cryptography.Pkcs.Rfc3161TimestampToken? token, out int bytesConsumed) { throw null; } + public bool VerifySignatureForData(System.ReadOnlySpan data, out System.Security.Cryptography.X509Certificates.X509Certificate2? signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection? extraCandidates = null) { throw null; } + public bool VerifySignatureForHash(System.ReadOnlySpan hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out System.Security.Cryptography.X509Certificates.X509Certificate2? signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection? extraCandidates = null) { throw null; } + public bool VerifySignatureForHash(System.ReadOnlySpan hash, System.Security.Cryptography.Oid hashAlgorithmId, out System.Security.Cryptography.X509Certificates.X509Certificate2? signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection? extraCandidates = null) { throw null; } + public bool VerifySignatureForSignerInfo(System.Security.Cryptography.Pkcs.SignerInfo signerInfo, out System.Security.Cryptography.X509Certificates.X509Certificate2? signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection? extraCandidates = null) { throw null; } } public sealed partial class Rfc3161TimestampTokenInfo { - public Rfc3161TimestampTokenInfo(System.Security.Cryptography.Oid policyId, System.Security.Cryptography.Oid hashAlgorithmId, System.ReadOnlyMemory messageHash, System.ReadOnlyMemory serialNumber, System.DateTimeOffset timestamp, long? accuracyInMicroseconds = default(long?), bool isOrdering = false, System.ReadOnlyMemory? nonce = default(System.ReadOnlyMemory?), System.ReadOnlyMemory? timestampAuthorityName = default(System.ReadOnlyMemory?), System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { } + public Rfc3161TimestampTokenInfo(System.Security.Cryptography.Oid policyId, System.Security.Cryptography.Oid hashAlgorithmId, System.ReadOnlyMemory messageHash, System.ReadOnlyMemory serialNumber, System.DateTimeOffset timestamp, long? accuracyInMicroseconds = default(long?), bool isOrdering = false, System.ReadOnlyMemory? nonce = default(System.ReadOnlyMemory?), System.ReadOnlyMemory? timestampAuthorityName = default(System.ReadOnlyMemory?), System.Security.Cryptography.X509Certificates.X509ExtensionCollection? extensions = null) { } public long? AccuracyInMicroseconds { get { throw null; } } public bool HasExtensions { get { throw null; } } public System.Security.Cryptography.Oid HashAlgorithmId { get { throw null; } } @@ -194,7 +194,7 @@ namespace System.Security.Cryptography.Pkcs public System.ReadOnlyMemory? GetNonce() { throw null; } public System.ReadOnlyMemory GetSerialNumber() { throw null; } public System.ReadOnlyMemory? GetTimestampAuthorityName() { throw null; } - public static bool TryDecode(System.ReadOnlyMemory encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo timestampTokenInfo, out int bytesConsumed) { throw null; } + public static bool TryDecode(System.ReadOnlyMemory encodedBytes, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo? timestampTokenInfo, out int bytesConsumed) { throw null; } public bool TryEncode(System.Span destination, out int bytesWritten) { throw null; } } public sealed partial class SignedCms diff --git a/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs b/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs index 3ddd33d..4bff4c4 100644 --- a/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs +++ b/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs @@ -1177,7 +1177,7 @@ namespace System.Security.Principal { claimType = ClaimTypes.WindowsDeviceGroup; Claim claim = new Claim(claimType, groupSid.Value, ClaimValueTypes.String, _issuerName, _issuerName, this); - claim.Properties.Add(ClaimTypes.WindowsSubAuthority, Convert.ToString(groupSid.IdentifierAuthority, CultureInfo.InvariantCulture)); + claim.Properties.Add(ClaimTypes.WindowsSubAuthority, Convert.ToString(groupSid.IdentifierAuthority, CultureInfo.InvariantCulture)!); claim.Properties.Add(claimType, ""); instanceClaims.Add(claim); } @@ -1185,7 +1185,7 @@ namespace System.Security.Principal { claimType = ClaimTypes.DenyOnlyWindowsDeviceGroup; Claim claim = new Claim(claimType, groupSid.Value, ClaimValueTypes.String, _issuerName, _issuerName, this); - claim.Properties.Add(ClaimTypes.WindowsSubAuthority, Convert.ToString(groupSid.IdentifierAuthority, CultureInfo.InvariantCulture)); + claim.Properties.Add(ClaimTypes.WindowsSubAuthority, Convert.ToString(groupSid.IdentifierAuthority, CultureInfo.InvariantCulture)!); claim.Properties.Add(claimType, ""); instanceClaims.Add(claim); } diff --git a/src/libraries/System.Text.Json/ref/System.Text.Json.cs b/src/libraries/System.Text.Json/ref/System.Text.Json.cs index 0e70895..63ba959 100644 --- a/src/libraries/System.Text.Json/ref/System.Text.Json.cs +++ b/src/libraries/System.Text.Json/ref/System.Text.Json.cs @@ -142,8 +142,8 @@ namespace System.Text.Json protected JsonException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public JsonException(string? message) { } public JsonException(string? message, System.Exception? innerException) { } - public JsonException(string? message, string path, long? lineNumber, long? bytePositionInLine) { } - public JsonException(string? message, string path, long? lineNumber, long? bytePositionInLine, System.Exception? innerException) { } + public JsonException(string? message, string? path, long? lineNumber, long? bytePositionInLine) { } + public JsonException(string? message, string? path, long? lineNumber, long? bytePositionInLine, System.Exception? innerException) { } public long? BytePositionInLine { get { throw null; } } public long? LineNumber { get { throw null; } } public override string Message { get { throw null; } } @@ -491,7 +491,7 @@ namespace System.Text.Json.Serialization public abstract partial class JsonConverterFactory : System.Text.Json.Serialization.JsonConverter { protected JsonConverterFactory() { } - public abstract System.Text.Json.Serialization.JsonConverter CreateConverter(System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options); + public abstract System.Text.Json.Serialization.JsonConverter? CreateConverter(System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options); } public abstract partial class JsonConverter : System.Text.Json.Serialization.JsonConverter { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/JsonException.cs b/src/libraries/System.Text.Json/src/System/Text/Json/JsonException.cs index 9ba90f9..75b2333 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/JsonException.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/JsonException.cs @@ -26,7 +26,7 @@ namespace System.Text.Json /// /// Note that the counts the number of bytes (i.e. UTF-8 code units) and not characters or scalars. /// - public JsonException(string? message, string path, long? lineNumber, long? bytePositionInLine, Exception? innerException) : base(message, innerException) + public JsonException(string? message, string? path, long? lineNumber, long? bytePositionInLine, Exception? innerException) : base(message, innerException) { _message = message; LineNumber = lineNumber; diff --git a/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs b/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs index e048a2e..4045349 100644 --- a/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs +++ b/src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs @@ -155,8 +155,8 @@ namespace System.Text.RegularExpressions public System.Text.RegularExpressions.RegexOptions Options { get { throw null; } } public bool RightToLeft { get { throw null; } } public static void CompileToAssembly(System.Text.RegularExpressions.RegexCompilationInfo[] regexinfos, System.Reflection.AssemblyName assemblyname) { } - public static void CompileToAssembly(System.Text.RegularExpressions.RegexCompilationInfo[] regexinfos, System.Reflection.AssemblyName assemblyname, System.Reflection.Emit.CustomAttributeBuilder[] attributes) { } - public static void CompileToAssembly(System.Text.RegularExpressions.RegexCompilationInfo[] regexinfos, System.Reflection.AssemblyName assemblyname, System.Reflection.Emit.CustomAttributeBuilder[] attributes, string resourceFile) { } + public static void CompileToAssembly(System.Text.RegularExpressions.RegexCompilationInfo[] regexinfos, System.Reflection.AssemblyName assemblyname, System.Reflection.Emit.CustomAttributeBuilder[]? attributes) { } + public static void CompileToAssembly(System.Text.RegularExpressions.RegexCompilationInfo[] regexinfos, System.Reflection.AssemblyName assemblyname, System.Reflection.Emit.CustomAttributeBuilder[]? attributes, string? resourceFile) { } public static string Escape(string str) { throw null; } public string[] GetGroupNames() { throw null; } public int[] GetGroupNumbers() { throw null; } -- 2.7.4