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