public Transit()
{
_handle = Interop.Elementary.elm_transit_add();
- DeletedCallback = (ptr1, ptr2) => {
+ DeletedCallback = (ptr1, ptr2) =>
+ {
Deleted?.Invoke(this, EventArgs.Empty);
Dispose(true);
};
((INotifyCollectionChanged)_chains).CollectionChanged += OnChaninCollectionChanged;
}
+ /// <summary>
+ /// Destroy the Transit object.
+ /// </summary>
~Transit()
{
Dispose(false);
Interop.Elementary.elm_transit_effect_add(_handle, EffectTransitionCallback, _effect, EffectEndCallback);
}
+ /// <summary>
+ /// Destroy current object
+ /// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
- protected virtual void Dispose(bool isDisposing)
+ /// <summary>
+ /// Releases all resources currently used by this instance.
+ /// </summary>
+ /// <param name="disposing">
+ /// true if managed resources should be disposed
+ /// otherwise, false.
+ /// </param>
+ protected virtual void Dispose(bool disposing)
{
if (_isDisposed)
return;
- if (isDisposing)
+ if (disposing)
{
((INotifyCollectionChanged)_chains).CollectionChanged -= OnChaninCollectionChanged;
_chains.Clear();
Interop.Elementary.elm_transit_chain_transit_del(_handle, transit._handle);
}
}
-}
+}
\ No newline at end of file