2 // Mono.Data.SybaseTypes.SybaseBinary
5 // Tim Coleman (tim@timcoleman.com)
7 // (C) Copyright Tim Coleman, 2002
10 using Mono.Data.SybaseClient;
12 using System.Data.SqlTypes;
13 using System.Globalization;
15 namespace Mono.Data.SybaseTypes {
16 public struct SybaseBinary : INullable, IComparable
23 public static readonly SybaseBinary Null;
29 public SybaseBinary (byte[] value)
40 get { return !notNull; }
43 public byte this[int index] {
46 throw new SybaseNullValueException ("The property contains Null.");
47 else if (index >= this.Length)
48 throw new SybaseNullValueException ("The index parameter indicates a position beyond the length of the byte array.");
57 throw new SybaseNullValueException ("The property contains Null.");
67 throw new SybaseNullValueException ("The property contains Null.");
78 public int CompareTo (object value)
80 throw new NotImplementedException ();
83 public static SybaseBinary Concat (SybaseBinary x, SybaseBinary y)
88 public override bool Equals (object value)
90 if (!(value is SybaseBinary))
93 return (bool) (this == (SybaseBinary)value);
96 public static SybaseBoolean Equals (SybaseBinary x, SybaseBinary y)
102 public override int GetHashCode ()
104 throw new NotImplementedException ();
111 public static SybaseBoolean GreaterThan (SybaseBinary x, SybaseBinary y)
116 public static SybaseBoolean GreaterThanOrEqual (SybaseBinary x, SybaseBinary y)
121 public static SybaseBoolean LessThan (SybaseBinary x, SybaseBinary y)
126 public static SybaseBoolean LessThanOrEqual (SybaseBinary x, SybaseBinary y)
131 public static SybaseBoolean NotEquals (SybaseBinary x, SybaseBinary y)
136 public SybaseGuid ToSybaseGuid ()
138 return new SybaseGuid (value);
141 public override string ToString ()
145 return String.Format ("SybaseBinary ({0})", Length);
153 public static SybaseBinary operator + (SybaseBinary x, SybaseBinary y)
155 throw new NotImplementedException ();
159 public static SybaseBoolean operator == (SybaseBinary x, SybaseBinary y)
161 if (x.IsNull || y.IsNull)
162 return SybaseBoolean.Null;
164 throw new NotImplementedException ();
168 public static SybaseBoolean operator > (SybaseBinary x, SybaseBinary y)
170 if (x.IsNull || y.IsNull)
171 return SybaseBoolean.Null;
173 throw new NotImplementedException ();
177 public static SybaseBoolean operator >= (SybaseBinary x, SybaseBinary y)
179 if (x.IsNull || y.IsNull)
180 return SybaseBoolean.Null;
182 throw new NotImplementedException ();
186 public static SybaseBoolean operator != (SybaseBinary x, SybaseBinary y)
188 if (x.IsNull || y.IsNull)
189 return SybaseBoolean.Null;
191 throw new NotImplementedException ();
195 public static SybaseBoolean operator < (SybaseBinary x, SybaseBinary y)
197 if (x.IsNull || y.IsNull)
198 return SybaseBoolean.Null;
200 throw new NotImplementedException ();
204 public static SybaseBoolean operator <= (SybaseBinary x, SybaseBinary y)
206 if (x.IsNull || y.IsNull)
207 return SybaseBoolean.Null;
209 throw new NotImplementedException ();
212 public static explicit operator byte[] (SybaseBinary x)
218 public static explicit operator SybaseBinary (SybaseGuid x)
220 throw new NotImplementedException ();
223 public static implicit operator SybaseBinary (byte[] x)
225 return new SybaseBinary (x);