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 /// Address information for the map point used in Geocode and Reverse Geocode requests.
24 public class PlaceAddress : IDisposable
26 internal Interop.AddressHandle handle;
29 /// Constructs map address object.
31 /// <exception cref="System.InvalidOperationException">Thrown when native operation failed to allocate memory.</exception>
34 handle = new Interop.AddressHandle();
37 internal PlaceAddress(Interop.AddressHandle nativeHandle)
39 handle = nativeHandle;
43 /// Gets a building number for this address.
45 public string Building
49 return handle.Building;
53 handle.Building = value;
58 /// Gets a city name for this address.
73 /// Gets a country name for this address.
79 return handle.Country;
83 handle.Country = value;
88 /// Gets a country code for this address.
90 public string CountryCode
94 return handle.CountryCode;
98 handle.CountryCode = value;
103 /// Gets a county name for this address.
109 return handle.County;
113 handle.County = value;
118 /// Gets a district name for this address.
120 public string District
124 return handle.District;
128 handle.District = value;
133 /// Gets a free text associated with this address.
135 public string Freetext
139 return handle.Freetext;
143 handle.Freetext = value;
148 /// Gets a postal code for this address.
150 public string PostalCode
154 return handle.PostalCode;
158 handle.PostalCode = value;
163 /// Gets a state name for this address.
173 handle.State = value;
178 /// Gets a street name for this address.
184 return handle.Street;
188 handle.Street = value;
193 /// Returns a string that represents this object.
195 public override string ToString()
197 return $"{Freetext}";
200 #region IDisposable Support
201 private bool _disposedValue = false;
203 protected virtual void Dispose(bool disposing)
208 _disposedValue = true;
213 /// Releases all resources used by this object.
215 public void Dispose()
218 GC.SuppressFinalize(this);