//--------------------------------------------------------------------- // Instance members /// <inheritdoc/> public bool IsCloudEnvironment(HostingEnvironments environment) { switch (environment) { case HostingEnvironments.Aws: case HostingEnvironments.Azure: case HostingEnvironments.Google: return(true); case HostingEnvironments.HyperV: case HostingEnvironments.HyperVLocal: case HostingEnvironments.Machine: case HostingEnvironments.XenServer: return(false); default: throw new NotImplementedException($"Hosting manager for [{environment}] is not implemented."); } }
/// <summary> /// Constructor. /// </summary> /// <param name="environment">Specifies the target hosting environment.</param> public HostingProviderAttribute(HostingEnvironments environment) { this.Environment = environment; }
/// <inheritdoc/> public bool IsCloudEnvironment(HostingEnvironments environment) { CheckInitialized(); return(Loader.IsCloudEnvironment(environment)); }