2004-03-10 Umadevi S (sumadevi@novell.com)
[mono.git] / mcs / class / System.Data / System.Data.Sql / SqlUserDefinedTypeAttribute.cs
1 //
2 // System.Data.Sql.SqlUserDefinedTypeAttribute
3 //
4 // Author:
5 //   Tim Coleman (tim@timcoleman.com)
6 //
7 // Copyright (C) Tim Coleman, 2003
8 //
9
10 #if NET_1_2
11
12 using System;
13
14 namespace System.Data.Sql {
15         [AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
16         public sealed class SqlUserDefinedTypeAttribute : Attribute
17         {
18                 #region Fields
19
20                 public const int MaxByteSizeValue = 8000;
21
22                 Format format;
23                 bool isByteOrdered;
24                 bool isFixedLength;
25                 int maxByteSize;
26
27                 #endregion // Fields
28
29                 #region Constructors
30
31                 public SqlUserDefinedTypeAttribute (Format f)
32                 {
33                         Format = f;
34                         IsByteOrdered = false;
35                         IsFixedLength = false;
36                         MaxByteSize = MaxByteSizeValue;
37                 }
38
39                 #endregion // Constructors
40
41                 #region Properties
42
43                 public Format Format { 
44                         get { return format; }
45                         set { format = value; }
46                 }
47
48                 public bool IsByteOrdered {
49                         get { return isByteOrdered; }
50                         set { isByteOrdered = value; }
51                 }
52
53                 public bool IsFixedLength {
54                         get { return isFixedLength; }
55                         set { isFixedLength = value; }
56                 }
57
58                 public int MaxByteSize {
59                         get { return maxByteSize; }
60                         set { maxByteSize = value; }
61                 }
62
63                 #endregion // Properties
64         }
65 }
66
67 #endif