From 80b0b5aab747f56f7a9dacd4ef3ac697995ae88a Mon Sep 17 00:00:00 2001 From: "chris.watts90@outlook.com" Date: Mon, 26 Jun 2017 21:02:58 +0100 Subject: [PATCH] add class constraint --- RaceLapTimer/Interfaces/IPluginLocator.cs | 4 ++-- RaceLapTimer/RaceLapTimer/Extensions/PluginLocator.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RaceLapTimer/Interfaces/IPluginLocator.cs b/RaceLapTimer/Interfaces/IPluginLocator.cs index 16b5866..37f35d3 100644 --- a/RaceLapTimer/Interfaces/IPluginLocator.cs +++ b/RaceLapTimer/Interfaces/IPluginLocator.cs @@ -5,7 +5,7 @@ namespace Interfaces { public interface IPluginLocator { - Task> LocateAsync(); - List Locate(); + Task> LocateAsync() where T : class; + List Locate() where T : class; } } diff --git a/RaceLapTimer/RaceLapTimer/Extensions/PluginLocator.cs b/RaceLapTimer/RaceLapTimer/Extensions/PluginLocator.cs index 762f725..951bee7 100644 --- a/RaceLapTimer/RaceLapTimer/Extensions/PluginLocator.cs +++ b/RaceLapTimer/RaceLapTimer/Extensions/PluginLocator.cs @@ -21,12 +21,12 @@ namespace RaceLapTimer.Extensions _logger = logger; } - public async Task> LocateAsync() + public async Task> LocateAsync() where T:class { return await Task.Run(() => Locate()); } - public List Locate() + public List Locate() where T:class { try {