Exemplo n.º 1
0
        //---------------------------------------------------------------------
        // 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.");
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="environment">Specifies the target hosting environment.</param>
 public HostingProviderAttribute(HostingEnvironments environment)
 {
     this.Environment = environment;
 }
Exemplo n.º 3
0
        /// <inheritdoc/>
        public bool IsCloudEnvironment(HostingEnvironments environment)
        {
            CheckInitialized();

            return(Loader.IsCloudEnvironment(environment));
        }