7 instantiations of SqlBinary
System.Data.Common (7)
System\Data\Common\SQLConvert.cs (1)
569return new SqlBinary(Convert.FromBase64String((string)value));
System\Data\SQLTypes\SQLBinary.cs (5)
106public static implicit operator SqlBinary(byte[] x) => new SqlBinary(x); 138return new SqlBinary(rgbResult); 198return x.IsNull ? SqlBinary.Null : new SqlBinary(x.ToByteArray()); 465return new SqlBinary(bytes, copy: false); 472public static readonly SqlBinary Null = new SqlBinary(null, copy: false);
System\Data\SQLTypes\SQLBytes.cs (1)
434return IsNull ? SqlBinary.Null : new SqlBinary(Value);
98 references to SqlBinary
netstandard (1)
netstandard.cs (1)
573[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlBinary))]
System.Data (1)
src\libraries\shims\System.Data\ref\System.Data.cs (1)
229[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlBinary))]
System.Data.Common (96)
System\Data\ColumnTypeConverter.cs (1)
46typeof(SqlBinary),
System\Data\Common\DataStorage.cs (1)
95typeof(SqlBinary),
System\Data\Common\SQLConvert.cs (5)
275public static SqlBinary ConvertToSqlBinary(object value) 280return SqlBinary.Null; 287StorageType.SqlBinary => (SqlBinary)value, 289_ => throw ExceptionBuilder.ConvertFailed(valueType, typeof(SqlBinary)), 657return Convert.ToBase64String(((SqlBinary)value).Value);
System\Data\Common\SQLTypes\SQLBinaryStorage.cs (13)
16private SqlBinary[] _values = default!; // Late-initialized 18public SqlBinaryStorage(DataColumn column) : base(column, typeof(SqlBinary), SqlBinary.Null, SqlBinary.Null, StorageType.SqlBinary) 47throw ExprException.Overflow(typeof(SqlBinary)); 60return _values[recordNo].CompareTo((SqlBinary)value); 100SqlBinary newValue = default; 110return ((SqlBinary)tmp); 117Debug.Assert((value.GetType() == typeof(SqlBinary)), "wrong input type"); 130return new SqlBinary[recordCount]; 135SqlBinary[] typedStore = (SqlBinary[])store; 142_values = (SqlBinary[])store;
System\Data\Common\SQLTypes\SQLBytesStorage.cs (2)
98SqlBinary newValue = default; 108return (new SqlBytes((SqlBinary)tmp));
System\Data\SQLTypes\SQLBinary.cs (63)
15public struct SqlBinary : INullable, IComparable, IXmlSerializable, IEquatable<SqlBinary> 21/// Initializes a new instance of the <see cref='SqlBinary'/> class with a binary object to be stored. 38/// Initializes a new instance of the <see cref='SqlBinary'/> class with a binary object to be stored. This constructor will not copy the value. 104/// Converts a binary object to a <see cref='SqlBinary'/>. 106public static implicit operator SqlBinary(byte[] x) => new SqlBinary(x); 111/// Converts a <see cref='SqlBinary'/> to a binary object. 113public static explicit operator byte[]?(SqlBinary x) => x.Value; 116/// Returns a string describing a <see cref='SqlBinary'/> object. 126/// Adds two instances of <see cref='SqlBinary'/> together. 129public static SqlBinary operator +(SqlBinary x, SqlBinary y) 194/// Converts a <see cref='System.Data.SqlTypes.SqlGuid'/> to a <see cref='SqlBinary'/>. 196public static explicit operator SqlBinary(SqlGuid x) // Alternative method: SqlGuid.ToSqlBinary 198return x.IsNull ? SqlBinary.Null : new SqlBinary(x.ToByteArray()); 205/// Compares two instances of <see cref='SqlBinary'/> for equality. 207public static SqlBoolean operator ==(SqlBinary x, SqlBinary y) 216/// Compares two instances of <see cref='SqlBinary'/> 219public static SqlBoolean operator !=(SqlBinary x, SqlBinary y) 225/// Compares the first <see cref='SqlBinary'/> for being less than the 226/// second <see cref='SqlBinary'/>. 228public static SqlBoolean operator <(SqlBinary x, SqlBinary y) 237/// Compares the first <see cref='SqlBinary'/> for being greater than the second <see cref='SqlBinary'/>. 239public static SqlBoolean operator >(SqlBinary x, SqlBinary y) 248/// Compares the first <see cref='SqlBinary'/> for being less than or equal to the second <see cref='SqlBinary'/>. 250public static SqlBoolean operator <=(SqlBinary x, SqlBinary y) 260/// Compares the first <see cref='SqlBinary'/> for being greater than or equal the second <see cref='SqlBinary'/>. 262public static SqlBoolean operator >=(SqlBinary x, SqlBinary y) 276public static SqlBinary Add(SqlBinary x, SqlBinary y) 281public static SqlBinary Concat(SqlBinary x, SqlBinary y) 287public static SqlBoolean Equals(SqlBinary x, SqlBinary y) 293public static SqlBoolean NotEquals(SqlBinary x, SqlBinary y) 299public static SqlBoolean LessThan(SqlBinary x, SqlBinary y) 305public static SqlBoolean GreaterThan(SqlBinary x, SqlBinary y) 311public static SqlBoolean LessThanOrEqual(SqlBinary x, SqlBinary y) 317public static SqlBoolean GreaterThanOrEqual(SqlBinary x, SqlBinary y) 337if (value is SqlBinary i) 341throw ADP.WrongType(value!.GetType(), typeof(SqlBinary)); 344public int CompareTo(SqlBinary value) 360value is SqlBinary other && Equals(other); 365public bool Equals(SqlBinary other) => 463public static SqlBinary WrapBytes(byte[] bytes) 470/// instance of the <see cref='SqlBinary'/> class. 472public static readonly SqlBinary Null = new SqlBinary(null, copy: false);
System\Data\SQLTypes\SQLBytes.cs (5)
85public SqlBytes(SqlBinary value) : this(value.IsNull ? null : value.Value!) 432public SqlBinary ToSqlBinary() 434return IsNull ? SqlBinary.Null : new SqlBinary(Value); 442public static explicit operator SqlBinary(SqlBytes value) 448public static explicit operator SqlBytes(SqlBinary value)
System\Data\SQLTypes\SQLGuid.cs (3)
154public static explicit operator SqlGuid(SqlBinary x) 246public SqlBinary ToSqlBinary() 248return (SqlBinary)this;
System\Data\SQLTypes\SQLString.cs (1)
917return SqlBinary.HashByteArray(rgbSortKey, rgbSortKey.Length);
System\Data\TypeLimiter.cs (1)
151typeof(SqlBinary),
System\Data\xmlsaver.cs (1)
269if (type == typeof(SqlBinary))