mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-07-03 19:56:37 +02:00
18 lines
656 B
C#
18 lines
656 B
C#
using System.Collections.Generic;
|
|
|
|
namespace TINK.Model.Connector
|
|
{
|
|
public static class FilteredConnectorFactory
|
|
{
|
|
/// <summary> Creates a filter object. </summary>
|
|
/// <param name="group">Filter to apply on stations and bikes.</param>
|
|
/// <param name="connector">Connector to connect to COPRI.</param>
|
|
public static IFilteredConnector Create(IEnumerable<string> group, IConnector connector)
|
|
{
|
|
return group != null
|
|
? (IFilteredConnector) new FilteredConnector(group, connector)
|
|
: new NullFilterConnector(connector); // Do not apply filtering.
|
|
}
|
|
}
|
|
}
|