Пример #1
0
 public static IEnumerable <T> GetResourceProviders <T>(this ILighthouseServiceContainer container)
     where T : IResourceProvider => container.GetResourceProviders().OfType <T>();
Пример #2
0
 public static INetworkProvider GetNetworkProvider(this ILighthouseServiceContainer container) => container.GetResourceProviders <INetworkProvider>().FirstOrDefault();
Пример #3
0
 /// <summary>
 /// Returns a list of file system providers available on the target server. A given file system could support multiple drives
 /// </summary>
 /// <param name="container"></param>
 /// <returns></returns>
 public static IFileSystemProvider GetFileSystem(this ILighthouseServiceContainer container) => container.GetResourceProviders <IFileSystemProvider>().FirstOrDefault();