Modify documentation of APIs
[platform/core/csapi/tizenfx.git] / src / Tizen.Maps / Tizen.Maps / PlaceFilter.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System;
18
19 namespace Tizen.Maps
20 {
21     /// <summary>
22     /// Place Filter information, used in Place Discovery and Search requests
23     /// </summary>
24     public class PlaceFilter : IDisposable
25     {
26         internal Interop.PlaceFilterHandle handle;
27
28         /// <summary>
29         /// Constructs new place filter.
30         /// </summary>
31         /// <exception cref="System.InvalidOperationException">Thrown when native operation failed to allocate memory.</exception>
32         public PlaceFilter()
33         {
34             handle = new Interop.PlaceFilterHandle();
35         }
36
37         /// <summary>
38         /// Gets or sets an free-formed address string for this place filter.
39         /// </summary>
40         /// <remarks>Depending on maps provider which the application has selected,
41         /// it may treat <see cref="PlaceFilter.Name"/>, <see cref="PlaceFilter.Keyword"/> and <see cref="PlaceFilter.Address"/>
42         /// as same kind of strings to search places.</remarks>
43         public string Address
44         {
45             get
46             {
47                 return handle.PlaceAddress;
48             }
49             set
50             {
51                 handle.PlaceAddress = value;
52             }
53         }
54
55         /// <summary>
56         /// Gets or sets an instance of <see cref="PlaceCategory"/> object for this place filter.
57         /// </summary>
58         public PlaceCategory Category
59         {
60             get
61             {
62                 return new PlaceCategory(handle.Category);
63             }
64             set
65             {
66                 handle.Category = value.handle;
67             }
68         }
69
70         /// <summary>
71         /// Gets or sets a keyword for this place filter.
72         /// </summary>
73         /// <remarks>Depending on maps provider which the application has selected,
74         /// it may treat <see cref="PlaceFilter.Name"/>, <see cref="PlaceFilter.Keyword"/> and <see cref="PlaceFilter.Address"/>
75         /// as same kind of strings to search places.</remarks>
76         public string Keyword
77         {
78             get
79             {
80                 return handle.Keyword;
81             }
82             set
83             {
84                 handle.Keyword = value;
85             }
86         }
87
88         /// <summary>
89         /// Gets or sets a name for this place filter.
90         /// </summary>
91         /// <remarks>Depending on maps provider which the application has selected,
92         /// it may treat <see cref="PlaceFilter.Name"/>, <see cref="PlaceFilter.Keyword"/> and <see cref="PlaceFilter.Address"/>
93         /// as same kind of strings to search places.</remarks>
94         public string Name
95         {
96             get
97             {
98                 return handle.PlaceName;
99             }
100             set
101             {
102                 handle.PlaceName = value;
103             }
104         }
105
106         #region IDisposable Support
107         private bool _disposedValue = false;
108
109         protected virtual void Dispose(bool disposing)
110         {
111             if (!_disposedValue)
112             {
113                 handle.Dispose();
114                 _disposedValue = true;
115             }
116         }
117
118         /// <summary>
119         /// Releases all resources used by this object.
120         /// </summary>
121         public void Dispose()
122         {
123             Dispose(true);
124             GC.SuppressFinalize(this);
125         }
126         #endregion
127     }
128 }