private void ScriptMethods(string methodsName, List <Urn> ordered) { _server.Scripter.Options.FileName = methodsName; _server.Scripter.Options.ScriptDrops = false; _server.Scripter.Options.IncludeIfNotExists = false; _server.Scripter.Script(ordered.ToArray()); var processor = new PostScriptProcessor(methodsName); processor.Execute(); }
private void ScriptObject(string directory, NamedSmoObject scriptObject) { var fileName = DirectoryManager.GetScriptFileName(scriptObject, directory); AppendDropScript(scriptObject, fileName); AppendCreateScript(scriptObject); var processor = new PostScriptProcessor(fileName); processor.Execute(); }
private void ScriptBase(List <Urn> objects) { _server.Scripter.Options = CreateOptions(); var fileName = DirectoryManager.GetFileCreateDatabase(); _server.Scripter.Options.FileName = fileName; _server.Scripter.Options.AppendToFile = false; _server.Scripter.Script(objects.ToArray()); var processor = new PostScriptProcessor(fileName); processor.Execute(); }