public static void Design(this Object @object, string devClient, string serverName, string database)
        {
            var arguments = new Arguments(null, serverName, database);

            arguments.Add("designobject", string.Format("{0} {1}", @object.Type, @object.ID));

            DevClient.Run(devClient, arguments);
        }
Example #2
0
        public static void Compile(string type, IEnumerable <int> ids, string devClient, string serverName, string database)
        {
            if (!ids.Any())
            {
                return;
            }

            var filter    = string.Format("Type={0};ID={1}", type, ids.Summarize());
            var arguments = new Arguments("compileobjects", serverName, database);

            arguments.Add("filter", filter);

            DevClient.Run(devClient, arguments);
        }
Example #3
0
        private static void DoImport(Application application, string devClient, Arguments arguments)
        {
            var fileName = Path.ChangeExtension(Path.GetTempFileName(), "txt");

            arguments.Add("file", fileName);

            try
            {
                application.WriteToFile(fileName);
                DevClient.Run(devClient, arguments);
            }
            finally
            {
                File.Delete(fileName);
            }
        }
Example #4
0
        public static Application Export(string devClient, string serverName, string database, string filter)
        {
            var fileName = Path.ChangeExtension(Path.GetTempFileName(), "txt");

            var arguments = new Arguments("exportobjects", serverName, database);

            arguments.Add("file", fileName);
            arguments.Add("filter", filter);

            try
            {
                DevClient.Run(devClient, arguments);
                return(ApplicationBuilder.ReadFromFiles((IEnumerable <string>)(new string[] { fileName })));
            }
            finally
            {
                File.Delete(fileName);
            }
        }