mirror of
https://github.com/SabreTools/SabreTools.IO.git
synced 2026-09-21 22:25:53 +00:00
Rename some type parameters to be more descriptive
This commit is contained in:
@@ -12,7 +12,7 @@ namespace SabreTools.Collections.Extensions
|
||||
/// .NET Frameworks 2.0 and 3.5 process in series.
|
||||
/// .NET Frameworks 4.0 onward process in parallel.
|
||||
/// </remarks>
|
||||
public static void IterateWithAction<T>(this IEnumerable<T> source, Action<T> action)
|
||||
public static void IterateWithAction<TValue>(this IEnumerable<TValue> source, Action<TValue> action)
|
||||
{
|
||||
#if NET20 || NET35
|
||||
foreach (var item in source)
|
||||
@@ -27,10 +27,10 @@ namespace SabreTools.Collections.Extensions
|
||||
/// <summary>
|
||||
/// Safely iterate through an enumerable, skipping any errors
|
||||
/// </summary>
|
||||
public static IEnumerable<T> SafeEnumerate<T>(this IEnumerable<T> enumerable)
|
||||
public static IEnumerable<TValue> SafeEnumerate<TValue>(this IEnumerable<TValue> enumerable)
|
||||
{
|
||||
// Get the enumerator for the enumerable
|
||||
IEnumerator<T> enumerator;
|
||||
IEnumerator<TValue> enumerator;
|
||||
try
|
||||
{
|
||||
enumerator = enumerable.GetEnumerator();
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
/// <summary>
|
||||
/// Represents a matcher for a particular type
|
||||
/// </summary>
|
||||
public interface IMatch<T>
|
||||
public interface IMatch<TNeedle>
|
||||
{
|
||||
/// <summary>
|
||||
/// Nullable typed data to be matched
|
||||
/// </summary>
|
||||
public T? Needle { get; }
|
||||
public TNeedle? Needle { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,12 +5,12 @@ namespace SabreTools.Matching
|
||||
/// <summary>
|
||||
/// Wrapper for a single set of matching criteria
|
||||
/// </summary>
|
||||
public interface IMatchSet<T, U> where T : IMatch<U>
|
||||
public interface IMatchSet<TMatcher, TNeedle> where TMatcher : IMatch<TNeedle>
|
||||
{
|
||||
/// <summary>
|
||||
/// Set of all matchers
|
||||
/// </summary>
|
||||
public List<T> Matchers { get; }
|
||||
public List<TMatcher> Matchers { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Unique name for the match set
|
||||
|
||||
@@ -6,8 +6,8 @@ This library contains classes designed to make matching contents and paths easie
|
||||
|
||||
| Interface | Notes |
|
||||
| --- | --- |
|
||||
| `IMatch<T>` | Represents a matcher for a generic type |
|
||||
| `IMatchSet<T, U>` | Represents a set of `IMatch<T>` types |
|
||||
| `IMatch<TNeedle>` | Represents a matcher for a generic type |
|
||||
| `IMatchSet<TMatcher, TNeedle>` | Represents a set of `IMatch<TNeedle>` types |
|
||||
|
||||
## Matching Classes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user