Exemple #1
0
 public void Dispose()
 {
     try
     {
         if (Getter != null)
         {
             Getter.Dispose();
             Getter = null;
         }
     } catch { }
 }
        private bool disposedValue = false; // To detect redundant calls

        void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    // TODO: dispose managed state (managed objects).
                    Getter.Dispose();
                }

                // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
                // TODO: set large fields to null.

                disposedValue = true;
            }
        }
Exemple #3
0
 /// <summary>
 /// Removes both the getter and the setter spies, reverting the target method to call-through always.
 /// </summary>
 public void Dispose()
 {
     Getter?.Dispose();
     Setter?.Dispose();
 }