private static CloudRuntime CreateRuntimeInternal(Runtime runtimeType, string roleName, string rolePath)
        {
            CloudRuntime runtime;

            switch (runtimeType)
            {
            case Runtime.Null:
                runtime = new NullCloudRuntime();
                break;

            case Runtime.PHP:
                runtime = new PHPCloudRuntime();
                break;

            case Runtime.IISNode:
                runtime = new IISNodeCloudRuntime();
                break;

            case Runtime.Node:
            default:
                runtime = new NodeCloudRuntime();
                break;
            }

            runtime.Runtime  = runtimeType;
            runtime.RoleName = roleName;
            runtime.FilePath = rolePath;
            return(runtime);
        }
        private static CloudRuntime CreateRuntimeInternal(RuntimeType runtimeType, string roleName, string rolePath)
        {
            CloudRuntime runtime;

            switch (runtimeType)
            {
            case RuntimeType.Null:
                runtime = new NullCloudRuntime();
                break;

            case RuntimeType.Cache:
                //Scaffolding for cache is no longer supported
                throw new NotSupportedException(Resources.CacheScaffoldingIsNotSupport);

            case RuntimeType.PHP:
                runtime = new PHPCloudRuntime();
                break;

            case RuntimeType.IISNode:
                runtime = new IISNodeCloudRuntime();
                break;

            case RuntimeType.Node:
            default:
                runtime = new NodeCloudRuntime();
                break;
            }

            runtime.Runtime  = runtimeType;
            runtime.RoleName = roleName;
            runtime.FilePath = rolePath;
            return(runtime);
        }
Beispiel #3
0
        private static CloudRuntime CreateRuntimeInternal(Runtime runtimeType, string roleName, string rolePath)
        {
            CloudRuntime runtime;
            switch (runtimeType)
            {
                case Runtime.Null:
                    runtime = new NullCloudRuntime();
                    break;
                case Runtime.PHP:
                    runtime = new PHPCloudRuntime();
                    break;
                case Runtime.IISNode:
                    runtime = new IISNodeCloudRuntime();
                    break;
                case Runtime.Node:
                default:
                    runtime = new NodeCloudRuntime();
                    break;
            }

            runtime.Runtime = runtimeType;
            runtime.RoleName = roleName;
            runtime.FilePath = rolePath;
            return runtime;
        }
        private static CloudRuntime CreateRuntimeInternal(RuntimeType runtimeType, string roleName, string rolePath)
        {
            CloudRuntime runtime;
            switch (runtimeType)
            {
                case RuntimeType.Null:
                    runtime = new NullCloudRuntime();
                    break;
                case RuntimeType.Cache:
                    //Scaffolding for cache is no longer supported
                    throw new NotSupportedException(Resources.CacheScaffoldingIsNotSupport);
                case RuntimeType.PHP:
                    runtime = new PHPCloudRuntime();
                    break;
                case RuntimeType.IISNode:
                    runtime = new IISNodeCloudRuntime();
                    break;
                case RuntimeType.Node:
                default:
                    runtime = new NodeCloudRuntime();
                    break;
            }

            runtime.Runtime = runtimeType;
            runtime.RoleName = roleName;
            runtime.FilePath = rolePath;
            return runtime;
        }