Ooui-tws-port/Ooui.Forms/VisualElementRenderer.cs

46 lines
1.2 KiB
C#
Raw Normal View History

2017-11-09 07:57:04 +00:00
using System;
using Xamarin.Forms;
namespace Ooui.Forms
{
public class VisualElementRenderer<TElement> : Element, IVisualElementRenderer where TElement : VisualElement
{
public VisualElementRenderer (string tagName) : base (tagName)
{
}
#region IDisposable Support
private bool disposedValue = false; // To detect redundant calls
protected virtual void Dispose (bool disposing)
{
if (!disposedValue) {
if (disposing) {
// TODO: dispose managed state (managed objects).
}
// TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
// TODO: set large fields to null.
disposedValue = true;
}
}
// TODO: override a finalizer only if Dispose(bool disposing) above has code to free unmanaged resources.
// ~VisualElementRenderer() {
// // Do not change this code. Put cleanup code in Dispose(bool disposing) above.
// Dispose(false);
// }
// This code added to correctly implement the disposable pattern.
public void Dispose ()
{
// Do not change this code. Put cleanup code in Dispose(bool disposing) above.
Dispose (true);
// TODO: uncomment the following line if the finalizer is overridden above.
// GC.SuppressFinalize(this);
}
#endregion
}
}