f48665f8b5af01ce3c427a3f81753e38c5cb3b95
[mono.git] / mcs / class / referencesource / System.Data.Entity / System / Data / EntityModel / SchemaObjectModel / BooleanFacetDescriptionElement.cs
1 //---------------------------------------------------------------------
2 // <copyright file="BooleanFacetDescriptionElement.cs" company="Microsoft">
3 //      Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //
6 // @owner       Microsoft
7 // @backupOwner Microsoft
8 //---------------------------------------------------------------------
9 using System;
10 using System.Collections.Generic;
11 using System.Text;
12 using System.Data.Metadata.Edm;
13 using System.Xml;
14 using System.Diagnostics;
15
16 namespace System.Data.EntityModel.SchemaObjectModel
17 {
18     internal sealed class BooleanFacetDescriptionElement : FacetDescriptionElement
19     {
20         public BooleanFacetDescriptionElement(TypeElement type, string name)
21         :base(type, name)
22         {
23         }
24
25         public override EdmType FacetType
26         {
27             get { return MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Boolean); }
28         }
29         /////////////////////////////////////////////////////////////////////
30         // Attribute Handlers
31
32         /// <summary>
33         /// Handler for the Default attribute
34         /// </summary>
35         /// <param name="reader">xml reader currently positioned at Default attribute</param>
36         protected override void HandleDefaultAttribute(XmlReader reader)
37         {
38             bool value = false;
39             if (HandleBoolAttribute(reader, ref value))
40             {
41                 DefaultValue = value;
42             }
43         }
44     }
45 }