17 instantiations of SqlString
System.Data.Common (17)
System\Data\Common\SQLConvert.cs (1)
597return new SqlString((string)value);
System\Data\SQLTypes\SQLString.cs (16)
49public static readonly SqlString Null = new SqlString(true); 301return new SqlString(x); 358return new SqlString(x.m_lcid, x.m_flag, x.m_value + y.m_value, 460return x.IsNull ? Null : new SqlString((x.Value).ToString()); 466return x.IsNull ? Null : new SqlString((x.Value).ToString((IFormatProvider)null!)); 472return x.IsNull ? Null : new SqlString((x.Value).ToString((IFormatProvider)null!)); 478return x.IsNull ? Null : new SqlString((x.Value).ToString((IFormatProvider)null!)); 484return x.IsNull ? Null : new SqlString((x.Value).ToString((IFormatProvider)null!)); 490return x.IsNull ? Null : new SqlString((x.Value).ToString((IFormatProvider)null!)); 496return x.IsNull ? Null : new SqlString((x.Value).ToString((IFormatProvider)null!)); 502return x.IsNull ? Null : new SqlString(x.ToString()); 508return x.IsNull ? Null : new SqlString(x.ToString()); 514return x.IsNull ? Null : new SqlString(x.ToString()); 520return x.IsNull ? Null : new SqlString(x.ToString()); 526return new SqlString(true); 529SqlString ret = new SqlString(m_value!, m_lcid, m_flag);
167 references to SqlString
netstandard (1)
netstandard.cs (1)
590[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlString))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
247[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlString))]
System.Data.Common (165)
System\Data\ColumnTypeConverter.cs (1)
44typeof(SqlString),
System\Data\Common\DataStorage.cs (1)
109typeof(SqlString),
System\Data\Common\SQLConvert.cs (5)
293public static SqlString ConvertToSqlString(object value) 298return SqlString.Null; 305StorageType.SqlString => (SqlString)value, 307_ => throw ExceptionBuilder.ConvertFailed(valueType, typeof(SqlString)), 685return ((SqlString)value).Value;
System\Data\Common\SQLTypes\SQLCharsStorage.cs (2)
101SqlString newValue = default; 112return (new SqlChars((SqlString)tmp));
System\Data\Common\SQLTypes\SQLStringStorage.cs (16)
16private SqlString[] _values = default!; // Late-initialized 19: base(column, typeof(SqlString), SqlString.Null, SqlString.Null, StorageType.SqlString) 89throw ExprException.Overflow(typeof(SqlString)); 99public int Compare(SqlString valueNo1, SqlString valueNo2) 116return Compare(_values[recordNo], (SqlString)value); 140SqlString value = _values[record]; 163SqlString newValue = default; 173return ((SqlString)tmp); 181Debug.Assert((value.GetType() == typeof(SqlString)), "wrong input type"); 194return new SqlString[recordCount]; 199SqlString[] typedStore = (SqlString[])store; 206_values = (SqlString[])store;
System\Data\DataColumn.cs (3)
525else if (typeof(SqlString) == value) 929if ((DataType != typeof(string)) && (DataType != typeof(SqlString))) 1701if (!DataStorage.IsObjectNull(value) && ((SqlString)value).Value.Length > MaxLength)
System\Data\Filter\BinaryNode.cs (3)
1543if (!(vRight is string) && !(vRight is SqlString)) 1566if (!(vLeft is string) && !(vLeft is SqlString)) 1571string tempStr = vLeft is SqlString sqlString ? sqlString.Value : (string)vLeft;
System\Data\Filter\FunctionNode.cs (15)
163if ((typeof(string) != (argumentValues[i].GetType())) && (typeof(SqlString) != (argumentValues[i].GetType()))) 368if (argumentValues[0] is SqlString) 369argumentValues[0] = ((SqlString)argumentValues[0]).Value; 371if (argumentValues[1] is SqlString) 372argumentValues[1] = ((SqlString)argumentValues[1]).Value; 405Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid argument type for {s_funcs[_info]._name}"); 407if (argumentValues[0] is SqlString) 409if (((SqlString)argumentValues[0]).IsNull) 415argumentValues[0] = ((SqlString)argumentValues[0]).Value; 424Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid first argument {argumentValues[0].GetType().FullName} in {s_funcs[_info]._name}"); 446if (argumentValues[0] is SqlString) 447argumentValues[0] = ((SqlString)argumentValues[0]).Value; 466Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid argument type for {s_funcs[_info]._name}"); 471if (argumentValues[0] is SqlString) 472argumentValues[0] = ((SqlString)argumentValues[0]).Value;
System\Data\ProviderBase\SchemaMapping.cs (2)
320if ((null == xml) && (_readerDataValues[i] is System.Data.SqlTypes.SqlString x)) 992if (fieldType == typeof(string) || (fieldType == typeof(SqlTypes.SqlString)))
System\Data\SQLTypes\SQLBoolean.cs (3)
286public static explicit operator SqlBoolean(SqlString x) 428public SqlString ToSqlString() 430return (SqlString)this;
System\Data\SQLTypes\SQLByte.cs (3)
260public static explicit operator SqlByte(SqlString x) 437public SqlString ToSqlString() 439return (SqlString)this;
System\Data\SQLTypes\SQLChars.cs (5)
81public SqlChars(SqlString value) : this(value.IsNull ? null : value.Value.ToCharArray()) 397public SqlString ToSqlString() 399return IsNull ? SqlString.Null : new string(Value); 407public static explicit operator SqlString(SqlChars value) 413public static explicit operator SqlChars(SqlString value)
System\Data\SQLTypes\SQLDateTime.cs (3)
472public static explicit operator SqlDateTime(SqlString x) 580public SqlString ToSqlString() 582return (SqlString)this;
System\Data\SQLTypes\SQLDecimal.cs (3)
1793public static explicit operator SqlDecimal(SqlString x) 3011public SqlString ToSqlString() 3013return (SqlString)this;
System\Data\SQLTypes\SQLDouble.cs (3)
211public static explicit operator SqlDouble(SqlString x) 355public SqlString ToSqlString() 357return (SqlString)this;
System\Data\SQLTypes\SQLGuid.cs (3)
148public static explicit operator SqlGuid(SqlString x) 241public SqlString ToSqlString() 243return (SqlString)this;
System\Data\SQLTypes\SQLInt16.cs (3)
264public static explicit operator SqlInt16(SqlString x) 440public SqlString ToSqlString() 442return (SqlString)this;
System\Data\SQLTypes\SQLInt32.cs (3)
273public static explicit operator SqlInt32(SqlString x) 455public SqlString ToSqlString() 457return (SqlString)this;
System\Data\SQLTypes\SQLInt64.cs (3)
332public static explicit operator SqlInt64(SqlString x) 514public SqlString ToSqlString() 516return (SqlString)this;
System\Data\SQLTypes\SQLMoney.cs (3)
363public static explicit operator SqlMoney(SqlString x) 508public SqlString ToSqlString() 510return (SqlString)this;
System\Data\SQLTypes\SQLSingle.cs (3)
221public static explicit operator SqlSingle(SqlString x) 364public SqlString ToSqlString() 366return (SqlString)this;
System\Data\SQLTypes\SQLString.cs (77)
37public struct SqlString : INullable, IComparable, IXmlSerializable, IEquatable<SqlString> 46/// Represents a null value that can be assigned to the <see cref='System.Data.SqlTypes.SqlString.Value'/> property of an instance of 47/// the <see cref='System.Data.SqlTypes.SqlString'/> class. 49public static readonly SqlString Null = new SqlString(true); 101/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlString'/> class. 137/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlString'/> class. 145/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlString'/> class. 153/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlString'/> class. 161/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlString'/> class. 182/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlString'/> class. 189/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlString'/> class. 217/// Gets whether the <see cref='System.Data.SqlTypes.SqlString.Value'/> of the <see cref='System.Data.SqlTypes.SqlString'/> is <see cref='System.Data.SqlTypes.SqlString.Null'/>. 299public static implicit operator SqlString(string x) 305public static explicit operator string(SqlString x) 311/// Converts a <see cref='System.Data.SqlTypes.SqlString'/> object to a string. 350public static SqlString operator +(SqlString x, SqlString y) 353return SqlString.Null; 366private static int StringCompare(SqlString x, SqlString y) 410private static SqlBoolean Compare(SqlString x, SqlString y, EComparison ecExpectedResult) 458public static explicit operator SqlString(SqlBoolean x) 464public static explicit operator SqlString(SqlByte x) 470public static explicit operator SqlString(SqlInt16 x) 476public static explicit operator SqlString(SqlInt32 x) 482public static explicit operator SqlString(SqlInt64 x) 488public static explicit operator SqlString(SqlSingle x) 494public static explicit operator SqlString(SqlDouble x) 500public static explicit operator SqlString(SqlDecimal x) 506public static explicit operator SqlString(SqlMoney x) 512public static explicit operator SqlString(SqlDateTime x) 518public static explicit operator SqlString(SqlGuid x) 523public SqlString Clone() 529SqlString ret = new SqlString(m_value!, m_lcid, m_flag); 535public static SqlBoolean operator ==(SqlString x, SqlString y) 540public static SqlBoolean operator !=(SqlString x, SqlString y) 545public static SqlBoolean operator <(SqlString x, SqlString y) 550public static SqlBoolean operator >(SqlString x, SqlString y) 555public static SqlBoolean operator <=(SqlString x, SqlString y) 560public static SqlBoolean operator >=(SqlString x, SqlString y) 570public static SqlString Concat(SqlString x, SqlString y) 575public static SqlString Add(SqlString x, SqlString y) 581public static SqlBoolean Equals(SqlString x, SqlString y) 587public static SqlBoolean NotEquals(SqlString x, SqlString y) 593public static SqlBoolean LessThan(SqlString x, SqlString y) 599public static SqlBoolean GreaterThan(SqlString x, SqlString y) 605public static SqlBoolean LessThanOrEqual(SqlString x, SqlString y) 611public static SqlBoolean GreaterThanOrEqual(SqlString x, SqlString y) 719private static int CompareBinary(SqlString x, SqlString y) 773private static int CompareBinary2(SqlString x, SqlString y) 844if (value is SqlString i) 848throw ADP.WrongType(value!.GetType(), typeof(SqlString)); 851public int CompareTo(SqlString value) 878value is SqlString other && Equals(other); 883public bool Equals(SqlString other) =>
System\Data\TypeLimiter.cs (1)
165typeof(SqlString),
System\Data\xmlsaver.cs (1)
271if (type == typeof(string) || type == typeof(SqlGuid) || type == typeof(SqlString) || type == typeof(SqlChars))