namespace Tizen.Maps
{
/// <summary>
- /// Place Category information, used in Place Discovery and Search requests
+ /// Place category information, used in place discovery and search requests.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public class PlaceCategory : IDisposable
{
internal Interop.PlaceCategoryHandle handle;
/// <summary>
- /// Constructs search category object.
+ /// Constructs a search category object.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
/// <exception cref="System.InvalidOperationException">Thrown when native operation failed to allocate memory.</exception>
public PlaceCategory()
{
handle = nativeHandle;
}
+ /// <summary>
+ /// Destroy the PlaceCategory object.
+ /// </summary>
+ ~PlaceCategory()
+ {
+ Dispose(false);
+ }
/// <summary>
/// Gets or sets an ID for this category.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public string Id
{
get { return handle.Id; }
/// <summary>
/// Gets or sets a name for this category.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public string Name
{
get { return handle.Name; }
}
/// <summary>
- /// Gets or sets an URL for this category.
+ /// Gets or sets a URL for this category.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public string Url
{
get { return handle.Url; }
/// <summary>
/// Returns a string that represents this object.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ /// <returns>Returns a string which presents this object.</returns>
public override string ToString()
{
return $"{Name}";
#region IDisposable Support
private bool _disposedValue = false;
+ /// <summary>
+ /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
+ /// </summary>
+ /// <param name="disposing">If true, managed and unmanaged resources can be disposed, otherwise only unmanaged resources can be disposed.</param>
+ /// <since_tizen> 3 </since_tizen>
protected virtual void Dispose(bool disposing)
{
if (!_disposedValue)
{
- handle.Dispose();
+ handle?.Dispose();
_disposedValue = true;
}
}
/// <summary>
- /// Releases all resources used by this object.
+ /// Releases all the resources used by this object.
/// </summary>
+ /// <since_tizen> 3 </since_tizen>
public void Dispose()
{
Dispose(true);