
Modified the reporting channel factory to have a create for the adapter and a create for the runner channel. Also added an event to the create runner channel that people can listen and be notified when a test runner channel was created. I use this event to give the message handler access to the runner channel. Added the new message handler to DotnetTest.
18 lines
545 B
C#
18 lines
545 B
C#
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Microsoft.DotNet.Cli.Utils
|
|
{
|
|
public static class CollectionsExtensions
|
|
{
|
|
public static IEnumerable<T> OrEmptyIfNull<T>(this IEnumerable<T> enumerable)
|
|
{
|
|
return enumerable == null
|
|
? Enumerable.Empty<T>()
|
|
: enumerable;
|
|
}
|
|
}
|
|
}
|