Example #1
0
        public void Delete()
        {
            const string DELETE =
                @"<TEMPLATE guid=""{0}""><PAGEDEFINITION action=""delete"" guid=""{1}"" name=""{2}""/></TEMPLATE>";

            Project.ExecuteRQL(DELETE.RQLFormat(_contentClass, this, Name));
        }
Example #2
0
        public void Delete()
        {
            const string DELETE = @"<PROJECT><EXPORTSETTING action=""deletesetting"" packetguid=""{0}"" guid=""{1}""/></PROJECT>";

            Project.ExecuteRQL(DELETE.RQLFormat(PublicationPackage, this));

            _publicationSettings.InvalidateCache();
        }
        /// <summary>
        /// Delete a package.
        /// </summary>
        /// <param name="PkgName">Package name</param>
        /// <returns>
        /// A <see cref="StringBuilder"/>The status of the operation in XML format.
        /// </returns>
        /// <example> This sample shows how to call the DelPackage method.
        /// <code>
        /// using System;
        /// using MonoOBSFramework.Functions.Sources
        /// class TestClass
        /// {
        ///     static int Main()
        ///     {
        ///         if(!VarGlobal.LessVerbose)Console.WriteLine(DeleteSourceProjectPackage.DelPackage("MonoOSC").ToString());
        ///     }
        /// }
        /// </code>
        /// </example>
        public static StringBuilder DelPackage(string PkgName)
        {
            //Local OBS don't know "rev" param !!
            //StringBuilder Result = DELETE.DeleteitUnix("source/" + VarGlobal.PrefixUserName + "/" + PkgName + "?rev=upload", VarGlobal.User, VarGlobal.Password);
            StringBuilder Result = DELETE.DeleteitUnix("source/" + VarGlobal.PrefixUserName + "/" + PkgName, VarGlobal.User, VarGlobal.Password);

            Commit.PostCommit(PkgName);
            return(Result);
        }
        public void Delete()
        {
            const string DELETE = @"<PROJECT><FOLDER action=""delete"" guid=""{0}""/></PROJECT>";

            Project.ExecuteRQL(DELETE.RQLFormat(this));
        }
 /// <summary>
 /// Deletes specified project. All packages of this project are deleted as if a DELETE request were issued for each package.
 /// </summary>
 /// <param name="Force">
 /// Parameters: force: If force = 1, the project is deleted even if repositories of other projects include a path to a repository from this project. The path in the other repository is replaced by one pointing to 'deleted/standard', preventing the build and publishing of the other repository.
 /// </param>
 /// <returns>
 /// A <see cref="StringBuilder"/>The status of the operation in XML format.
 /// </returns>
 /// <example> This sample shows how to call the DeleteProject method.
 /// <code>
 /// using System;
 /// using MonoOBSFramework.Functions.Sources
 /// class TestClass
 /// {
 ///     static int Main()
 ///     {
 ///         if(!VarGlobal.LessVerbose)Console.WriteLine(DeleteSourceProject.DeleteProject(1).ToString());
 ///     }
 /// }
 /// </code>
 /// </example>
 public static StringBuilder DeleteProject(int Force)
 {
     //Local OBS don't know "force" param !!
     //return DELETE.DeleteitUnix("source/" + VarGlobal.PrefixUserName + "?force=" + Force, VarGlobal.User, VarGlobal.Password);
     return(DELETE.DeleteitUnix("source/" + VarGlobal.PrefixUserName, VarGlobal.User, VarGlobal.Password));
 }