2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 /// Place filter information, used in place discovery and search requests.
24 /// <since_tizen> 3 </since_tizen>
25 public class PlaceFilter : IDisposable
27 internal Interop.PlaceFilterHandle handle;
30 /// Constructs a new place filter.
32 /// <since_tizen> 3 </since_tizen>
33 /// <exception cref="System.InvalidOperationException">Thrown when native operation failed to allocate memory.</exception>
36 handle = new Interop.PlaceFilterHandle();
40 /// Destroy the PlaceFilter object.
48 /// Gets or sets a free-formed address string for this place filter.
50 /// <since_tizen> 3 </since_tizen>
51 /// <remarks>Depending on maps provider which the application has selected,
52 /// it may treat <see cref="PlaceFilter.Name"/>, <see cref="PlaceFilter.Keyword"/> and <see cref="PlaceFilter.Address"/>
53 /// as the same kind of strings to search places.</remarks>
58 return handle.PlaceAddress;
62 handle.PlaceAddress = value;
67 /// Gets or sets an instance of <see cref="PlaceCategory"/> object for this place filter.
69 /// <since_tizen> 3 </since_tizen>
70 public PlaceCategory Category
74 return new PlaceCategory(handle.Category);
78 handle.Category = value.handle;
83 /// Gets or sets a keyword for this place filter.
85 /// <since_tizen> 3 </since_tizen>
86 /// <remarks>Depending on maps provider which the application has selected,
87 /// it may treat <see cref="PlaceFilter.Name"/>, <see cref="PlaceFilter.Keyword"/> and <see cref="PlaceFilter.Address"/>
88 /// as the same kind of strings to search places.</remarks>
93 return handle.Keyword;
97 handle.Keyword = value;
102 /// Gets or sets a name for this place filter.
104 /// <since_tizen> 3 </since_tizen>
105 /// <remarks>Depending on maps provider which the application has selected,
106 /// it may treat <see cref="PlaceFilter.Name"/>, <see cref="PlaceFilter.Keyword"/> and <see cref="PlaceFilter.Address"/>
107 /// as the same kind of strings to search places.</remarks>
112 return handle.PlaceName;
116 handle.PlaceName = value;
120 #region IDisposable Support
121 private bool _disposedValue = false;
124 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
126 /// <param name="disposing">If true, managed and unmanaged resources can be disposed, otherwise only unmanaged resources can be disposed.</param>
127 /// <since_tizen> 3 </since_tizen>
128 protected virtual void Dispose(bool disposing)
133 _disposedValue = true;
138 /// Releases all the resources used by this object.
140 /// <since_tizen> 3 </since_tizen>
141 public void Dispose()
144 GC.SuppressFinalize(this);