Beispiel #1
0
        private static int CreateApp(IUtil util, string[] args)
        {
            int    errorCode    = ErrorCode.Succeed;
            string siteName     = GetValue(args, "siteName");
            string virtualPath  = GetValue(args, "virtualPath");
            string physicalPath = GetValue(args, "physicalPath");
            string poolName     = GetValue(args, "poolName");
            string useSsl       = GetValue(args, "useSsl");

            //站点名、虚拟路径、物理路径、池名称不可为空
            if (siteName.IsNullOrEmpty() || virtualPath.IsNullOrEmpty() || physicalPath.IsNullOrEmpty())
            {
                errorCode = ErrorCode.InvalidParameter;
            }
            else
            {
                errorCode = util.CreateApp(siteName,
                                           virtualPath,
                                           physicalPath,
                                           poolName,
                                           useSsl.IsNullOrEmpty() ? false : Convert.ToBoolean(useSsl)
                                           );
            }

            return(errorCode);
        }
Beispiel #2
0
        private static int CreateApp(IUtil util, string[] args)
        {
            int errorCode = ErrorCode.Succeed;
            string siteName = GetValue(args, "siteName");
            string virtualPath = GetValue(args, "virtualPath");
            string physicalPath = GetValue(args, "physicalPath");
            string poolName = GetValue(args, "poolName");
            string useSsl = GetValue(args, "useSsl");

            //站点名、虚拟路径、物理路径、池名称不可为空
            if(siteName.IsNullOrEmpty() || virtualPath.IsNullOrEmpty() || physicalPath.IsNullOrEmpty())
                errorCode = ErrorCode.InvalidParameter;
            else
                errorCode = util.CreateApp(siteName,
                                    virtualPath,
                                    physicalPath,
                                    poolName,
                                    useSsl.IsNullOrEmpty() ? false : Convert.ToBoolean(useSsl)
                                );

            return errorCode;
        }