Tizen 2.1 base
[external/enchant.git] / src / bindings / Enchant.Net / DictionaryInfo.cs
1 /* Copyright (c) 2007 Eric Scott Albright\r
2  * \r
3  * Permission is hereby granted, free of charge, to any person obtaining a copy\r
4  * of this software and associated documentation files (the "Software"), to deal\r
5  * in the Software without restriction, including without limitation the rights\r
6  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
7  * copies of the Software, and to permit persons to whom the Software is\r
8  * furnished to do so, subject to the following conditions:\r
9  * \r
10  * The above copyright notice and this permission notice shall be included in\r
11  * all copies or substantial portions of the Software.\r
12  * \r
13  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
14  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
15  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
16  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
17  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
18  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
19  * THE SOFTWARE.\r
20  */\r
21 \r
22 using System;\r
23 \r
24 namespace Enchant\r
25 {\r
26         public class DictionaryInfo\r
27         {\r
28                 private readonly string _language_tag;\r
29                 private readonly ProviderInfo _provider_info;\r
30 \r
31                 internal DictionaryInfo(string language_tag, ProviderInfo provider_info)\r
32                 {\r
33                         if (language_tag == null)\r
34                         {\r
35                                 throw new ArgumentNullException("language_tag");\r
36                         }\r
37                         if (provider_info == null)\r
38                         {\r
39                                 throw new ArgumentNullException("provider_info");\r
40                         }\r
41                         _language_tag = language_tag;\r
42                         _provider_info = provider_info;\r
43                 }\r
44 \r
45                 public string Language\r
46                 {\r
47                         get { return _language_tag; }\r
48                 }\r
49 \r
50                 public ProviderInfo Provider\r
51                 {\r
52                         get { return _provider_info; }\r
53                 }\r
54         }\r
55 }