Update Reference Sources to .NET Framework 4.6.1
[mono.git] / mcs / class / referencesource / System.Data / System / Data / Sql / SqlFacetAttribute.cs
1 //------------------------------------------------------------------------------
2 //  <copyright file="SqlFacetAttribute.cs" company="Microsoft Corporation">
3 //     Copyright (c) Microsoft Corporation. All Rights Reserved.
4 //     Information Contained Herein is Proprietary and Confidential.
5 //  </copyright>
6 // <owner current="true" primary="true">[....]</owner>
7 // <owner current="true" primary="true">[....]</owner>
8 // <owner current="true" primary="true">daltudov</owner>
9 // <owner current="true" primary="true">[....]</owner>
10 // <owner current="true" primary="false">beysims</owner>
11 // <owner current="true" primary="false">[....]</owner>
12 // <owner current="true" primary="false">vadimt</owner>
13 //------------------------------------------------------------------------------
14
15 using System; 
16
17 namespace Microsoft.SqlServer.Server {
18
19     [ AttributeUsage( AttributeTargets.Field | AttributeTargets.Property |
20                       AttributeTargets.ReturnValue | AttributeTargets.Parameter,
21                       AllowMultiple = false,
22                       Inherited = false ) ]
23     public class SqlFacetAttribute: Attribute {
24         private bool    m_IsFixedLength;
25         private int     m_MaxSize;
26         private int     m_Scale;
27         private int     m_Precision;
28         private bool    m_IsNullable;
29
30         // Is this a fixed size field?
31         public bool IsFixedLength {
32             get {
33                 return this.m_IsFixedLength;
34             }
35             set {
36                 this.m_IsFixedLength = value;
37             }
38         }
39
40         // The maximum size of the field (in bytes or characters depending on the field type)
41         //  or -1 if the size can be unlimited.
42         public int MaxSize {
43             get {
44                 return this.m_MaxSize;
45             }
46             set {
47                 this.m_MaxSize = value;
48             }
49         }
50
51         // Precision, only valid for numeric types.
52         public int Precision {
53             get {
54                 return this.m_Precision;
55             }
56             set {
57                 this.m_Precision = value;
58             }
59         }
60
61         // Scale, only valid for numeric types.
62         public int Scale {
63             get {
64                 return this.m_Scale;
65             }
66             set {
67                 this.m_Scale = value;
68             }
69         }
70
71         // Is this field nullable?
72         public bool IsNullable {
73             get {
74                 return this.m_IsNullable;
75             }
76             set {
77                 this.m_IsNullable = value;
78             }
79         }
80     }
81 }