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 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 /// Gets a building number for this address.
48 /// <since_tizen>3</since_tizen>
49 public string Building
53 return handle.Building;
57 handle.Building = value;
62 /// Gets a city name for this address.
64 /// <since_tizen>3</since_tizen>
78 /// Gets a country name for this address.
80 /// <since_tizen>3</since_tizen>
85 return handle.Country;
89 handle.Country = value;
94 /// Gets a country code for this address.
96 /// <since_tizen>3</since_tizen>
97 public string CountryCode
101 return handle.CountryCode;
105 handle.CountryCode = value;
110 /// Gets a county for this address.
112 /// <since_tizen>3</since_tizen>
117 return handle.County;
121 handle.County = value;
126 /// Gets a district name for this address.
128 /// <since_tizen>3</since_tizen>
129 public string District
133 return handle.District;
137 handle.District = value;
142 /// Gets a free text associated with this address.
144 /// <since_tizen>3</since_tizen>
145 public string FreeText
149 return handle.FreeText;
153 handle.FreeText = value;
157 [EditorBrowsableAttribute(EditorBrowsableState.Never)]
158 [Obsolete("Freetext is deprecated. Please use FreeText instead.")]
159 public string Freetext
172 /// Gets a postal code for this address.
174 /// <since_tizen>3</since_tizen>
175 public string PostalCode
179 return handle.PostalCode;
183 handle.PostalCode = value;
188 /// Gets a state name for this address.
190 /// <since_tizen>3</since_tizen>
199 handle.State = value;
204 /// Gets a street name for this address.
206 /// <since_tizen>3</since_tizen>
211 return handle.Street;
215 handle.Street = value;
220 /// Returns a string that represents this object.
222 /// <since_tizen>3</since_tizen>
223 /// <returns>Returns a string which presents this object.</returns>
224 public override string ToString()
226 return $"{FreeText}";
229 #region IDisposable Support
230 private bool _disposedValue = false;
232 protected virtual void Dispose(bool disposing)
237 _disposedValue = true;
242 /// Releases all resources used by this object.
244 /// <since_tizen>3</since_tizen>
245 public void Dispose()
248 GC.SuppressFinalize(this);