ClrPlus.Scripting.MsBuild.Packaging.PackageScript.Save C# (CSharp) Method

Save() public method

public Save ( PackageTypes packageTypes, bool cleanIntermediateFiles ) : void
packageTypes PackageTypes
cleanIntermediateFiles bool
return void
        public void Save(PackageTypes packageTypes, bool cleanIntermediateFiles)
        {
            if (!_processed) {
                Process();
            }

            if (packageTypes.HasFlag(PackageTypes.NuGet)) {
                foreach (var nugetPackage in _nugetPackages.Values) {
                    nugetPackage.Save(cleanIntermediateFiles);
                }
            }
        }

Usage Example

Example #1
0
        private void Start(string[] args) {
            CurrentTask.Events += new SourceError((code, location, message, objects) => {
                location = location ?? SourceLocation.Unknowns;
                Console.WriteLine("{0}:Error {1}:{2}", location.FirstOrDefault(), code, message.format(objects));
                return true;
            });

            CurrentTask.Events += new SourceWarning((code, location, message, objects) => {
                location = location ?? SourceLocation.Unknowns;
                Console.WriteLine("{0}:Warning {1}:{2}", location.FirstOrDefault(), message.format(objects));
                return false;
            });

            CurrentTask.Events += new SourceDebug((code, location, message, objects) => {
                location = location ?? SourceLocation.Unknowns;
                Console.WriteLine("{0}:DebugMessage {1}:{2}", location.FirstOrDefault(), code, message.format(objects));
                return false;
            });

            CurrentTask.Events += new Error((code, message, objects) => {
                Console.WriteLine("{0}:Error {1}", code, message.format(objects));
                return true;
            });

            CurrentTask.Events += new Warning((code, message, objects) => {
                Console.WriteLine("{0}:Warning {1}", code, message.format(objects));
                return false;
            });

            CurrentTask.Events += new Debug((code, message, objects) => {
                Console.WriteLine("{0}:DebugMessage {1}", code, message.format(objects));
                return false;
            });

            CurrentTask.Events += new Verbose((code, message, objects) => {
                Console.WriteLine("{0}:Verbose {1}", code, message.format(objects));
                return false;
            });
            CurrentTask.Events += new Message((code, message, objects) => {
                Console.WriteLine("{0}:Message {1}", code, message.format(objects));
                return false;
            });

#if true

            try {
                Environment.CurrentDirectory = @"C:\root\V2\coapp-packages\openssl\copkg";
                Console.WriteLine("Package script");
                using(var script = new PackageScript("openssl.autopkg")) {

                    IEnumerable<string> overlayFiles;
                    var pkgFile = script.Save(PackageTypes.NuGet, false, false, out overlayFiles);
                }
                Console.WriteLine();
            } catch (Exception e) {
                Console.WriteLine("{0} =>\r\n\r\nat {1}", e.Message, e.StackTrace.Replace("at ClrPlus.Scripting.Languages.PropertySheetV3.PropertySheetParser", "PropertySheetParser"));
            }
#else
            try {
                // Environment.CurrentDirectory = @"C:\project";
                Console.WriteLine("Build script");
                using (var script = new BuildScript("test.buildinfo")) {
                    script.Execute();
                }
            } catch (Exception e) {
                Console.WriteLine("{0} =>\r\n\r\nat {1}", e.Message, e.StackTrace.Replace("at ClrPlus.Scripting.Languages.PropertySheetV3.PropertySheetParser", "PropertySheetParser"));
            }

#endif
            return;
            //
        }
All Usage Examples Of ClrPlus.Scripting.MsBuild.Packaging.PackageScript::Save