public static void RegDllFile() { HttpRequest req = HttpContext.Current.Request; for (int i = 0; i < req.Files.Count; i++) { HttpPostedFile file = req.Files[i]; string savePath = XAssemblyBuilder.wboDllPath + Path.GetFileName(file.FileName); if (savePath.EndsWith(".dll")) { file.SaveAs(savePath); RegComponent(savePath); } else if (savePath.EndsWith(".cs")) { file.SaveAs(savePath); string dllPath = XAssemblyBuilder.CompileFile(savePath); if (!dllPath.EndsWith(XAssemblyBuilder.errFileExt)) { RegComponent(savePath); } } else if (savePath.EndsWith(".xml")) { file.SaveAs(savePath); } else { throw new XException(Lang.RegWboMustIsDll); } } }
public static void RegWSDL(string url) { string file = XAssemblyBuilder.buildWSDL(url); RegComponent(file); }