Skip to content

Commit

Permalink
Fix BindingContext.SyncRoot
Browse files Browse the repository at this point in the history
  • Loading branch information
hughbe committed Jan 13, 2020
1 parent dcdfcad commit 200d2dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ IEnumerator IEnumerable.GetEnumerator()
/// <summary>
/// Gets an object to use for synchronization (thread safety).
/// </summary>
object ICollection.SyncRoot => null;
object ICollection.SyncRoot => this;

/// <summary>
/// Gets the System.Windows.Forms.BindingManagerBase associated with the specified
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void BindingContext_ICollection_GetProperties_ReturnsExpected()
{
ICollection context = new BindingContext();
Assert.False(context.IsSynchronized);
Assert.Null(context.SyncRoot);
Assert.Same(context, context.SyncRoot);
Assert.Empty(context);
}

Expand Down

0 comments on commit 200d2dd

Please sign in to comment.