fx\src\data\Microsoft\SqlServer\Server\ValueUtilsSmi.cs (17)
405SqlString stringValue;
421stringValue = (SqlString) obj;
630internal static SqlString GetSqlString( SmiEventSink_Default sink, ITypedGettersV3 getters, int ordinal, SmiMetaData metaData ) {
631SqlString result;
634result = SqlString.Null;
645result = SqlString.Null;
656result = (SqlString) obj;
1087SqlString.Null, // SqlDbType.Char
1094SqlString.Null, // SqlDbType.NChar
1095SqlString.Null, // SqlDbType.NText
1096SqlString.Null, // SqlDbType.NVarChar
1102SqlString.Null, // SqlDbType.Text
1106SqlString.Null, // SqlDbType.VarChar
1540internal static void SetSqlString( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, SqlString value ) {
1628case ExtendedClrTypeCode.SqlString: SetSqlString_LengthChecked( sink, setters, ordinal, metaData, (SqlString) value, offset ); break;
2698private static void SetSqlString_LengthChecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, SqlString value, int offset ) {
3573private static void SetSqlString_Unchecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, SqlString value, int offset, int length ) {
fx\src\data\System\Data\SqlClient\SqlEnums.cs (15)
334else if (dataType == typeof(SqlString)) {
335return ((inferLen && !((SqlString)value).IsNull) ? PromoteStringType(((SqlString)value).Value) : MetaNVarChar); // MDAC 87587
390else if (sqlType == typeof(SqlString)) return SqlString.Null;
432else if (sqlVal is SqlString)
433comVal = ((SqlString)sqlVal).Value;
755(255, 255, -1, false, false, false, TdsEnums.SQLBIGCHAR, TdsEnums.SQLBIGCHAR, MetaTypeName.CHAR, typeof(System.String), typeof(SqlString), SqlDbType.Char, DbType.AnsiStringFixedLength, 7);
758(255, 255, -1, false, false, false, TdsEnums.SQLBIGVARCHAR, TdsEnums.SQLBIGVARCHAR, MetaTypeName.VARCHAR, typeof(System.String), typeof(SqlString), SqlDbType.VarChar, DbType.AnsiString, 7);
761(255, 255, -1, false, true, true, TdsEnums.SQLBIGVARCHAR, TdsEnums.SQLBIGVARCHAR, MetaTypeName.VARCHAR, typeof(System.String), typeof(SqlString), SqlDbType.VarChar, DbType.AnsiString, 7);
764(255, 255, -1, false, true, false, TdsEnums.SQLTEXT, TdsEnums.SQLTEXT, MetaTypeName.TEXT, typeof(System.String), typeof(SqlString), SqlDbType.Text, DbType.AnsiString, 0);
770(255, 255, -1, false, false, false, TdsEnums.SQLNCHAR, TdsEnums.SQLNCHAR, MetaTypeName.NCHAR, typeof(System.String), typeof(SqlString), SqlDbType.NChar, DbType.StringFixedLength, 7);
773(255, 255, -1, false, false, false, TdsEnums.SQLNVARCHAR, TdsEnums.SQLNVARCHAR, MetaTypeName.NVARCHAR, typeof(System.String), typeof(SqlString), SqlDbType.NVarChar, DbType.String, 7);
776(255, 255, -1, false, true, true, TdsEnums.SQLNVARCHAR, TdsEnums.SQLNVARCHAR, MetaTypeName.NVARCHAR, typeof(System.String), typeof(SqlString), SqlDbType.NVarChar, DbType.String, 7);
779(255, 255, -1, false, true, false, TdsEnums.SQLNTEXT, TdsEnums.SQLNTEXT, MetaTypeName.NTEXT, typeof(System.String), typeof(SqlString), SqlDbType.NText, DbType.String, 7);
fx\src\data\System\Data\SqlClient\TdsParser.cs (19)
8331if (value is SqlString) {
8332s = ((SqlString)value).Value;
9434string stringValue = (isSqlType) ? ((SqlString)value).Value : (string)value;
9447actualLengthInBytes = ((isSqlType) ? ((SqlString)value).Value.Length : ((string)value).Length) * 2;
9551stringValue = ((SqlString)value).Value;
9563ccb = ((isSqlType) ? ((SqlString)value).Value.Length : ((string)value).Length) * 2;
9570ccb = ((isSqlType) ? ((SqlString)value).Value.Length : ((string)value).Length) * 2;
9903if(currentType == typeof(SqlString)) {
9904if (!((SqlString)value).IsNull && ((((SqlString)value).Value).Length > 0)) {
9905if ((((SqlString)value).Value[0] & 0xff) != 0xff)
10032Debug.Assert(value is SqlString);
10033return WriteEncodingChar(((SqlString)value).Value, actualLength, offset, _defaultEncoding, stateObj, canAccumulate:false);
10060Debug.Assert(value is SqlString);
10061return WriteString(((SqlString)value).Value, actualLength, offset, stateObj, canAccumulate:false);
10986Debug.Assert(value is SqlString);
10987return SerializeEncodingChar(((SqlString)value).Value, actualLength, offset, _defaultEncoding);
11004Debug.Assert(value is SqlString);
11005return SerializeString(((SqlString)value).Value, actualLength, offset);
fx\src\data\System\Data\SQLTypes\SQLString.cs (79)
69/// Represents a null value that can be assigned to the <see cref='System.Data.SqlTypes.SqlString.Value'/> property of an instance of
70/// the <see cref='System.Data.SqlTypes.SqlString'/> class.
73public static readonly SqlString Null = new SqlString(true);
125/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlString'/> class.
158/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlString'/> class.
167/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlString'/> class.
176/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlString'/> class.
206/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlString'/> class.
226/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlString'/> class.
234/// Initializes a new instance of the <see cref='System.Data.SqlTypes.SqlString'/> class.
260/// 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'/>.
342public static implicit operator SqlString(String x) {
350public static explicit operator String(SqlString x) {
356/// Converts a <see cref='System.Data.SqlTypes.SqlString'/> object to a string.
402public static SqlString operator +(SqlString x, SqlString y) {
404return SqlString.Null;
417private static int StringCompare(SqlString x, SqlString y)
460private static SqlBoolean Compare(SqlString x, SqlString y, EComparison ecExpectedResult)
510public static explicit operator SqlString(SqlBoolean x) {
518public static explicit operator SqlString(SqlByte x) {
526public static explicit operator SqlString(SqlInt16 x) {
534public static explicit operator SqlString(SqlInt32 x) {
542public static explicit operator SqlString(SqlInt64 x) {
550public static explicit operator SqlString(SqlSingle x) {
558public static explicit operator SqlString(SqlDouble x) {
566public static explicit operator SqlString(SqlDecimal x) {
574public static explicit operator SqlString(SqlMoney x) {
582public static explicit operator SqlString(SqlDateTime x) {
590public static explicit operator SqlString(SqlGuid x) {
597public SqlString Clone() {
601SqlString ret = new SqlString(m_value, m_lcid, m_flag);
610public static SqlBoolean operator==(SqlString x, SqlString y) {
617public static SqlBoolean operator!=(SqlString x, SqlString y) {
624public static SqlBoolean operator<(SqlString x, SqlString y) {
631public static SqlBoolean operator>(SqlString x, SqlString y) {
638public static SqlBoolean operator<=(SqlString x, SqlString y) {
645public static SqlBoolean operator>=(SqlString x, SqlString y) {
654public static SqlString Concat(SqlString x, SqlString y) {
658public static SqlString Add(SqlString x, SqlString y) {
663public static SqlBoolean Equals(SqlString x, SqlString y) {
668public static SqlBoolean NotEquals(SqlString x, SqlString y) {
673public static SqlBoolean LessThan(SqlString x, SqlString y) {
678public static SqlBoolean GreaterThan(SqlString x, SqlString y) {
683public static SqlBoolean LessThanOrEqual(SqlString x, SqlString y) {
688public static SqlBoolean GreaterThanOrEqual(SqlString x, SqlString y) {
801private static int CompareBinary(SqlString x, SqlString y) {
849private static int CompareBinary2(SqlString x, SqlString y) {
916if (value is SqlString) {
917SqlString i = (SqlString)value;
921throw ADP.WrongType(value.GetType(), typeof(SqlString));
924public int CompareTo(SqlString value) {
951if (!(value is SqlString)) {
955SqlString i = (SqlString)value;