Skip to content

Commit

Permalink
Marked the ReadOnlyNonGenericCollectionWrapper`2 type public so that …
Browse files Browse the repository at this point in the history
…it can be referenced by an extension package.

Updated the exposed API surface files correspondingly.
  • Loading branch information
logiclrd committed Aug 7, 2022
1 parent de9faf3 commit 639651e
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 1 deletion.
Expand Up @@ -2,6 +2,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;

namespace FluentAssertions.Common;
Expand Down Expand Up @@ -33,7 +34,14 @@ internal static class ReadOnlyNonGenericCollectionWrapper
}
}

internal class ReadOnlyNonGenericCollectionWrapper<TCollection, TItem> : ICollection<TItem>
/// <summary>
/// This type exists to serve internal functionality in FluentAssertions. It is marked <c>public</c> to allow it to be
/// referenced from packages that extend FluentAssertion's functionality.
/// </summary>
/// <typeparam name="TCollection">Collection type.</typeparam>
/// <typeparam name="TItem">Item type.</typeparam>
[DebuggerNonUserCode]
public class ReadOnlyNonGenericCollectionWrapper<TCollection, TItem> : ICollection<TItem>
where TCollection : ICollection
{
public TCollection UnderlyingCollection { get; }
Expand Down
Expand Up @@ -647,6 +647,20 @@ namespace FluentAssertions.Common
{
System.TimeSpan Elapsed { get; }
}
public class ReadOnlyNonGenericCollectionWrapper<TCollection, TItem> : System.Collections.Generic.ICollection<TItem>, System.Collections.Generic.IEnumerable<TItem>, System.Collections.IEnumerable
where TCollection : System.Collections.ICollection
{
public ReadOnlyNonGenericCollectionWrapper(TCollection collection) { }
public int Count { get; }
public bool IsReadOnly { get; }
public TCollection UnderlyingCollection { get; }
public void Add(TItem item) { }
public void Clear() { }
public bool Contains(TItem item) { }
public void CopyTo(TItem[] array, int arrayIndex) { }
public System.Collections.Generic.IEnumerator<TItem> GetEnumerator() { }
public bool Remove(TItem item) { }
}
public static class Services
{
public static FluentAssertions.Common.Configuration Configuration { get; }
Expand Down
Expand Up @@ -659,6 +659,20 @@ namespace FluentAssertions.Common
{
System.TimeSpan Elapsed { get; }
}
public class ReadOnlyNonGenericCollectionWrapper<TCollection, TItem> : System.Collections.Generic.ICollection<TItem>, System.Collections.Generic.IEnumerable<TItem>, System.Collections.IEnumerable
where TCollection : System.Collections.ICollection
{
public ReadOnlyNonGenericCollectionWrapper(TCollection collection) { }
public int Count { get; }
public bool IsReadOnly { get; }
public TCollection UnderlyingCollection { get; }
public void Add(TItem item) { }
public void Clear() { }
public bool Contains(TItem item) { }
public void CopyTo(TItem[] array, int arrayIndex) { }
public System.Collections.Generic.IEnumerator<TItem> GetEnumerator() { }
public bool Remove(TItem item) { }
}
public static class Services
{
public static FluentAssertions.Common.Configuration Configuration { get; }
Expand Down
Expand Up @@ -647,6 +647,20 @@ namespace FluentAssertions.Common
{
System.TimeSpan Elapsed { get; }
}
public class ReadOnlyNonGenericCollectionWrapper<TCollection, TItem> : System.Collections.Generic.ICollection<TItem>, System.Collections.Generic.IEnumerable<TItem>, System.Collections.IEnumerable
where TCollection : System.Collections.ICollection
{
public ReadOnlyNonGenericCollectionWrapper(TCollection collection) { }
public int Count { get; }
public bool IsReadOnly { get; }
public TCollection UnderlyingCollection { get; }
public void Add(TItem item) { }
public void Clear() { }
public bool Contains(TItem item) { }
public void CopyTo(TItem[] array, int arrayIndex) { }
public System.Collections.Generic.IEnumerator<TItem> GetEnumerator() { }
public bool Remove(TItem item) { }
}
public static class Services
{
public static FluentAssertions.Common.Configuration Configuration { get; }
Expand Down
Expand Up @@ -647,6 +647,20 @@ namespace FluentAssertions.Common
{
System.TimeSpan Elapsed { get; }
}
public class ReadOnlyNonGenericCollectionWrapper<TCollection, TItem> : System.Collections.Generic.ICollection<TItem>, System.Collections.Generic.IEnumerable<TItem>, System.Collections.IEnumerable
where TCollection : System.Collections.ICollection
{
public ReadOnlyNonGenericCollectionWrapper(TCollection collection) { }
public int Count { get; }
public bool IsReadOnly { get; }
public TCollection UnderlyingCollection { get; }
public void Add(TItem item) { }
public void Clear() { }
public bool Contains(TItem item) { }
public void CopyTo(TItem[] array, int arrayIndex) { }
public System.Collections.Generic.IEnumerator<TItem> GetEnumerator() { }
public bool Remove(TItem item) { }
}
public static class Services
{
public static FluentAssertions.Common.Configuration Configuration { get; }
Expand Down
Expand Up @@ -640,6 +640,20 @@ namespace FluentAssertions.Common
{
System.TimeSpan Elapsed { get; }
}
public class ReadOnlyNonGenericCollectionWrapper<TCollection, TItem> : System.Collections.Generic.ICollection<TItem>, System.Collections.Generic.IEnumerable<TItem>, System.Collections.IEnumerable
where TCollection : System.Collections.ICollection
{
public ReadOnlyNonGenericCollectionWrapper(TCollection collection) { }
public int Count { get; }
public bool IsReadOnly { get; }
public TCollection UnderlyingCollection { get; }
public void Add(TItem item) { }
public void Clear() { }
public bool Contains(TItem item) { }
public void CopyTo(TItem[] array, int arrayIndex) { }
public System.Collections.Generic.IEnumerator<TItem> GetEnumerator() { }
public bool Remove(TItem item) { }
}
public static class Services
{
public static FluentAssertions.Common.Configuration Configuration { get; }
Expand Down
Expand Up @@ -647,6 +647,20 @@ namespace FluentAssertions.Common
{
System.TimeSpan Elapsed { get; }
}
public class ReadOnlyNonGenericCollectionWrapper<TCollection, TItem> : System.Collections.Generic.ICollection<TItem>, System.Collections.Generic.IEnumerable<TItem>, System.Collections.IEnumerable
where TCollection : System.Collections.ICollection
{
public ReadOnlyNonGenericCollectionWrapper(TCollection collection) { }
public int Count { get; }
public bool IsReadOnly { get; }
public TCollection UnderlyingCollection { get; }
public void Add(TItem item) { }
public void Clear() { }
public bool Contains(TItem item) { }
public void CopyTo(TItem[] array, int arrayIndex) { }
public System.Collections.Generic.IEnumerator<TItem> GetEnumerator() { }
public bool Remove(TItem item) { }
}
public static class Services
{
public static FluentAssertions.Common.Configuration Configuration { get; }
Expand Down

0 comments on commit 639651e

Please sign in to comment.