Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Wraith2 committed Jun 24, 2020
1 parent 5c66f1b commit 6ce2966
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ namespace Microsoft.Data.SqlClient
// avoiding the use of closures and allowing caching/reuse of the instances for frequently used async
// calls
//
// DO derive from this and seal and your class
// DO derive from this and seal your class
// DO add additional fields or properties needed for the async operation and then override Clear to zero them
// DO override AfterClear and use the owner parameter to return the object to a cache location if you have one, this is the purpose of the method
// CONSIDER creating your own Set method that calls the base Set rather than providing a parameterized ctor, it is friendlier to caching
// DO NOT use this class after Dispose has been called. It will not throw ObjectDisposedException but it will be a cleared object
// DO NOT use this class' state after Dispose has been called. It will not throw ObjectDisposedException but it will be a cleared object

internal abstract class AAsyncCallContext<TOwner, TTask> : IDisposable
where TOwner : class
Expand Down Expand Up @@ -50,7 +50,7 @@ protected void ClearCore()
}

/// <summary>
/// overrride this method to cleanup instance data before ClearCore is called which will blank the base data
/// override this method to cleanup instance data before ClearCore is called which will blank the base data
/// </summary>
protected virtual void Clear()
{
Expand All @@ -61,7 +61,6 @@ protected virtual void Clear()
/// </summary>
protected virtual void AfterCleared(TOwner owner)
{

}

public void Dispose()
Expand Down

0 comments on commit 6ce2966

Please sign in to comment.