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.
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 //------------------------------------------------------------------------------
17 namespace Microsoft.SqlServer.Server {
19 [ AttributeUsage( AttributeTargets.Field | AttributeTargets.Property |
20 AttributeTargets.ReturnValue | AttributeTargets.Parameter,
21 AllowMultiple = false,
23 public class SqlFacetAttribute: Attribute {
24 private bool m_IsFixedLength;
25 private int m_MaxSize;
27 private int m_Precision;
28 private bool m_IsNullable;
30 // Is this a fixed size field?
31 public bool IsFixedLength {
33 return this.m_IsFixedLength;
36 this.m_IsFixedLength = value;
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.
44 return this.m_MaxSize;
47 this.m_MaxSize = value;
51 // Precision, only valid for numeric types.
52 public int Precision {
54 return this.m_Precision;
57 this.m_Precision = value;
61 // Scale, only valid for numeric types.
71 // Is this field nullable?
72 public bool IsNullable {
74 return this.m_IsNullable;
77 this.m_IsNullable = value;