b086b3fbc0b7bd080e81d1cda791557e342ab1d7
[mono.git] / mcs / class / referencesource / System.Data.Entity.Design / System / Data / Entity / Design / EntityStoreSchemaFilterEntry.cs
1 //---------------------------------------------------------------------
2 // <copyright file="EntityStoreSchemaFilterEntry.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.Diagnostics;
13 using System.Data.Entity.Design.Common;
14
15 namespace System.Data.Entity.Design
16 {
17     /// <summary>
18     /// This class represent a single filter entry
19     /// </summary>
20     public class EntityStoreSchemaFilterEntry
21     {
22         private string _catalog;
23         private string _schema;
24         private string _name;
25         private EntityStoreSchemaFilterObjectTypes _types;
26         private EntityStoreSchemaFilterEffect _effect;
27
28         /// <summary>
29         /// Creates a EntityStoreSchemaFilterEntry
30         /// </summary>
31         /// <param name="catalog">The pattern to use to select the appropriate catalog or null to not limit by catalog.</param>
32         /// <param name="schema">The pattern to use to select the appropriate schema or null to not limit by schema.</param>
33         /// <param name="name">The pattern to use to select the appropriate name or null to not limit by name.</param>
34         /// <param name="types">The type of objects to apply this filter to.</param>
35         /// <param name="effect">The effect that this filter should have on the results.</param>
36         public EntityStoreSchemaFilterEntry(string catalog, string schema, string name, EntityStoreSchemaFilterObjectTypes types, EntityStoreSchemaFilterEffect effect)
37         {
38             if (types == EntityStoreSchemaFilterObjectTypes.None)
39             {
40                 throw EDesignUtil.Argument("types");
41             }
42             _catalog = catalog;
43             _schema = schema;
44             _name = name;
45             _types = types;
46             _effect = effect;
47         }
48
49         /// <summary>
50         /// Creates a EntityStoreSchemaFilterEntry
51         /// </summary>
52         /// <param name="catalog">The pattern to use to select the appropriate catalog or null to not limit by catalog.</param>
53         /// <param name="schema">The pattern to use to select the appropriate schema or null to not limit by schema.</param>
54         /// <param name="name">The pattern to use to select the appropriate name or null to not limit by name.</param>
55         public EntityStoreSchemaFilterEntry(string catalog, string schema, string name)
56             :this(catalog, schema, name, EntityStoreSchemaFilterObjectTypes.All, EntityStoreSchemaFilterEffect.Allow)
57         {
58         }
59
60         /// <summary>
61         /// Gets the pattern that will be used to select the appropriate catalog.
62         /// </summary>
63         public string Catalog
64         {
65             [DebuggerStepThroughAttribute]
66             get { return _catalog; }
67         }
68
69         /// <summary>
70         /// Gets the pattern that will be used to select the appropriate schema.
71         /// </summary>
72         public string Schema
73         {
74             [DebuggerStepThroughAttribute]
75             get { return _schema; }
76         }
77
78         /// <summary>
79         /// Gets the pattern that will be used to select the appropriate name.
80         /// </summary>
81         public string Name
82         {
83             [DebuggerStepThroughAttribute]
84             get { return _name; }
85         }
86
87         /// <summary>
88         /// Gets the types of objects that this filter applies to.
89         /// </summary>
90         public EntityStoreSchemaFilterObjectTypes Types
91         {
92             [DebuggerStepThroughAttribute]
93             get { return _types; }
94         }
95
96         /// <summary>
97         /// Gets the effect that this filter has on results.
98         /// </summary>
99         public EntityStoreSchemaFilterEffect Effect
100         {
101             [DebuggerStepThroughAttribute]
102             get { return _effect; }
103         }
104     }
105 }