parent
109d388e5e
commit
25cad453f4
|
|
@ -10,9 +10,9 @@ namespace Microsoft.Extensions.ObjectPool
|
||||||
public abstract class ObjectPool<T> where T : class
|
public abstract class ObjectPool<T> where T : class
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an object from the pool.
|
/// Gets an object from the pool is one is available, otherwise creates one.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An object from the pool.</returns>
|
/// <returns>A <typeparamref name="T"/>.</returns>
|
||||||
public abstract T Get();
|
public abstract T Get();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ namespace Microsoft.Extensions.CommandLineUtils
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// See https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
|
/// See https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="args"></param>
|
/// <param name="args">The arguments to concatenate.</param>
|
||||||
/// <returns></returns>
|
/// <returns>The escaped arguments, concatenated.</returns>
|
||||||
public static string EscapeAndConcatenate(IEnumerable<string> args)
|
public static string EscapeAndConcatenate(IEnumerable<string> args)
|
||||||
=> string.Join(" ", args.Select(EscapeSingleArg));
|
=> string.Join(" ", args.Select(EscapeSingleArg));
|
||||||
|
|
||||||
|
|
@ -104,6 +104,6 @@ namespace Microsoft.Extensions.CommandLineUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool ContainsWhitespace(string argument)
|
private static bool ContainsWhitespace(string argument)
|
||||||
=> argument.IndexOfAny(new [] { ' ', '\t', '\n' }) >= 0;
|
=> argument.IndexOfAny(new[] { ' ', '\t', '\n' }) >= 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue