diff --git a/src/libraries/Common/src/System/Data/ProviderBase/DbReferenceCollection.cs b/src/libraries/Common/src/System/Data/ProviderBase/DbReferenceCollection.cs index 8d7aa930bcc6c3..8f23336268ba92 100644 --- a/src/libraries/Common/src/System/Data/ProviderBase/DbReferenceCollection.cs +++ b/src/libraries/Common/src/System/Data/ProviderBase/DbReferenceCollection.cs @@ -40,7 +40,7 @@ public void RemoveTarget() _tag = 0; } - public bool HasTarget + public readonly bool HasTarget { get { @@ -48,7 +48,7 @@ public bool HasTarget } } - public int Tag + public readonly int Tag { get { @@ -56,7 +56,7 @@ public int Tag } } - public object? Target + public readonly object? Target { get { 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 28821d99590ddf..4ebb391aa207fb 100644 --- a/src/libraries/System.Data.Common/ref/System.Data.Common.cs +++ b/src/libraries/System.Data.Common/ref/System.Data.Common.cs @@ -2579,17 +2579,17 @@ public partial struct SqlBinary : System.Data.SqlTypes.INullable, System.ICompar private int _dummyPrimitive; public static readonly System.Data.SqlTypes.SqlBinary Null; public SqlBinary(byte[]? value) { throw null; } - public bool IsNull { get { throw null; } } - public byte this[int index] { get { throw null; } } - public int Length { get { throw null; } } - public byte[] Value { get { throw null; } } + public readonly bool IsNull { get { throw null; } } + public readonly byte this[int index] { get { throw null; } } + public readonly int Length { get { throw null; } } + public readonly byte[] Value { get { throw null; } } public static System.Data.SqlTypes.SqlBinary Add(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) { throw null; } - public int CompareTo(System.Data.SqlTypes.SqlBinary value) { throw null; } - public int CompareTo(object? value) { throw null; } + public readonly int CompareTo(System.Data.SqlTypes.SqlBinary value) { throw null; } + public readonly int CompareTo(object? value) { throw null; } public static System.Data.SqlTypes.SqlBinary Concat(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) { throw null; } public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) { throw null; } - public override bool Equals(object? value) { throw null; } - public override int GetHashCode() { throw null; } + public override readonly bool Equals(object? value) { throw null; } + public override readonly int GetHashCode() { throw null; } public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) { throw null; } @@ -2606,11 +2606,11 @@ public partial struct SqlBinary : System.Data.SqlTypes.INullable, System.ICompar public static System.Data.SqlTypes.SqlBoolean operator !=(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) { throw null; } public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) { throw null; } public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlBinary x, System.Data.SqlTypes.SqlBinary y) { throw null; } - System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } + readonly System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) { } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } - public System.Data.SqlTypes.SqlGuid ToSqlGuid() { throw null; } - public override string ToString() { throw null; } + public readonly System.Data.SqlTypes.SqlGuid ToSqlGuid() { throw null; } + public override readonly string ToString() { throw null; } } [System.Xml.Serialization.XmlSchemaProviderAttribute("GetXsdType")] public partial struct SqlBoolean : System.Data.SqlTypes.INullable, System.IComparable, System.Xml.Serialization.IXmlSerializable @@ -2623,17 +2623,17 @@ public partial struct SqlBoolean : System.Data.SqlTypes.INullable, System.ICompa public static readonly System.Data.SqlTypes.SqlBoolean Zero; public SqlBoolean(bool value) { throw null; } public SqlBoolean(int value) { throw null; } - public byte ByteValue { get { throw null; } } - public bool IsFalse { get { throw null; } } - public bool IsNull { get { throw null; } } - public bool IsTrue { get { throw null; } } - public bool Value { get { throw null; } } + public readonly byte ByteValue { get { throw null; } } + public readonly bool IsFalse { get { throw null; } } + public readonly bool IsNull { get { throw null; } } + public readonly bool IsTrue { get { throw null; } } + public readonly bool Value { get { throw null; } } public static System.Data.SqlTypes.SqlBoolean And(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) { throw null; } - public int CompareTo(System.Data.SqlTypes.SqlBoolean value) { throw null; } - public int CompareTo(object? value) { throw null; } + public readonly int CompareTo(System.Data.SqlTypes.SqlBoolean value) { throw null; } + public readonly int CompareTo(object? value) { throw null; } public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) { throw null; } - public override bool Equals(object? value) { throw null; } - public override int GetHashCode() { throw null; } + public override readonly bool Equals(object? value) { throw null; } + public override readonly int GetHashCode() { throw null; } public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEquals(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) { throw null; } @@ -2667,19 +2667,19 @@ public partial struct SqlBoolean : System.Data.SqlTypes.INullable, System.ICompa public static bool operator true(System.Data.SqlTypes.SqlBoolean x) { throw null; } public static System.Data.SqlTypes.SqlBoolean Or(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) { throw null; } public static System.Data.SqlTypes.SqlBoolean Parse(string s) { throw null; } - System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } + readonly System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) { } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } - public System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } - public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } - public System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } - public System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } - public System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } - public System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } - public System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } - public System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } - public System.Data.SqlTypes.SqlString ToSqlString() { throw null; } - public override string ToString() { throw null; } + public readonly System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } + public readonly System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } + public readonly System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } + public readonly System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } + public readonly System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } + public readonly System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } + public readonly System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } + public readonly System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } + public readonly System.Data.SqlTypes.SqlString ToSqlString() { throw null; } + public override readonly string ToString() { throw null; } public static System.Data.SqlTypes.SqlBoolean Xor(System.Data.SqlTypes.SqlBoolean x, System.Data.SqlTypes.SqlBoolean y) { throw null; } } [System.Xml.Serialization.XmlSchemaProviderAttribute("GetXsdType")] @@ -2691,17 +2691,17 @@ public partial struct SqlByte : System.Data.SqlTypes.INullable, System.IComparab public static readonly System.Data.SqlTypes.SqlByte Null; public static readonly System.Data.SqlTypes.SqlByte Zero; public SqlByte(byte value) { throw null; } - public bool IsNull { get { throw null; } } - public byte Value { get { throw null; } } + public readonly bool IsNull { get { throw null; } } + public readonly byte Value { get { throw null; } } public static System.Data.SqlTypes.SqlByte Add(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) { throw null; } public static System.Data.SqlTypes.SqlByte BitwiseAnd(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) { throw null; } public static System.Data.SqlTypes.SqlByte BitwiseOr(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) { throw null; } - public int CompareTo(System.Data.SqlTypes.SqlByte value) { throw null; } - public int CompareTo(object? value) { throw null; } + public readonly int CompareTo(System.Data.SqlTypes.SqlByte value) { throw null; } + public readonly int CompareTo(object? value) { throw null; } public static System.Data.SqlTypes.SqlByte Divide(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) { throw null; } public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) { throw null; } - public override bool Equals(object? value) { throw null; } - public override int GetHashCode() { throw null; } + public override readonly bool Equals(object? value) { throw null; } + public override readonly int GetHashCode() { throw null; } public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) { throw null; } @@ -2740,19 +2740,19 @@ public partial struct SqlByte : System.Data.SqlTypes.INullable, System.IComparab public static System.Data.SqlTypes.SqlByte operator -(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) { throw null; } public static System.Data.SqlTypes.SqlByte Parse(string s) { throw null; } public static System.Data.SqlTypes.SqlByte Subtract(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) { throw null; } - System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } + readonly System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) { } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } - public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } - public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } - public System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } - public System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } - public System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } - public System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } - public System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } - public System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } - public System.Data.SqlTypes.SqlString ToSqlString() { throw null; } - public override string ToString() { throw null; } + public readonly System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } + public readonly System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } + public readonly System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } + public readonly System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } + public readonly System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } + public readonly System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } + public readonly System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } + public readonly System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } + public readonly System.Data.SqlTypes.SqlString ToSqlString() { throw null; } + public override readonly string ToString() { throw null; } public static System.Data.SqlTypes.SqlByte Xor(System.Data.SqlTypes.SqlByte x, System.Data.SqlTypes.SqlByte y) { throw null; } } [System.Xml.Serialization.XmlSchemaProviderAttribute("GetXsdType")] @@ -2838,16 +2838,16 @@ public partial struct SqlDateTime : System.Data.SqlTypes.INullable, System.IComp public SqlDateTime(int year, int month, int day, int hour, int minute, int second) { throw null; } public SqlDateTime(int year, int month, int day, int hour, int minute, int second, double millisecond) { throw null; } public SqlDateTime(int year, int month, int day, int hour, int minute, int second, int bilisecond) { throw null; } - public int DayTicks { get { throw null; } } - public bool IsNull { get { throw null; } } - public int TimeTicks { get { throw null; } } - public System.DateTime Value { get { throw null; } } + public readonly int DayTicks { get { throw null; } } + public readonly bool IsNull { get { throw null; } } + public readonly int TimeTicks { get { throw null; } } + public readonly System.DateTime Value { get { throw null; } } public static System.Data.SqlTypes.SqlDateTime Add(System.Data.SqlTypes.SqlDateTime x, System.TimeSpan t) { throw null; } - public int CompareTo(System.Data.SqlTypes.SqlDateTime value) { throw null; } - public int CompareTo(object? value) { throw null; } + public readonly int CompareTo(System.Data.SqlTypes.SqlDateTime value) { throw null; } + public readonly int CompareTo(object? value) { throw null; } public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlDateTime x, System.Data.SqlTypes.SqlDateTime y) { throw null; } - public override bool Equals(object? value) { throw null; } - public override int GetHashCode() { throw null; } + public override readonly bool Equals(object? value) { throw null; } + public override readonly int GetHashCode() { throw null; } public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlDateTime x, System.Data.SqlTypes.SqlDateTime y) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlDateTime x, System.Data.SqlTypes.SqlDateTime y) { throw null; } @@ -2867,10 +2867,10 @@ public partial struct SqlDateTime : System.Data.SqlTypes.INullable, System.IComp public static System.Data.SqlTypes.SqlDateTime operator -(System.Data.SqlTypes.SqlDateTime x, System.TimeSpan t) { throw null; } public static System.Data.SqlTypes.SqlDateTime Parse(string s) { throw null; } public static System.Data.SqlTypes.SqlDateTime Subtract(System.Data.SqlTypes.SqlDateTime x, System.TimeSpan t) { throw null; } - System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } + readonly System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) { } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } - public System.Data.SqlTypes.SqlString ToSqlString() { throw null; } + public readonly System.Data.SqlTypes.SqlString ToSqlString() { throw null; } public override string ToString() { throw null; } } [System.Xml.Serialization.XmlSchemaProviderAttribute("GetXsdType")] @@ -2889,24 +2889,24 @@ public partial struct SqlDecimal : System.Data.SqlTypes.INullable, System.ICompa public SqlDecimal(int value) { throw null; } public SqlDecimal(long value) { throw null; } public byte[] BinData { get { throw null; } } - public int[] Data { get { throw null; } } - public bool IsNull { get { throw null; } } - public bool IsPositive { get { throw null; } } - public byte Precision { get { throw null; } } - public byte Scale { get { throw null; } } - public decimal Value { get { throw null; } } + public readonly int[] Data { get { throw null; } } + public readonly bool IsNull { get { throw null; } } + public readonly bool IsPositive { get { throw null; } } + public readonly byte Precision { get { throw null; } } + public readonly byte Scale { get { throw null; } } + public readonly decimal Value { get { throw null; } } public static System.Data.SqlTypes.SqlDecimal Abs(System.Data.SqlTypes.SqlDecimal n) { throw null; } public static System.Data.SqlTypes.SqlDecimal Add(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) { throw null; } public static System.Data.SqlTypes.SqlDecimal AdjustScale(System.Data.SqlTypes.SqlDecimal n, int digits, bool fRound) { throw null; } public static System.Data.SqlTypes.SqlDecimal Ceiling(System.Data.SqlTypes.SqlDecimal n) { throw null; } - public int CompareTo(System.Data.SqlTypes.SqlDecimal value) { throw null; } - public int CompareTo(object? value) { throw null; } + public readonly int CompareTo(System.Data.SqlTypes.SqlDecimal value) { throw null; } + public readonly int CompareTo(object? value) { throw null; } public static System.Data.SqlTypes.SqlDecimal ConvertToPrecScale(System.Data.SqlTypes.SqlDecimal n, int precision, int scale) { throw null; } public static System.Data.SqlTypes.SqlDecimal Divide(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) { throw null; } public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) { throw null; } - public override bool Equals(object? value) { throw null; } + public override readonly bool Equals(object? value) { throw null; } public static System.Data.SqlTypes.SqlDecimal Floor(System.Data.SqlTypes.SqlDecimal n) { throw null; } - public override int GetHashCode() { throw null; } + public override readonly int GetHashCode() { throw null; } public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) { throw null; } @@ -2943,19 +2943,19 @@ public partial struct SqlDecimal : System.Data.SqlTypes.INullable, System.ICompa public static System.Data.SqlTypes.SqlDecimal Round(System.Data.SqlTypes.SqlDecimal n, int position) { throw null; } public static System.Data.SqlTypes.SqlInt32 Sign(System.Data.SqlTypes.SqlDecimal n) { throw null; } public static System.Data.SqlTypes.SqlDecimal Subtract(System.Data.SqlTypes.SqlDecimal x, System.Data.SqlTypes.SqlDecimal y) { throw null; } - System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } + readonly System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) { } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } - public double ToDouble() { throw null; } - public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } - public System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } - public System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } - public System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } - public System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } - public System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } - public System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } - public System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } - public System.Data.SqlTypes.SqlString ToSqlString() { throw null; } + public readonly double ToDouble() { throw null; } + public readonly System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } + public readonly System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } + public readonly System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } + public readonly System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } + public readonly System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } + public readonly System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } + public readonly System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } + public readonly System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } + public readonly System.Data.SqlTypes.SqlString ToSqlString() { throw null; } public override string ToString() { throw null; } public static System.Data.SqlTypes.SqlDecimal Truncate(System.Data.SqlTypes.SqlDecimal n, int position) { throw null; } } @@ -2968,15 +2968,15 @@ public partial struct SqlDouble : System.Data.SqlTypes.INullable, System.ICompar public static readonly System.Data.SqlTypes.SqlDouble Null; public static readonly System.Data.SqlTypes.SqlDouble Zero; public SqlDouble(double value) { throw null; } - public bool IsNull { get { throw null; } } - public double Value { get { throw null; } } + public readonly bool IsNull { get { throw null; } } + public readonly double Value { get { throw null; } } public static System.Data.SqlTypes.SqlDouble Add(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) { throw null; } - public int CompareTo(System.Data.SqlTypes.SqlDouble value) { throw null; } - public int CompareTo(object? value) { throw null; } + public readonly int CompareTo(System.Data.SqlTypes.SqlDouble value) { throw null; } + public readonly int CompareTo(object? value) { throw null; } public static System.Data.SqlTypes.SqlDouble Divide(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) { throw null; } public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) { throw null; } - public override bool Equals(object? value) { throw null; } - public override int GetHashCode() { throw null; } + public override readonly bool Equals(object? value) { throw null; } + public override readonly int GetHashCode() { throw null; } public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) { throw null; } @@ -3008,19 +3008,19 @@ public partial struct SqlDouble : System.Data.SqlTypes.INullable, System.ICompar public static System.Data.SqlTypes.SqlDouble operator -(System.Data.SqlTypes.SqlDouble x) { throw null; } public static System.Data.SqlTypes.SqlDouble Parse(string s) { throw null; } public static System.Data.SqlTypes.SqlDouble Subtract(System.Data.SqlTypes.SqlDouble x, System.Data.SqlTypes.SqlDouble y) { throw null; } - System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } + readonly System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) { } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } - public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } - public System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } - public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } - public System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } - public System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } - public System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } - public System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } - public System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } - public System.Data.SqlTypes.SqlString ToSqlString() { throw null; } - public override string ToString() { throw null; } + public readonly System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } + public readonly System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } + public readonly System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } + public readonly System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } + public readonly System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } + public readonly System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } + public readonly System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } + public readonly System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } + public readonly System.Data.SqlTypes.SqlString ToSqlString() { throw null; } + public override readonly string ToString() { throw null; } } [System.Xml.Serialization.XmlSchemaProviderAttribute("GetXsdType")] public partial struct SqlGuid : System.Data.SqlTypes.INullable, System.IComparable, System.Xml.Serialization.IXmlSerializable @@ -3032,13 +3032,13 @@ public partial struct SqlGuid : System.Data.SqlTypes.INullable, System.IComparab public SqlGuid(System.Guid g) { throw null; } public SqlGuid(int a, short b, short c, byte d, byte e, byte f, byte g, byte h, byte i, byte j, byte k) { throw null; } public SqlGuid(string s) { throw null; } - public bool IsNull { get { throw null; } } - public System.Guid Value { get { throw null; } } - public int CompareTo(System.Data.SqlTypes.SqlGuid value) { throw null; } - public int CompareTo(object? value) { throw null; } + public readonly bool IsNull { get { throw null; } } + public readonly System.Guid Value { get { throw null; } } + public readonly int CompareTo(System.Data.SqlTypes.SqlGuid value) { throw null; } + public readonly int CompareTo(object? value) { throw null; } public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) { throw null; } - public override bool Equals(object? value) { throw null; } - public override int GetHashCode() { throw null; } + public override readonly bool Equals(object? value) { throw null; } + public override readonly int GetHashCode() { throw null; } public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) { throw null; } @@ -3056,13 +3056,13 @@ public partial struct SqlGuid : System.Data.SqlTypes.INullable, System.IComparab public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) { throw null; } public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlGuid x, System.Data.SqlTypes.SqlGuid y) { throw null; } public static System.Data.SqlTypes.SqlGuid Parse(string s) { throw null; } - System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } + readonly System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) { } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } - public byte[]? ToByteArray() { throw null; } - public System.Data.SqlTypes.SqlBinary ToSqlBinary() { throw null; } - public System.Data.SqlTypes.SqlString ToSqlString() { throw null; } - public override string ToString() { throw null; } + public readonly byte[]? ToByteArray() { throw null; } + public readonly System.Data.SqlTypes.SqlBinary ToSqlBinary() { throw null; } + public readonly System.Data.SqlTypes.SqlString ToSqlString() { throw null; } + public override readonly string ToString() { throw null; } } [System.Xml.Serialization.XmlSchemaProviderAttribute("GetXsdType")] public partial struct SqlInt16 : System.Data.SqlTypes.INullable, System.IComparable, System.Xml.Serialization.IXmlSerializable @@ -3073,17 +3073,17 @@ public partial struct SqlInt16 : System.Data.SqlTypes.INullable, System.ICompara public static readonly System.Data.SqlTypes.SqlInt16 Null; public static readonly System.Data.SqlTypes.SqlInt16 Zero; public SqlInt16(short value) { throw null; } - public bool IsNull { get { throw null; } } - public short Value { get { throw null; } } + public readonly bool IsNull { get { throw null; } } + public readonly short Value { get { throw null; } } public static System.Data.SqlTypes.SqlInt16 Add(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) { throw null; } public static System.Data.SqlTypes.SqlInt16 BitwiseAnd(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) { throw null; } public static System.Data.SqlTypes.SqlInt16 BitwiseOr(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) { throw null; } - public int CompareTo(System.Data.SqlTypes.SqlInt16 value) { throw null; } - public int CompareTo(object? value) { throw null; } + public readonly int CompareTo(System.Data.SqlTypes.SqlInt16 value) { throw null; } + public readonly int CompareTo(object? value) { throw null; } public static System.Data.SqlTypes.SqlInt16 Divide(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) { throw null; } public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) { throw null; } - public override bool Equals(object? value) { throw null; } - public override int GetHashCode() { throw null; } + public override readonly bool Equals(object? value) { throw null; } + public override readonly int GetHashCode() { throw null; } public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) { throw null; } @@ -3123,19 +3123,19 @@ public partial struct SqlInt16 : System.Data.SqlTypes.INullable, System.ICompara public static System.Data.SqlTypes.SqlInt16 operator -(System.Data.SqlTypes.SqlInt16 x) { throw null; } public static System.Data.SqlTypes.SqlInt16 Parse(string s) { throw null; } public static System.Data.SqlTypes.SqlInt16 Subtract(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) { throw null; } - System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } + readonly System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) { } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } - public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } - public System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } - public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } - public System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } - public System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } - public System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } - public System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } - public System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } - public System.Data.SqlTypes.SqlString ToSqlString() { throw null; } - public override string ToString() { throw null; } + public readonly System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } + public readonly System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } + public readonly System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } + public readonly System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } + public readonly System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } + public readonly System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } + public readonly System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } + public readonly System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } + public readonly System.Data.SqlTypes.SqlString ToSqlString() { throw null; } + public override readonly string ToString() { throw null; } public static System.Data.SqlTypes.SqlInt16 Xor(System.Data.SqlTypes.SqlInt16 x, System.Data.SqlTypes.SqlInt16 y) { throw null; } } [System.Xml.Serialization.XmlSchemaProviderAttribute("GetXsdType")] @@ -3147,17 +3147,17 @@ public partial struct SqlInt32 : System.Data.SqlTypes.INullable, System.ICompara public static readonly System.Data.SqlTypes.SqlInt32 Null; public static readonly System.Data.SqlTypes.SqlInt32 Zero; public SqlInt32(int value) { throw null; } - public bool IsNull { get { throw null; } } - public int Value { get { throw null; } } + public readonly bool IsNull { get { throw null; } } + public readonly int Value { get { throw null; } } public static System.Data.SqlTypes.SqlInt32 Add(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) { throw null; } public static System.Data.SqlTypes.SqlInt32 BitwiseAnd(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) { throw null; } public static System.Data.SqlTypes.SqlInt32 BitwiseOr(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) { throw null; } - public int CompareTo(System.Data.SqlTypes.SqlInt32 value) { throw null; } - public int CompareTo(object? value) { throw null; } + public readonly int CompareTo(System.Data.SqlTypes.SqlInt32 value) { throw null; } + public readonly int CompareTo(object? value) { throw null; } public static System.Data.SqlTypes.SqlInt32 Divide(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) { throw null; } public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) { throw null; } - public override bool Equals(object? value) { throw null; } - public override int GetHashCode() { throw null; } + public override readonly bool Equals(object? value) { throw null; } + public override readonly int GetHashCode() { throw null; } public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) { throw null; } @@ -3197,19 +3197,19 @@ public partial struct SqlInt32 : System.Data.SqlTypes.INullable, System.ICompara public static System.Data.SqlTypes.SqlInt32 operator -(System.Data.SqlTypes.SqlInt32 x) { throw null; } public static System.Data.SqlTypes.SqlInt32 Parse(string s) { throw null; } public static System.Data.SqlTypes.SqlInt32 Subtract(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) { throw null; } - System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } + readonly System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) { } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } - public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } - public System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } - public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } - public System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } - public System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } - public System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } - public System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } - public System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } - public System.Data.SqlTypes.SqlString ToSqlString() { throw null; } - public override string ToString() { throw null; } + public readonly System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } + public readonly System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } + public readonly System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } + public readonly System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } + public readonly System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } + public readonly System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } + public readonly System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } + public readonly System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } + public readonly System.Data.SqlTypes.SqlString ToSqlString() { throw null; } + public override readonly string ToString() { throw null; } public static System.Data.SqlTypes.SqlInt32 Xor(System.Data.SqlTypes.SqlInt32 x, System.Data.SqlTypes.SqlInt32 y) { throw null; } } [System.Xml.Serialization.XmlSchemaProviderAttribute("GetXsdType")] @@ -3221,17 +3221,17 @@ public partial struct SqlInt64 : System.Data.SqlTypes.INullable, System.ICompara public static readonly System.Data.SqlTypes.SqlInt64 Null; public static readonly System.Data.SqlTypes.SqlInt64 Zero; public SqlInt64(long value) { throw null; } - public bool IsNull { get { throw null; } } - public long Value { get { throw null; } } + public readonly bool IsNull { get { throw null; } } + public readonly long Value { get { throw null; } } public static System.Data.SqlTypes.SqlInt64 Add(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) { throw null; } public static System.Data.SqlTypes.SqlInt64 BitwiseAnd(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) { throw null; } public static System.Data.SqlTypes.SqlInt64 BitwiseOr(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) { throw null; } - public int CompareTo(System.Data.SqlTypes.SqlInt64 value) { throw null; } - public int CompareTo(object? value) { throw null; } + public readonly int CompareTo(System.Data.SqlTypes.SqlInt64 value) { throw null; } + public readonly int CompareTo(object? value) { throw null; } public static System.Data.SqlTypes.SqlInt64 Divide(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) { throw null; } public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) { throw null; } - public override bool Equals(object? value) { throw null; } - public override int GetHashCode() { throw null; } + public override readonly bool Equals(object? value) { throw null; } + public override readonly int GetHashCode() { throw null; } public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) { throw null; } @@ -3271,19 +3271,19 @@ public partial struct SqlInt64 : System.Data.SqlTypes.INullable, System.ICompara public static System.Data.SqlTypes.SqlInt64 operator -(System.Data.SqlTypes.SqlInt64 x) { throw null; } public static System.Data.SqlTypes.SqlInt64 Parse(string s) { throw null; } public static System.Data.SqlTypes.SqlInt64 Subtract(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) { throw null; } - System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } + readonly System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) { } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } - public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } - public System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } - public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } - public System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } - public System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } - public System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } - public System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } - public System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } - public System.Data.SqlTypes.SqlString ToSqlString() { throw null; } - public override string ToString() { throw null; } + public readonly System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } + public readonly System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } + public readonly System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } + public readonly System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } + public readonly System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } + public readonly System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } + public readonly System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } + public readonly System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } + public readonly System.Data.SqlTypes.SqlString ToSqlString() { throw null; } + public override readonly string ToString() { throw null; } public static System.Data.SqlTypes.SqlInt64 Xor(System.Data.SqlTypes.SqlInt64 x, System.Data.SqlTypes.SqlInt64 y) { throw null; } } [System.Xml.Serialization.XmlSchemaProviderAttribute("GetXsdType")] @@ -3298,15 +3298,15 @@ public partial struct SqlMoney : System.Data.SqlTypes.INullable, System.ICompara public SqlMoney(double value) { throw null; } public SqlMoney(int value) { throw null; } public SqlMoney(long value) { throw null; } - public bool IsNull { get { throw null; } } - public decimal Value { get { throw null; } } + public readonly bool IsNull { get { throw null; } } + public readonly decimal Value { get { throw null; } } public static System.Data.SqlTypes.SqlMoney Add(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) { throw null; } - public int CompareTo(System.Data.SqlTypes.SqlMoney value) { throw null; } - public int CompareTo(object? value) { throw null; } + public readonly int CompareTo(System.Data.SqlTypes.SqlMoney value) { throw null; } + public readonly int CompareTo(object? value) { throw null; } public static System.Data.SqlTypes.SqlMoney Divide(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) { throw null; } public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) { throw null; } - public override bool Equals(object? value) { throw null; } - public override int GetHashCode() { throw null; } + public override readonly bool Equals(object? value) { throw null; } + public override readonly int GetHashCode() { throw null; } public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) { throw null; } @@ -3340,23 +3340,23 @@ public partial struct SqlMoney : System.Data.SqlTypes.INullable, System.ICompara public static System.Data.SqlTypes.SqlMoney operator -(System.Data.SqlTypes.SqlMoney x) { throw null; } public static System.Data.SqlTypes.SqlMoney Parse(string s) { throw null; } public static System.Data.SqlTypes.SqlMoney Subtract(System.Data.SqlTypes.SqlMoney x, System.Data.SqlTypes.SqlMoney y) { throw null; } - System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } + readonly System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) { } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } - public decimal ToDecimal() { throw null; } - public double ToDouble() { throw null; } - public int ToInt32() { throw null; } - public long ToInt64() { throw null; } - public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } - public System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } - public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } - public System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } - public System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } - public System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } - public System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } - public System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } - public System.Data.SqlTypes.SqlString ToSqlString() { throw null; } - public override string ToString() { throw null; } + public readonly decimal ToDecimal() { throw null; } + public readonly double ToDouble() { throw null; } + public readonly int ToInt32() { throw null; } + public readonly long ToInt64() { throw null; } + public readonly System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } + public readonly System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } + public readonly System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } + public readonly System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } + public readonly System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } + public readonly System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } + public readonly System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } + public readonly System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } + public readonly System.Data.SqlTypes.SqlString ToSqlString() { throw null; } + public override readonly string ToString() { throw null; } } public sealed partial class SqlNotFilledException : System.Data.SqlTypes.SqlTypeException { @@ -3380,15 +3380,15 @@ public partial struct SqlSingle : System.Data.SqlTypes.INullable, System.ICompar public static readonly System.Data.SqlTypes.SqlSingle Zero; public SqlSingle(double value) { throw null; } public SqlSingle(float value) { throw null; } - public bool IsNull { get { throw null; } } - public float Value { get { throw null; } } + public readonly bool IsNull { get { throw null; } } + public readonly float Value { get { throw null; } } public static System.Data.SqlTypes.SqlSingle Add(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) { throw null; } - public int CompareTo(System.Data.SqlTypes.SqlSingle value) { throw null; } - public int CompareTo(object? value) { throw null; } + public readonly int CompareTo(System.Data.SqlTypes.SqlSingle value) { throw null; } + public readonly int CompareTo(object? value) { throw null; } public static System.Data.SqlTypes.SqlSingle Divide(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) { throw null; } public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) { throw null; } - public override bool Equals(object? value) { throw null; } - public override int GetHashCode() { throw null; } + public override readonly bool Equals(object? value) { throw null; } + public override readonly int GetHashCode() { throw null; } public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) { throw null; } @@ -3420,19 +3420,19 @@ public partial struct SqlSingle : System.Data.SqlTypes.INullable, System.ICompar public static System.Data.SqlTypes.SqlSingle operator -(System.Data.SqlTypes.SqlSingle x) { throw null; } public static System.Data.SqlTypes.SqlSingle Parse(string s) { throw null; } public static System.Data.SqlTypes.SqlSingle Subtract(System.Data.SqlTypes.SqlSingle x, System.Data.SqlTypes.SqlSingle y) { throw null; } - System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } + readonly System.Xml.Schema.XmlSchema? System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) { } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } - public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } - public System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } - public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } - public System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } - public System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } - public System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } - public System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } - public System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } - public System.Data.SqlTypes.SqlString ToSqlString() { throw null; } - public override string ToString() { throw null; } + public readonly System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } + public readonly System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } + public readonly System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } + public readonly System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } + public readonly System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } + public readonly System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } + public readonly System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } + public readonly System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } + public readonly System.Data.SqlTypes.SqlString ToSqlString() { throw null; } + public override readonly string ToString() { throw null; } } [System.Xml.Serialization.XmlSchemaProviderAttribute("GetXsdType")] public partial struct SqlString : System.Data.SqlTypes.INullable, System.IComparable, System.Xml.Serialization.IXmlSerializable @@ -3454,22 +3454,22 @@ public partial struct SqlString : System.Data.SqlTypes.INullable, System.ICompar public SqlString(string? data, int lcid) { throw null; } public SqlString(string? data, int lcid, System.Data.SqlTypes.SqlCompareOptions compareOptions) { throw null; } public System.Globalization.CompareInfo CompareInfo { get { throw null; } } - public System.Globalization.CultureInfo CultureInfo { get { throw null; } } - public bool IsNull { get { throw null; } } - public int LCID { get { throw null; } } - public System.Data.SqlTypes.SqlCompareOptions SqlCompareOptions { get { throw null; } } - public string Value { get { throw null; } } + public readonly System.Globalization.CultureInfo CultureInfo { get { throw null; } } + public readonly bool IsNull { get { throw null; } } + public readonly int LCID { get { throw null; } } + public readonly System.Data.SqlTypes.SqlCompareOptions SqlCompareOptions { get { throw null; } } + public readonly string Value { get { throw null; } } public static System.Data.SqlTypes.SqlString Add(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) { throw null; } - public System.Data.SqlTypes.SqlString Clone() { throw null; } + public readonly System.Data.SqlTypes.SqlString Clone() { throw null; } public static System.Globalization.CompareOptions CompareOptionsFromSqlCompareOptions(System.Data.SqlTypes.SqlCompareOptions compareOptions) { throw null; } - public int CompareTo(System.Data.SqlTypes.SqlString value) { throw null; } + public readonly int CompareTo(System.Data.SqlTypes.SqlString value) { throw null; } public int CompareTo(object? value) { throw null; } public static System.Data.SqlTypes.SqlString Concat(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) { throw null; } public static System.Data.SqlTypes.SqlBoolean Equals(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) { throw null; } - public override bool Equals(object? value) { throw null; } + public override readonly bool Equals(object? value) { throw null; } public override int GetHashCode() { throw null; } - public byte[]? GetNonUnicodeBytes() { throw null; } - public byte[]? GetUnicodeBytes() { throw null; } + public readonly byte[]? GetNonUnicodeBytes() { throw null; } + public readonly byte[]? GetUnicodeBytes() { throw null; } public static System.Xml.XmlQualifiedName GetXsdType(System.Xml.Schema.XmlSchemaSet schemaSet) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThan(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) { throw null; } public static System.Data.SqlTypes.SqlBoolean GreaterThanOrEqual(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) { throw null; } @@ -3496,21 +3496,21 @@ public partial struct SqlString : System.Data.SqlTypes.INullable, System.ICompar public static System.Data.SqlTypes.SqlBoolean operator !=(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) { throw null; } public static System.Data.SqlTypes.SqlBoolean operator <(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) { throw null; } public static System.Data.SqlTypes.SqlBoolean operator <=(System.Data.SqlTypes.SqlString x, System.Data.SqlTypes.SqlString y) { throw null; } - System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } + readonly System.Xml.Schema.XmlSchema System.Xml.Serialization.IXmlSerializable.GetSchema() { throw null; } void System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader reader) { } void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { } - public System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } - public System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } - public System.Data.SqlTypes.SqlDateTime ToSqlDateTime() { throw null; } - public System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } - public System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } - public System.Data.SqlTypes.SqlGuid ToSqlGuid() { throw null; } - public System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } - public System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } - public System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } - public System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } - public System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } - public override string ToString() { throw null; } + public readonly System.Data.SqlTypes.SqlBoolean ToSqlBoolean() { throw null; } + public readonly System.Data.SqlTypes.SqlByte ToSqlByte() { throw null; } + public readonly System.Data.SqlTypes.SqlDateTime ToSqlDateTime() { throw null; } + public readonly System.Data.SqlTypes.SqlDecimal ToSqlDecimal() { throw null; } + public readonly System.Data.SqlTypes.SqlDouble ToSqlDouble() { throw null; } + public readonly System.Data.SqlTypes.SqlGuid ToSqlGuid() { throw null; } + public readonly System.Data.SqlTypes.SqlInt16 ToSqlInt16() { throw null; } + public readonly System.Data.SqlTypes.SqlInt32 ToSqlInt32() { throw null; } + public readonly System.Data.SqlTypes.SqlInt64 ToSqlInt64() { throw null; } + public readonly System.Data.SqlTypes.SqlMoney ToSqlMoney() { throw null; } + public readonly System.Data.SqlTypes.SqlSingle ToSqlSingle() { throw null; } + public override readonly string ToString() { throw null; } } public sealed partial class SqlTruncateException : System.Data.SqlTypes.SqlTypeException { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/DbProviderFactories.cs b/src/libraries/System.Data.Common/src/System/Data/Common/DbProviderFactories.cs index 2ad35f787cdeee..70832f26afdafe 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/DbProviderFactories.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/DbProviderFactories.cs @@ -23,13 +23,13 @@ internal ProviderRegistration(string factoryTypeAssemblyQualifiedName, DbProvide this.FactoryInstance = factoryInstance; } - internal string FactoryTypeAssemblyQualifiedName { get; } + internal readonly string FactoryTypeAssemblyQualifiedName { get; } /// /// The cached instance of the type in . If null, this registration is seen as a deferred registration /// and is checked the first time when this registration is requested through GetFactory(). /// - internal DbProviderFactory? FactoryInstance { get; } + internal readonly DbProviderFactory? FactoryInstance { get; } } private static readonly ConcurrentDictionary _registeredFactories = new ConcurrentDictionary(); 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 9e4a168c8822bd..36ab7dd360f75e 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataSet.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataSet.cs @@ -1259,7 +1259,7 @@ internal TableChanges(int rowCount) HasChanges = 0; } - internal int HasChanges { get; set; } + internal int HasChanges { readonly get; set; } internal bool this[int index] { diff --git a/src/libraries/System.Data.Common/src/System/Data/Range.cs b/src/libraries/System.Data.Common/src/System/Data/Range.cs index 36716b43940a92..63e2ef94195069 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Range.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Range.cs @@ -20,11 +20,11 @@ public Range(int min, int max) _isNotNull = true; } - public int Count => IsNull ? 0 : _max - _min + 1; + public readonly int Count => IsNull ? 0 : _max - _min + 1; - public bool IsNull => !_isNotNull; + public readonly bool IsNull => !_isNotNull; - public int Max + public readonly int Max { get { @@ -33,7 +33,7 @@ public int Max } } - public int Min + public readonly int Min { get { @@ -42,7 +42,7 @@ public int Min } } - internal void CheckNull() + internal readonly void CheckNull() { if (IsNull) { diff --git a/src/libraries/System.Data.Common/src/System/Data/RbTree.cs b/src/libraries/System.Data.Common/src/System/Data/RbTree.cs index a5f75b089899bc..cdcdf0e2bf6729 100644 --- a/src/libraries/System.Data.Common/src/System/Data/RbTree.cs +++ b/src/libraries/System.Data.Common/src/System/Data/RbTree.cs @@ -2090,7 +2090,7 @@ public bool MoveNext() return hasCurrent; } - public K Current + public readonly K Current { get { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs index ab176703b4657b..a64881fcf9c0b9 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs @@ -51,13 +51,13 @@ internal SqlBinary(byte[]? value, bool ignored) /// /// Gets whether or not is null. /// - public bool IsNull => _value is null; + public readonly bool IsNull => _value is null; // property: Value /// /// Gets or sets the value of the SQL binary object retrieved. /// - public byte[] Value + public readonly byte[] Value { get { @@ -73,7 +73,7 @@ public byte[] Value } // class indexer - public byte this[int index] + public readonly byte this[int index] { get { @@ -89,7 +89,7 @@ public byte this[int index] /// /// Gets the length in bytes of . /// - public int Length + public readonly int Length { get { @@ -118,7 +118,7 @@ public int Length /// /// Returns a string describing a object. /// - public override string ToString() => + public override readonly string ToString() => _value is null ? SQLResource.NullString : "SqlBinary(" + _value.Length.ToString(CultureInfo.InvariantCulture) + ")"; // Unary operators @@ -324,7 +324,7 @@ public static SqlBoolean GreaterThanOrEqual(SqlBinary x, SqlBinary y) } // Alternative method for conversions. - public SqlGuid ToSqlGuid() + public readonly SqlGuid ToSqlGuid() { return (SqlGuid)this; } @@ -336,7 +336,7 @@ public SqlGuid ToSqlGuid() // or a value greater than zero if this > object. // null is considered to be less than any instance. // If object is not of same type, this method throws an ArgumentException. - public int CompareTo(object? value) + public readonly int CompareTo(object? value) { if (value is SqlBinary) { @@ -347,7 +347,7 @@ public int CompareTo(object? value) throw ADP.WrongType(value!.GetType(), typeof(SqlBinary)); } - public int CompareTo(SqlBinary value) + public readonly int CompareTo(SqlBinary value) { // If both Null, consider them equal. // Otherwise, Null is less than anything. @@ -362,7 +362,7 @@ public int CompareTo(SqlBinary value) } // Compares this instance with a specified object - public override bool Equals(object? value) + public override readonly bool Equals(object? value) { if (!(value is SqlBinary)) { @@ -407,7 +407,7 @@ internal static int HashByteArray(byte[] rgbValue, int length) return ulValue; } // For hashing purpose - public override int GetHashCode() + public override readonly int GetHashCode() { if (_value is null) return 0; @@ -420,7 +420,7 @@ public override int GetHashCode() return HashByteArray(_value, cbLen); } - XmlSchema? IXmlSerializable.GetSchema() { return null; } + readonly XmlSchema? IXmlSerializable.GetSchema() { return null; } void IXmlSerializable.ReadXml(XmlReader reader) { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBoolean.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBoolean.cs index b76f3d16c7d2d2..824bc13d3c2eef 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBoolean.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBoolean.cs @@ -53,7 +53,7 @@ private SqlBoolean(int value, bool fNull) /// /// Gets whether the current is . /// - public bool IsNull + public readonly bool IsNull { get { return m_value == x_Null; } } @@ -62,7 +62,7 @@ public bool IsNull /// /// Gets or sets the to be or . /// - public bool Value + public readonly bool Value { get { @@ -78,7 +78,7 @@ public bool Value /// /// Gets whether the current is . /// - public bool IsTrue + public readonly bool IsTrue { get { return m_value == x_True; } } @@ -86,7 +86,7 @@ public bool IsTrue /// /// Gets whether the current is . /// - public bool IsFalse + public readonly bool IsFalse { get { return m_value == x_False; } } @@ -173,7 +173,7 @@ public static bool operator false(SqlBoolean x) // property: ByteValue - public byte ByteValue + public readonly byte ByteValue { get { @@ -184,7 +184,7 @@ public byte ByteValue } } - public override string ToString() + public override readonly string ToString() { return IsNull ? SQLResource.NullString : Value.ToString(); } @@ -384,47 +384,47 @@ public static SqlBoolean LessThanOrEquals(SqlBoolean x, SqlBoolean y) // Alternative method for conversions. - public SqlByte ToSqlByte() + public readonly SqlByte ToSqlByte() { return (SqlByte)this; } - public SqlDouble ToSqlDouble() + public readonly SqlDouble ToSqlDouble() { return (SqlDouble)this; } - public SqlInt16 ToSqlInt16() + public readonly SqlInt16 ToSqlInt16() { return (SqlInt16)this; } - public SqlInt32 ToSqlInt32() + public readonly SqlInt32 ToSqlInt32() { return (SqlInt32)this; } - public SqlInt64 ToSqlInt64() + public readonly SqlInt64 ToSqlInt64() { return (SqlInt64)this; } - public SqlMoney ToSqlMoney() + public readonly SqlMoney ToSqlMoney() { return (SqlMoney)this; } - public SqlDecimal ToSqlDecimal() + public readonly SqlDecimal ToSqlDecimal() { return (SqlDecimal)this; } - public SqlSingle ToSqlSingle() + public readonly SqlSingle ToSqlSingle() { return (SqlSingle)this; } - public SqlString ToSqlString() + public readonly SqlString ToSqlString() { return (SqlString)this; } @@ -438,7 +438,7 @@ public SqlString ToSqlString() // or a value greater than zero if this > object. // null is considered to be less than any instance. // If object is not of same type, this method throws an ArgumentException. - public int CompareTo(object? value) + public readonly int CompareTo(object? value) { if (value is SqlBoolean) { @@ -449,7 +449,7 @@ public int CompareTo(object? value) throw ADP.WrongType(value!.GetType(), typeof(SqlBoolean)); } - public int CompareTo(SqlBoolean value) + public readonly int CompareTo(SqlBoolean value) { // If both Null, consider them equal. // Otherwise, Null is less than anything. @@ -464,7 +464,7 @@ public int CompareTo(SqlBoolean value) } // Compares this instance with a specified object - public override bool Equals(object? value) + public override readonly bool Equals(object? value) { if (!(value is SqlBoolean)) { @@ -480,12 +480,12 @@ public override bool Equals(object? value) } // For hashing purpose - public override int GetHashCode() + public override readonly int GetHashCode() { return IsNull ? 0 : Value.GetHashCode(); } - XmlSchema? IXmlSerializable.GetSchema() { return null; } + readonly XmlSchema? IXmlSerializable.GetSchema() { return null; } void IXmlSerializable.ReadXml(XmlReader reader) { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLByte.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLByte.cs index fd353138851358..814afc0a34d024 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLByte.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLByte.cs @@ -39,13 +39,13 @@ public SqlByte(byte value) } // INullable - public bool IsNull + public readonly bool IsNull { get { return !m_fNotNull; } } // property: Value - public byte Value + public readonly byte Value { get { @@ -68,7 +68,7 @@ public static explicit operator byte(SqlByte x) return x.Value; } - public override string ToString() + public override readonly string ToString() { return IsNull ? SQLResource.NullString : m_value.ToString((IFormatProvider)null!); } @@ -393,47 +393,47 @@ public static SqlBoolean GreaterThanOrEqual(SqlByte x, SqlByte y) // Alternative method for conversions. - public SqlBoolean ToSqlBoolean() + public readonly SqlBoolean ToSqlBoolean() { return (SqlBoolean)this; } - public SqlDouble ToSqlDouble() + public readonly SqlDouble ToSqlDouble() { return this; } - public SqlInt16 ToSqlInt16() + public readonly SqlInt16 ToSqlInt16() { return this; } - public SqlInt32 ToSqlInt32() + public readonly SqlInt32 ToSqlInt32() { return this; } - public SqlInt64 ToSqlInt64() + public readonly SqlInt64 ToSqlInt64() { return this; } - public SqlMoney ToSqlMoney() + public readonly SqlMoney ToSqlMoney() { return this; } - public SqlDecimal ToSqlDecimal() + public readonly SqlDecimal ToSqlDecimal() { return this; } - public SqlSingle ToSqlSingle() + public readonly SqlSingle ToSqlSingle() { return this; } - public SqlString ToSqlString() + public readonly SqlString ToSqlString() { return (SqlString)this; } @@ -447,7 +447,7 @@ public SqlString ToSqlString() // or a value greater than zero if this > object. // null is considered to be less than any instance. // If object is not of same type, this method throws an ArgumentException. - public int CompareTo(object? value) + public readonly int CompareTo(object? value) { if (value is SqlByte) { @@ -458,7 +458,7 @@ public int CompareTo(object? value) throw ADP.WrongType(value!.GetType(), typeof(SqlByte)); } - public int CompareTo(SqlByte value) + public readonly int CompareTo(SqlByte value) { // If both Null, consider them equal. // Otherwise, Null is less than anything. @@ -473,7 +473,7 @@ public int CompareTo(SqlByte value) } // Compares this instance with a specified object - public override bool Equals(object? value) + public override readonly bool Equals(object? value) { if (!(value is SqlByte)) { @@ -489,12 +489,12 @@ public override bool Equals(object? value) } // For hashing purpose - public override int GetHashCode() + public override readonly int GetHashCode() { return IsNull ? 0 : Value.GetHashCode(); } - XmlSchema? IXmlSerializable.GetSchema() { return null; } + readonly XmlSchema? IXmlSerializable.GetSchema() { return null; } void IXmlSerializable.ReadXml(XmlReader reader) { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDateTime.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDateTime.cs index 2e08f0eb4d20e5..e62912a8714f5d 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDateTime.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDateTime.cs @@ -192,7 +192,7 @@ internal SqlDateTime(double dblVal) } // INullable - public bool IsNull + public readonly bool IsNull { get { return !m_fNotNull; } } @@ -286,7 +286,7 @@ internal static int ToInt(SqlDateTime x) { // do we still want to define a property of DateTime? If the user uses it often, it is expensive // property: Value - public DateTime Value + public readonly DateTime Value { get { @@ -298,7 +298,7 @@ public DateTime Value } // Day ticks -- returns number of days since 1/1/1900 - public int DayTicks + public readonly int DayTicks { get { @@ -310,7 +310,7 @@ public int DayTicks } // Time ticks -- return daily time in unit of 1/300 second - public int TimeTicks + public readonly int TimeTicks { get { @@ -581,7 +581,7 @@ public static SqlBoolean GreaterThanOrEqual(SqlDateTime x, SqlDateTime y) } // Alternative method for conversions. - public SqlString ToSqlString() + public readonly SqlString ToSqlString() { return (SqlString)this; } @@ -594,7 +594,7 @@ public SqlString ToSqlString() // or a value greater than zero if this > object. // null is considered to be less than any instance. // If object is not of same type, this method throws an ArgumentException. - public int CompareTo(object? value) + public readonly int CompareTo(object? value) { if (value is SqlDateTime) { @@ -605,7 +605,7 @@ public int CompareTo(object? value) throw ADP.WrongType(value!.GetType(), typeof(SqlDateTime)); } - public int CompareTo(SqlDateTime value) + public readonly int CompareTo(SqlDateTime value) { // If both Null, consider them equal. // Otherwise, Null is less than anything. @@ -620,7 +620,7 @@ public int CompareTo(SqlDateTime value) } // Compares this instance with a specified object - public override bool Equals(object? value) + public override readonly bool Equals(object? value) { if (!(value is SqlDateTime)) { @@ -636,12 +636,12 @@ public override bool Equals(object? value) } // For hashing purpose - public override int GetHashCode() + public override readonly int GetHashCode() { return IsNull ? 0 : Value.GetHashCode(); } - XmlSchema? IXmlSerializable.GetSchema() { return null; } + readonly XmlSchema? IXmlSerializable.GetSchema() { return null; } void IXmlSerializable.ReadXml(XmlReader reader) { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs index 0297adacd4f57c..1c577f93267a63 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs @@ -422,7 +422,7 @@ private byte CalculatePrecision() // returns true if the current value is less or equal than the max value of the // supplied precision. // - private bool VerifyPrecision(byte precision) + private readonly bool VerifyPrecision(byte precision) { Debug.Assert(precision > 0, "Precision cannot be less than 1"); Debug.Assert(precision <= MaxPrecision, "Precision > MaxPrecision"); @@ -806,17 +806,17 @@ private SqlDecimal(ReadOnlySpan rglData, byte bLen, byte bPrec, byte bScal // INullable - public bool IsNull + public readonly bool IsNull { get { return (_bStatus & s_bNullMask) == s_bIsNull; } } - public decimal Value + public readonly decimal Value { get { return ToDecimal(); } } - public bool IsPositive + public readonly bool IsPositive { get { @@ -838,7 +838,7 @@ private void SetSignBit(bool fPositive) _bStatus = (byte)(fPositive ? (_bStatus & s_bReverseSignMask) : (_bStatus | s_bNegative)); } - public byte Precision + public readonly byte Precision { get { @@ -848,7 +848,7 @@ public byte Precision } } - public byte Scale + public readonly byte Scale { get { @@ -858,7 +858,7 @@ public byte Scale } } - public int[] Data + public readonly int[] Data { get { @@ -1117,7 +1117,7 @@ public static SqlDecimal Parse(string s) return snResult; } - public double ToDouble() + public readonly double ToDouble() { if (IsNull) throw new SqlNullValueException(); @@ -1134,7 +1134,7 @@ public double ToDouble() return IsPositive ? dRet : -dRet; } - private decimal ToDecimal() + private readonly decimal ToDecimal() { if (IsNull) throw new SqlNullValueException(); @@ -1777,7 +1777,7 @@ public static explicit operator SqlDecimal(SqlString x) //---------------------------------------------------------------------- // Is this RE numeric valid? [Conditional("DEBUG")] - private void AssertValid() + private readonly void AssertValid() { if (IsNull) return; @@ -1895,20 +1895,20 @@ private static byte CLenFromPrec(byte bPrec) } // check whether is zero - private bool FZero() + private readonly bool FZero() { return (_data1 == 0) && (_bLen <= 1); } // Find the case where we overflowed 10**38, but not 2**128 - private bool FGt10_38() + private readonly bool FGt10_38() { return _data4 >= 0x4b3b4ca8L && _bLen == 4 && ((_data4 > 0x4b3b4ca8L) || (_data3 > 0x5a86c47aL) || (_data3 == 0x5a86c47aL) && (_data2 >= 0x098a2240L)); } - private bool FGt10_38(Span rglData) + private readonly bool FGt10_38(Span rglData) { Debug.Assert(rglData.Length == 4, "rglData.Length == 4", "Wrong array length: " + rglData.Length.ToString(CultureInfo.InvariantCulture)); @@ -2399,7 +2399,7 @@ public static SqlDecimal ConvertToPrecScale(SqlDecimal n, int precision, int sca // 0 - |this| = |snumOp| // negative - |this| < |snumOp| // - private int LAbsCmp(SqlDecimal snumOp) + private readonly int LAbsCmp(SqlDecimal snumOp) { int iData; //which UI4 we are operating on int culOp; //#of UI4s on operand @@ -2949,47 +2949,47 @@ public static SqlBoolean GreaterThanOrEqual(SqlDecimal x, SqlDecimal y) // Alternative method for conversions. - public SqlBoolean ToSqlBoolean() + public readonly SqlBoolean ToSqlBoolean() { return (SqlBoolean)this; } - public SqlByte ToSqlByte() + public readonly SqlByte ToSqlByte() { return (SqlByte)this; } - public SqlDouble ToSqlDouble() + public readonly SqlDouble ToSqlDouble() { return this; } - public SqlInt16 ToSqlInt16() + public readonly SqlInt16 ToSqlInt16() { return (SqlInt16)this; } - public SqlInt32 ToSqlInt32() + public readonly SqlInt32 ToSqlInt32() { return (SqlInt32)this; } - public SqlInt64 ToSqlInt64() + public readonly SqlInt64 ToSqlInt64() { return (SqlInt64)this; } - public SqlMoney ToSqlMoney() + public readonly SqlMoney ToSqlMoney() { return (SqlMoney)this; } - public SqlSingle ToSqlSingle() + public readonly SqlSingle ToSqlSingle() { return this; } - public SqlString ToSqlString() + public readonly SqlString ToSqlString() { return (SqlString)this; } @@ -3255,7 +3255,7 @@ public static SqlDecimal Power(SqlDecimal n, double exp) // or a value greater than zero if this > object. // null is considered to be less than any instance. // If object is not of same type, this method throws an ArgumentException. - public int CompareTo(object? value) + public readonly int CompareTo(object? value) { if (value is SqlDecimal i) { @@ -3264,7 +3264,7 @@ public int CompareTo(object? value) throw ADP.WrongType(value!.GetType(), typeof(SqlDecimal)); } - public int CompareTo(SqlDecimal value) + public readonly int CompareTo(SqlDecimal value) { // If both Null, consider them equal. // Otherwise, Null is less than anything. @@ -3279,7 +3279,7 @@ public int CompareTo(SqlDecimal value) } // Compares this instance with a specified object - public override bool Equals(object? value) + public override readonly bool Equals(object? value) { if (!(value is SqlDecimal)) { @@ -3295,7 +3295,7 @@ public override bool Equals(object? value) } // For hashing purpose - public override int GetHashCode() + public override readonly int GetHashCode() { if (IsNull) return 0; @@ -3330,7 +3330,7 @@ public override int GetHashCode() return ulValue; } - XmlSchema? IXmlSerializable.GetSchema() { return null; } + readonly XmlSchema? IXmlSerializable.GetSchema() { return null; } void IXmlSerializable.ReadXml(XmlReader reader) { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDouble.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDouble.cs index aa8ea8cb9dd257..ef4d11617e8e12 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDouble.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDouble.cs @@ -45,13 +45,13 @@ public SqlDouble(double value) } // INullable - public bool IsNull + public readonly bool IsNull { get { return !m_fNotNull; } } // property: Value - public double Value + public readonly double Value { get { @@ -74,7 +74,7 @@ public static explicit operator double(SqlDouble x) return x.Value; } - public override string ToString() + public override readonly string ToString() { return IsNull ? SQLResource.NullString : m_value.ToString((IFormatProvider)null!); } @@ -311,47 +311,47 @@ public static SqlBoolean GreaterThanOrEqual(SqlDouble x, SqlDouble y) // Alternative method for conversions. - public SqlBoolean ToSqlBoolean() + public readonly SqlBoolean ToSqlBoolean() { return (SqlBoolean)this; } - public SqlByte ToSqlByte() + public readonly SqlByte ToSqlByte() { return (SqlByte)this; } - public SqlInt16 ToSqlInt16() + public readonly SqlInt16 ToSqlInt16() { return (SqlInt16)this; } - public SqlInt32 ToSqlInt32() + public readonly SqlInt32 ToSqlInt32() { return (SqlInt32)this; } - public SqlInt64 ToSqlInt64() + public readonly SqlInt64 ToSqlInt64() { return (SqlInt64)this; } - public SqlMoney ToSqlMoney() + public readonly SqlMoney ToSqlMoney() { return (SqlMoney)this; } - public SqlDecimal ToSqlDecimal() + public readonly SqlDecimal ToSqlDecimal() { return (SqlDecimal)this; } - public SqlSingle ToSqlSingle() + public readonly SqlSingle ToSqlSingle() { return (SqlSingle)this; } - public SqlString ToSqlString() + public readonly SqlString ToSqlString() { return (SqlString)this; } @@ -363,7 +363,7 @@ public SqlString ToSqlString() // or a value greater than zero if this > object. // null is considered to be less than any instance. // If object is not of same type, this method throws an ArgumentException. - public int CompareTo(object? value) + public readonly int CompareTo(object? value) { if (value is SqlDouble) { @@ -374,7 +374,7 @@ public int CompareTo(object? value) throw ADP.WrongType(value!.GetType(), typeof(SqlDouble)); } - public int CompareTo(SqlDouble value) + public readonly int CompareTo(SqlDouble value) { // If both Null, consider them equal. // Otherwise, Null is less than anything. @@ -389,7 +389,7 @@ public int CompareTo(SqlDouble value) } // Compares this instance with a specified object - public override bool Equals(object? value) + public override readonly bool Equals(object? value) { if (!(value is SqlDouble)) { @@ -405,12 +405,12 @@ public override bool Equals(object? value) } // For hashing purpose - public override int GetHashCode() + public override readonly int GetHashCode() { return IsNull ? 0 : Value.GetHashCode(); } - XmlSchema? IXmlSerializable.GetSchema() { return null; } + readonly XmlSchema? IXmlSerializable.GetSchema() { return null; } void IXmlSerializable.ReadXml(XmlReader reader) { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLGuid.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLGuid.cs index 263cf292444095..a6e64176641da9 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLGuid.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLGuid.cs @@ -67,13 +67,13 @@ public SqlGuid(int a, short b, short c, byte d, byte e, byte f, byte g, byte h, // INullable - public bool IsNull + public readonly bool IsNull { get { return (m_value is null); } } // property: Value - public Guid Value + public readonly Guid Value { get { @@ -96,14 +96,14 @@ public static explicit operator Guid(SqlGuid x) return x.Value; } - public byte[]? ToByteArray() + public readonly byte[]? ToByteArray() { byte[] ret = new byte[SizeOfGuid]; m_value!.CopyTo(ret, 0); // TODO: NRE return ret; } - public override string ToString() + public override readonly string ToString() { if (m_value is null) return SQLResource.NullString; @@ -236,12 +236,12 @@ public static SqlBoolean GreaterThanOrEqual(SqlGuid x, SqlGuid y) // Alternative method for conversions. - public SqlString ToSqlString() + public readonly SqlString ToSqlString() { return (SqlString)this; } - public SqlBinary ToSqlBinary() + public readonly SqlBinary ToSqlBinary() { return (SqlBinary)this; } @@ -254,7 +254,7 @@ public SqlBinary ToSqlBinary() // or a value greater than zero if this > object. // null is considered to be less than any instance. // If object is not of same type, this method throws an ArgumentException. - public int CompareTo(object? value) + public readonly int CompareTo(object? value) { if (value is SqlGuid) { @@ -265,7 +265,7 @@ public int CompareTo(object? value) throw ADP.WrongType(value!.GetType(), typeof(SqlGuid)); } - public int CompareTo(SqlGuid value) + public readonly int CompareTo(SqlGuid value) { // If both Null, consider them equal. // Otherwise, Null is less than anything. @@ -280,7 +280,7 @@ public int CompareTo(SqlGuid value) } // Compares this instance with a specified object - public override bool Equals(object? value) + public override readonly bool Equals(object? value) { if (!(value is SqlGuid)) { @@ -296,12 +296,12 @@ public override bool Equals(object? value) } // For hashing purpose - public override int GetHashCode() + public override readonly int GetHashCode() { return IsNull ? 0 : Value.GetHashCode(); } - XmlSchema? IXmlSerializable.GetSchema() { return null; } + readonly XmlSchema? IXmlSerializable.GetSchema() { return null; } void IXmlSerializable.ReadXml(XmlReader reader) { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt16.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt16.cs index 7da5e90509aa0d..d4abdc896b8e82 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt16.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt16.cs @@ -38,13 +38,13 @@ public SqlInt16(short value) } // INullable - public bool IsNull + public readonly bool IsNull { get { return !m_fNotNull; } } // property: Value - public short Value + public readonly short Value { get { @@ -67,7 +67,7 @@ public static explicit operator short(SqlInt16 x) return x.Value; } - public override string ToString() + public override readonly string ToString() { return IsNull ? SQLResource.NullString : m_value.ToString((IFormatProvider)null!); } @@ -396,47 +396,47 @@ public static SqlBoolean GreaterThanOrEqual(SqlInt16 x, SqlInt16 y) // Alternative method for conversions. - public SqlBoolean ToSqlBoolean() + public readonly SqlBoolean ToSqlBoolean() { return (SqlBoolean)this; } - public SqlByte ToSqlByte() + public readonly SqlByte ToSqlByte() { return (SqlByte)this; } - public SqlDouble ToSqlDouble() + public readonly SqlDouble ToSqlDouble() { return this; } - public SqlInt32 ToSqlInt32() + public readonly SqlInt32 ToSqlInt32() { return this; } - public SqlInt64 ToSqlInt64() + public readonly SqlInt64 ToSqlInt64() { return this; } - public SqlMoney ToSqlMoney() + public readonly SqlMoney ToSqlMoney() { return this; } - public SqlDecimal ToSqlDecimal() + public readonly SqlDecimal ToSqlDecimal() { return this; } - public SqlSingle ToSqlSingle() + public readonly SqlSingle ToSqlSingle() { return this; } - public SqlString ToSqlString() + public readonly SqlString ToSqlString() { return (SqlString)this; } @@ -448,7 +448,7 @@ public SqlString ToSqlString() // or a value greater than zero if this > object. // null is considered to be less than any instance. // If object is not of same type, this method throws an ArgumentException. - public int CompareTo(object? value) + public readonly int CompareTo(object? value) { if (value is SqlInt16) { @@ -459,7 +459,7 @@ public int CompareTo(object? value) throw ADP.WrongType(value!.GetType(), typeof(SqlInt16)); } - public int CompareTo(SqlInt16 value) + public readonly int CompareTo(SqlInt16 value) { // If both Null, consider them equal. // Otherwise, Null is less than anything. @@ -474,7 +474,7 @@ public int CompareTo(SqlInt16 value) } // Compares this instance with a specified object - public override bool Equals(object? value) + public override readonly bool Equals(object? value) { if (!(value is SqlInt16)) { @@ -490,12 +490,12 @@ public override bool Equals(object? value) } // For hashing purpose - public override int GetHashCode() + public override readonly int GetHashCode() { return IsNull ? 0 : Value.GetHashCode(); } - XmlSchema? IXmlSerializable.GetSchema() { return null; } + readonly XmlSchema? IXmlSerializable.GetSchema() { return null; } void IXmlSerializable.ReadXml(XmlReader reader) { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt32.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt32.cs index c02908e39f7505..c56aefe30ac886 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt32.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt32.cs @@ -39,13 +39,13 @@ public SqlInt32(int value) } // INullable - public bool IsNull + public readonly bool IsNull { get { return !m_fNotNull; } } // property: Value - public int Value + public readonly int Value { get { @@ -68,7 +68,7 @@ public static explicit operator int(SqlInt32 x) return x.Value; } - public override string ToString() + public override readonly string ToString() { return IsNull ? SQLResource.NullString : m_value.ToString((IFormatProvider)null!); } @@ -411,47 +411,47 @@ public static SqlBoolean GreaterThanOrEqual(SqlInt32 x, SqlInt32 y) // Alternative method for conversions. - public SqlBoolean ToSqlBoolean() + public readonly SqlBoolean ToSqlBoolean() { return (SqlBoolean)this; } - public SqlByte ToSqlByte() + public readonly SqlByte ToSqlByte() { return (SqlByte)this; } - public SqlDouble ToSqlDouble() + public readonly SqlDouble ToSqlDouble() { return this; } - public SqlInt16 ToSqlInt16() + public readonly SqlInt16 ToSqlInt16() { return (SqlInt16)this; } - public SqlInt64 ToSqlInt64() + public readonly SqlInt64 ToSqlInt64() { return this; } - public SqlMoney ToSqlMoney() + public readonly SqlMoney ToSqlMoney() { return this; } - public SqlDecimal ToSqlDecimal() + public readonly SqlDecimal ToSqlDecimal() { return this; } - public SqlSingle ToSqlSingle() + public readonly SqlSingle ToSqlSingle() { return this; } - public SqlString ToSqlString() + public readonly SqlString ToSqlString() { return (SqlString)this; } @@ -463,7 +463,7 @@ public SqlString ToSqlString() // or a value greater than zero if this > object. // null is considered to be less than any instance. // If object is not of same type, this method throws an ArgumentException. - public int CompareTo(object? value) + public readonly int CompareTo(object? value) { if (value is SqlInt32) { @@ -474,7 +474,7 @@ public int CompareTo(object? value) throw ADP.WrongType(value!.GetType(), typeof(SqlInt32)); } - public int CompareTo(SqlInt32 value) + public readonly int CompareTo(SqlInt32 value) { // If both Null, consider them equal. // Otherwise, Null is less than anything. @@ -489,7 +489,7 @@ public int CompareTo(SqlInt32 value) } // Compares this instance with a specified object - public override bool Equals(object? value) + public override readonly bool Equals(object? value) { if (!(value is SqlInt32)) { @@ -505,12 +505,12 @@ public override bool Equals(object? value) } // For hashing purpose - public override int GetHashCode() + public override readonly int GetHashCode() { return IsNull ? 0 : Value.GetHashCode(); } - XmlSchema? IXmlSerializable.GetSchema() { return null; } + readonly XmlSchema? IXmlSerializable.GetSchema() { return null; } void IXmlSerializable.ReadXml(XmlReader reader) { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt64.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt64.cs index d65fcd73f6c009..704cbef4a5d1f8 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt64.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt64.cs @@ -40,13 +40,13 @@ public SqlInt64(long value) } // INullable - public bool IsNull + public readonly bool IsNull { get { return !m_fNotNull; } } // property: Value - public long Value + public readonly long Value { get { @@ -69,7 +69,7 @@ public static explicit operator long(SqlInt64 x) return x.Value; } - public override string ToString() + public override readonly string ToString() { return IsNull ? SQLResource.NullString : m_value.ToString((IFormatProvider)null!); } @@ -470,47 +470,47 @@ public static SqlBoolean GreaterThanOrEqual(SqlInt64 x, SqlInt64 y) // Alternative method for conversions. - public SqlBoolean ToSqlBoolean() + public readonly SqlBoolean ToSqlBoolean() { return (SqlBoolean)this; } - public SqlByte ToSqlByte() + public readonly SqlByte ToSqlByte() { return (SqlByte)this; } - public SqlDouble ToSqlDouble() + public readonly SqlDouble ToSqlDouble() { return this; } - public SqlInt16 ToSqlInt16() + public readonly SqlInt16 ToSqlInt16() { return (SqlInt16)this; } - public SqlInt32 ToSqlInt32() + public readonly SqlInt32 ToSqlInt32() { return (SqlInt32)this; } - public SqlMoney ToSqlMoney() + public readonly SqlMoney ToSqlMoney() { return this; } - public SqlDecimal ToSqlDecimal() + public readonly SqlDecimal ToSqlDecimal() { return this; } - public SqlSingle ToSqlSingle() + public readonly SqlSingle ToSqlSingle() { return this; } - public SqlString ToSqlString() + public readonly SqlString ToSqlString() { return (SqlString)this; } @@ -522,7 +522,7 @@ public SqlString ToSqlString() // or a value greater than zero if this > object. // null is considered to be less than any instance. // If object is not of same type, this method throws an ArgumentException. - public int CompareTo(object? value) + public readonly int CompareTo(object? value) { if (value is SqlInt64) { @@ -533,7 +533,7 @@ public int CompareTo(object? value) throw ADP.WrongType(value!.GetType(), typeof(SqlInt64)); } - public int CompareTo(SqlInt64 value) + public readonly int CompareTo(SqlInt64 value) { // If both Null, consider them equal. // Otherwise, Null is less than anything. @@ -548,7 +548,7 @@ public int CompareTo(SqlInt64 value) } // Compares this instance with a specified object - public override bool Equals(object? value) + public override readonly bool Equals(object? value) { if (!(value is SqlInt64)) { @@ -564,12 +564,12 @@ public override bool Equals(object? value) } // For hashing purpose - public override int GetHashCode() + public override readonly int GetHashCode() { return IsNull ? 0 : Value.GetHashCode(); } - XmlSchema? IXmlSerializable.GetSchema() { return null; } + readonly XmlSchema? IXmlSerializable.GetSchema() { return null; } void IXmlSerializable.ReadXml(XmlReader reader) { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs index 83ecd1c80166e3..f4895c410348e3 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs @@ -106,7 +106,7 @@ public SqlMoney(double value) : this(new decimal(value)) /// Gets a value indicating whether the /// property is assigned to null. /// - public bool IsNull + public readonly bool IsNull { get { return !_fNotNull; } } @@ -114,7 +114,7 @@ public bool IsNull /// /// Gets or sets the monetary value of an instance of the class. /// - public decimal Value + public readonly decimal Value { get { @@ -125,7 +125,7 @@ public decimal Value } } - public decimal ToDecimal() + public readonly decimal ToDecimal() { if (IsNull) throw new SqlNullValueException(); @@ -141,7 +141,7 @@ public decimal ToDecimal() return new decimal(unchecked((int)value), unchecked((int)(value >> 32)), 0, fNegative, (byte)s_iMoneyScale); } - public long ToInt64() + public readonly long ToInt64() { if (IsNull) throw new SqlNullValueException(); @@ -162,7 +162,7 @@ public long ToInt64() return ret; } - internal long ToSqlInternalRepresentation() + internal readonly long ToSqlInternalRepresentation() { if (IsNull) throw new SqlNullValueException(); @@ -170,12 +170,12 @@ internal long ToSqlInternalRepresentation() return _value; } - public int ToInt32() + public readonly int ToInt32() { return checked((int)(ToInt64())); } - public double ToDouble() + public readonly double ToDouble() { return decimal.ToDouble(ToDecimal()); } @@ -204,7 +204,7 @@ public static explicit operator decimal(SqlMoney x) return x.Value; } - public override string ToString() + public override readonly string ToString() { if (IsNull) { @@ -459,47 +459,47 @@ public static SqlBoolean GreaterThanOrEqual(SqlMoney x, SqlMoney y) // Alternative method for conversions. - public SqlBoolean ToSqlBoolean() + public readonly SqlBoolean ToSqlBoolean() { return (SqlBoolean)this; } - public SqlByte ToSqlByte() + public readonly SqlByte ToSqlByte() { return (SqlByte)this; } - public SqlDouble ToSqlDouble() + public readonly SqlDouble ToSqlDouble() { return this; } - public SqlInt16 ToSqlInt16() + public readonly SqlInt16 ToSqlInt16() { return (SqlInt16)this; } - public SqlInt32 ToSqlInt32() + public readonly SqlInt32 ToSqlInt32() { return (SqlInt32)this; } - public SqlInt64 ToSqlInt64() + public readonly SqlInt64 ToSqlInt64() { return (SqlInt64)this; } - public SqlDecimal ToSqlDecimal() + public readonly SqlDecimal ToSqlDecimal() { return this; } - public SqlSingle ToSqlSingle() + public readonly SqlSingle ToSqlSingle() { return this; } - public SqlString ToSqlString() + public readonly SqlString ToSqlString() { return (SqlString)this; } @@ -512,7 +512,7 @@ public SqlString ToSqlString() // or a value greater than zero if this > object. // null is considered to be less than any instance. // If object is not of same type, this method throws an ArgumentException. - public int CompareTo(object? value) + public readonly int CompareTo(object? value) { if (value is SqlMoney) { @@ -523,7 +523,7 @@ public int CompareTo(object? value) throw ADP.WrongType(value!.GetType(), typeof(SqlMoney)); } - public int CompareTo(SqlMoney value) + public readonly int CompareTo(SqlMoney value) { // If both Null, consider them equal. // Otherwise, Null is less than anything. @@ -538,7 +538,7 @@ public int CompareTo(SqlMoney value) } // Compares this instance with a specified object - public override bool Equals(object? value) + public override readonly bool Equals(object? value) { if (!(value is SqlMoney)) { @@ -554,13 +554,13 @@ public override bool Equals(object? value) } // For hashing purpose - public override int GetHashCode() + public override readonly int GetHashCode() { // Don't use Value property, because Value will convert to Decimal, which is not necessary. return IsNull ? 0 : _value.GetHashCode(); } - XmlSchema? IXmlSerializable.GetSchema() { return null; } + readonly XmlSchema? IXmlSerializable.GetSchema() { return null; } void IXmlSerializable.ReadXml(XmlReader reader) { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLSingle.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLSingle.cs index 9e61441618cc46..538a864e1bb358 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLSingle.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLSingle.cs @@ -46,13 +46,13 @@ public SqlSingle(double value) : this(checked((float)value)) } // INullable - public bool IsNull + public readonly bool IsNull { get { return !_fNotNull; } } // property: Value - public float Value + public readonly float Value { get { @@ -75,7 +75,7 @@ public static explicit operator float(SqlSingle x) return x.Value; } - public override string ToString() + public override readonly string ToString() { return IsNull ? SQLResource.NullString : _value.ToString((IFormatProvider)null!); } @@ -320,47 +320,47 @@ public static SqlBoolean GreaterThanOrEqual(SqlSingle x, SqlSingle y) // Alternative method for conversions. - public SqlBoolean ToSqlBoolean() + public readonly SqlBoolean ToSqlBoolean() { return (SqlBoolean)this; } - public SqlByte ToSqlByte() + public readonly SqlByte ToSqlByte() { return (SqlByte)this; } - public SqlDouble ToSqlDouble() + public readonly SqlDouble ToSqlDouble() { return this; } - public SqlInt16 ToSqlInt16() + public readonly SqlInt16 ToSqlInt16() { return (SqlInt16)this; } - public SqlInt32 ToSqlInt32() + public readonly SqlInt32 ToSqlInt32() { return (SqlInt32)this; } - public SqlInt64 ToSqlInt64() + public readonly SqlInt64 ToSqlInt64() { return (SqlInt64)this; } - public SqlMoney ToSqlMoney() + public readonly SqlMoney ToSqlMoney() { return (SqlMoney)this; } - public SqlDecimal ToSqlDecimal() + public readonly SqlDecimal ToSqlDecimal() { return (SqlDecimal)this; } - public SqlString ToSqlString() + public readonly SqlString ToSqlString() { return (SqlString)this; } @@ -373,7 +373,7 @@ public SqlString ToSqlString() // or a value greater than zero if this > object. // null is considered to be less than any instance. // If object is not of same type, this method throws an ArgumentException. - public int CompareTo(object? value) + public readonly int CompareTo(object? value) { if (value is SqlSingle) { @@ -384,7 +384,7 @@ public int CompareTo(object? value) throw ADP.WrongType(value!.GetType(), typeof(SqlSingle)); } - public int CompareTo(SqlSingle value) + public readonly int CompareTo(SqlSingle value) { // If both Null, consider them equal. // Otherwise, Null is less than anything. @@ -399,7 +399,7 @@ public int CompareTo(SqlSingle value) } // Compares this instance with a specified object - public override bool Equals(object? value) + public override readonly bool Equals(object? value) { if (!(value is SqlSingle)) { @@ -415,12 +415,12 @@ public override bool Equals(object? value) } // For hashing purpose - public override int GetHashCode() + public override readonly int GetHashCode() { return IsNull ? 0 : Value.GetHashCode(); } - XmlSchema? IXmlSerializable.GetSchema() { return null; } + readonly XmlSchema? IXmlSerializable.GetSchema() { return null; } void IXmlSerializable.ReadXml(XmlReader reader) { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLString.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLString.cs index 1482532b98bff3..f44874797771d1 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLString.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLString.cs @@ -215,7 +215,7 @@ private SqlString(int lcid, SqlCompareOptions compareOptions, string? data, Comp /// /// Gets whether the of the is . /// - public bool IsNull + public readonly bool IsNull { get { return !m_fNotNull; } } @@ -224,7 +224,7 @@ public bool IsNull /// /// Gets the string that is to be stored. /// - public string Value + public readonly string Value { get { @@ -235,7 +235,7 @@ public string Value } } - public int LCID + public readonly int LCID { get { @@ -246,7 +246,7 @@ public int LCID } } - public CultureInfo CultureInfo + public readonly CultureInfo CultureInfo { get { @@ -278,7 +278,7 @@ public CompareInfo CompareInfo } } - public SqlCompareOptions SqlCompareOptions + public readonly SqlCompareOptions SqlCompareOptions { get { @@ -304,12 +304,12 @@ public static explicit operator string(SqlString x) /// /// Converts a object to a string. /// - public override string ToString() + public override readonly string ToString() { return IsNull ? SQLResource.NullString : m_value!; } - public byte[]? GetUnicodeBytes() + public readonly byte[]? GetUnicodeBytes() { if (IsNull) return null; @@ -317,7 +317,7 @@ public override string ToString() return s_unicodeEncoding.GetBytes(m_value!); } - public byte[]? GetNonUnicodeBytes() + public readonly byte[]? GetNonUnicodeBytes() { if (IsNull) return null; @@ -514,7 +514,7 @@ public static explicit operator SqlString(SqlGuid x) return x.IsNull ? Null : new SqlString(x.ToString()); } - public SqlString Clone() + public readonly SqlString Clone() { if (IsNull) return new SqlString(true); @@ -609,57 +609,57 @@ public static SqlBoolean GreaterThanOrEqual(SqlString x, SqlString y) // Alternative method for conversions. - public SqlBoolean ToSqlBoolean() + public readonly SqlBoolean ToSqlBoolean() { return (SqlBoolean)this; } - public SqlByte ToSqlByte() + public readonly SqlByte ToSqlByte() { return (SqlByte)this; } - public SqlDateTime ToSqlDateTime() + public readonly SqlDateTime ToSqlDateTime() { return (SqlDateTime)this; } - public SqlDouble ToSqlDouble() + public readonly SqlDouble ToSqlDouble() { return (SqlDouble)this; } - public SqlInt16 ToSqlInt16() + public readonly SqlInt16 ToSqlInt16() { return (SqlInt16)this; } - public SqlInt32 ToSqlInt32() + public readonly SqlInt32 ToSqlInt32() { return (SqlInt32)this; } - public SqlInt64 ToSqlInt64() + public readonly SqlInt64 ToSqlInt64() { return (SqlInt64)this; } - public SqlMoney ToSqlMoney() + public readonly SqlMoney ToSqlMoney() { return (SqlMoney)this; } - public SqlDecimal ToSqlDecimal() + public readonly SqlDecimal ToSqlDecimal() { return (SqlDecimal)this; } - public SqlSingle ToSqlSingle() + public readonly SqlSingle ToSqlSingle() { return (SqlSingle)this; } - public SqlGuid ToSqlGuid() + public readonly SqlGuid ToSqlGuid() { return (SqlGuid)this; } @@ -698,7 +698,7 @@ public static CompareOptions CompareOptionsFromSqlCompareOptions(SqlCompareOptio return options; } - private bool FBinarySort() + private readonly bool FBinarySort() { return (!IsNull && (m_flag & (SqlCompareOptions.BinarySort | SqlCompareOptions.BinarySort2)) != 0); } @@ -844,7 +844,7 @@ public int CompareTo(object? value) throw ADP.WrongType(value!.GetType(), typeof(SqlString)); } - public int CompareTo(SqlString value) + public readonly int CompareTo(SqlString value) { // If both Null, consider them equal. // Otherwise, Null is less than anything. @@ -870,7 +870,7 @@ public int CompareTo(SqlString value) } // Compares this instance with a specified object - public override bool Equals(object? value) + public override readonly bool Equals(object? value) { if (!(value is SqlString)) { @@ -918,7 +918,7 @@ public override int GetHashCode() return SqlBinary.HashByteArray(rgbSortKey, rgbSortKey.Length); } - XmlSchema? IXmlSerializable.GetSchema() { return null; } + readonly XmlSchema? IXmlSerializable.GetSchema() { return null; } void IXmlSerializable.ReadXml(XmlReader reader) {