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.
18 using System.ComponentModel;
23 /// Address information for the map point used in geocode and reverse geocode requests.
25 /// <since_tizen> 3 </since_tizen>
26 public class PlaceAddress : IDisposable
28 internal Interop.AddressHandle handle;
31 /// Constructs a map address object.
33 /// <since_tizen> 3 </since_tizen>
34 /// <exception cref="System.InvalidOperationException">Thrown when native operation failed to allocate memory.</exception>
37 handle = new Interop.AddressHandle();
40 internal PlaceAddress(Interop.AddressHandle nativeHandle)
42 handle = nativeHandle;
46 /// Destroy the PlaceAddress object.
54 /// Gets a building number for this address.
56 /// <since_tizen> 3 </since_tizen>
57 public string Building
61 return handle.Building;
65 handle.Building = value;
70 /// Gets a city name for this address.
72 /// <since_tizen> 3 </since_tizen>
86 /// Gets a country name for this address.
88 /// <since_tizen> 3 </since_tizen>
93 return handle.Country;
97 handle.Country = value;
102 /// Gets a country code for this address.
104 /// <since_tizen> 3 </since_tizen>
105 public string CountryCode
109 return handle.CountryCode;
113 handle.CountryCode = value;
118 /// Gets a county for this address.
120 /// <since_tizen> 3 </since_tizen>
125 return handle.County;
129 handle.County = value;
134 /// Gets a district name for this address.
136 /// <since_tizen> 3 </since_tizen>
137 public string District
141 return handle.District;
145 handle.District = value;
150 /// Gets a free text associated with this address.
152 /// <since_tizen> 4 </since_tizen>
153 public string FreeText
157 return handle.FreeText;
161 handle.FreeText = value;
166 /// Gets a postal code for this address.
168 /// <since_tizen> 3 </since_tizen>
169 public string PostalCode
173 return handle.PostalCode;
177 handle.PostalCode = value;
182 /// Gets a state name for this address.
184 /// <since_tizen> 3 </since_tizen>
193 handle.State = value;
198 /// Gets a street name for this address.
200 /// <since_tizen> 3 </since_tizen>
205 return handle.Street;
209 handle.Street = value;
214 /// Returns a string that represents this object.
216 /// <since_tizen> 3 </since_tizen>
217 /// <returns>Returns a string which presents this object.</returns>
218 public override string ToString()
220 return $"{FreeText}";
223 #region IDisposable Support
224 private bool _disposedValue = false;
227 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
229 /// <param name="disposing">If true, managed and unmanaged resources can be disposed, otherwise only unmanaged resources can be disposed.</param>
230 /// <since_tizen> 3 </since_tizen>
231 protected virtual void Dispose(bool disposing)
236 _disposedValue = true;
241 /// Releases all the resources used by this object.
243 /// <since_tizen> 3 </since_tizen>
244 public void Dispose()
247 GC.SuppressFinalize(this);