diff --git a/.gitignore b/.gitignore index 101eafa5..eb532774 100644 --- a/.gitignore +++ b/.gitignore @@ -191,3 +191,4 @@ FakesAssemblies/ !.build/*.* /src/.vs/config/applicationhost.config /src/.vs/BugNET_WAP +/src/.vs/BugNET/v15/Server/sqlite3 diff --git a/src/BugNET.GitHooks/App.config b/src/BugNET.GitHooks/App.config new file mode 100644 index 00000000..7b6851ea --- /dev/null +++ b/src/BugNET.GitHooks/App.config @@ -0,0 +1,80 @@ + + + + +
+ +
+ + + + + + + + admin + + + password + + + Data Source=.\SQLEXPRESS;Database=BugNET;Integrated Security=True; + + + \[?([A-Za-z]{1,50}-(\d+))\]? + + + http://localhost:59847/Webservices/BugNetServices.asmx + + + False + + + + + + http://localhost:59847/Webservices/BugNetServices.asmx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/BugNET.GitHooks/BugNET.GitHooks.csproj b/src/BugNET.GitHooks/BugNET.GitHooks.csproj new file mode 100644 index 00000000..a5b8c1ad --- /dev/null +++ b/src/BugNET.GitHooks/BugNET.GitHooks.csproj @@ -0,0 +1,121 @@ + + + + + Debug + AnyCPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5} + Exe + BugNET.GitHooks + BugNET.GitHooks + v4.5 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\log4net.2.0.5\lib\net45-full\log4net.dll + + + + 3.5 + + + + + + + + + Properties\GlobalAssemblyInfo.cs + + + + + + + + Settings.settings + True + True + + + True + True + Reference.map + + + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + Dynamic + Web References\WebServices\ + http://localhost:59847/Webservices/BugNetServices.asmx + + + + + Settings + BugNET_SubversionHooks_BugNetServices_BugNetServices + + + + + + + MSDiscoCodeGenerator + Reference.cs + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/src/BugNET.GitHooks/CommandExecutor.cs b/src/BugNET.GitHooks/CommandExecutor.cs new file mode 100644 index 00000000..d037a311 --- /dev/null +++ b/src/BugNET.GitHooks/CommandExecutor.cs @@ -0,0 +1,131 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Text.RegularExpressions; + +namespace BugNET.GitHooks +{ + /// + /// + /// + public static class CommandExecutor + { + + private static readonly Dictionary Errors = new Dictionary(); + + + /// + /// Runs the command. + /// + /// The command. + /// The args. + /// if set to true [echo command]. + /// + public static string RunCommand(string command, string args, bool echoCommand) + { + return RunCommand(command, args, 300, echoCommand); + } + + + /// + /// Runs a separate process and returns the standard output and error text. This is intended for command line apps only. + /// + /// + /// + /// + /// + /// + public static string RunCommand(string command, string args, int killAfterSeconds = 300, bool echoCommand = true) + { + Process proc = null; + log4net.ILog logger = log4net.LogManager.GetLogger("CommandExecutor"); + + if (logger.IsDebugEnabled) logger.DebugFormat("Running Commandline: {0} {1}",command,args); + + try + { + var startInfo = new ProcessStartInfo(command, args) + { + CreateNoWindow = true, + WindowStyle = ProcessWindowStyle.Hidden, + UseShellExecute = false, + RedirectStandardOutput = true, + RedirectStandardError = true, + StandardOutputEncoding = System.Text.Encoding.Default + }; + + proc = new Process {StartInfo = startInfo}; + proc.ErrorDataReceived += CommandProcessErrorDataReceived; + proc.Start(); + + proc.BeginErrorReadLine(); + + var retVal = proc.StandardOutput.ReadToEnd(); + + if (!proc.WaitForExit(killAfterSeconds * 1000)) + proc.Kill(); + + if (Errors.ContainsKey(proc.Id)) + retVal += Environment.NewLine + "Error: " + Environment.NewLine + Errors[proc.Id]; + + if (echoCommand) + { + // hide password from being displayed + var regexObj = new Regex("--password\\s+\\S+\\s", RegexOptions.IgnoreCase); + args = regexObj.Replace(args, "--password **** "); + + + return command + " " + args + Environment.NewLine + retVal; + } + else + { + return retVal; + } + + } + catch (Exception ex) + { + logger.ErrorFormat("An error occurred running the command line: {2} {3}\n\n {0} \n\n {1}", ex.Message, ex.StackTrace, command, args); + return string.Empty; + } + finally + { + if (proc != null) + { + if (Errors.ContainsKey(proc.Id)) + Errors.Remove(proc.Id); + + proc.Dispose(); + } + } + + } + + /// + /// Event handler to capture error data. At least one of the output streams has to be read asynchronously + /// to avoid a deadlock. + /// + /// + /// + static void CommandProcessErrorDataReceived(object sender, DataReceivedEventArgs e) + { + // RC: Sometimes an error occurres in here. I think the process is ending while we are getting the data, but Im not sure. + // I'm stuffing it for now. + try + { + if (sender == null) return; + + if (string.IsNullOrEmpty(e.Data)) return; + + var id = ((Process)sender).Id; + + if (Errors.ContainsKey(id)) + Errors[id] += Environment.NewLine + e.Data; + else + Errors.Add(id, e.Data); + } + catch (Exception) + { } + } + } +} diff --git a/src/BugNET.GitHooks/IssueTrackerIntegration.cs b/src/BugNET.GitHooks/IssueTrackerIntegration.cs new file mode 100644 index 00000000..7f990fdf --- /dev/null +++ b/src/BugNET.GitHooks/IssueTrackerIntegration.cs @@ -0,0 +1,174 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.RegularExpressions; +using BugNET.GitHooks.Properties; +using BugNET.GitHooks.WebServices; + +namespace BugNET.GitHooks +{ + /// + /// + /// + public class IssueTrackerIntegration + { + log4net.ILog logger = log4net.LogManager.GetLogger("IssueTrackerIntegration"); + /// + /// Updates the issue tracker from revision. + /// + /// The repository. + /// The revision. + public void UpdateIssueTrackerFromRevision(string repository, string revision) + { + string svnlook = String.IsNullOrEmpty(Settings.Default.SubversionBinDirectory) ? + "git.exe" : Path.Combine(Settings.Default.SubversionBinDirectory, "git.exe"); + + var issueIds = new List(); + logger.Info("Running git.exe..."); + + // Pretty Format Paramters: https://git-scm.com/docs/pretty-formats + string infoOutput = CommandExecutor.RunCommand(svnlook, string.Format("-C \"{1}\" log {0} --max-count 1 --pretty=format:\"%cn%n%ct%n%B\"", revision, repository)); + + logger.DebugFormat("git output: {0}", infoOutput); + logger.DebugFormat("Looking for search pattern in revision:{0} and repository:{1}...", revision, repository); + + string[] infoLines = infoOutput.Split(new char[] { '\n' }, 4); + // Line 0 is the command + string author = infoLines[1]; + string dateTime = this.UnixTimeStampToDateTime(double.Parse(infoLines[2])).ToString(); + string logMessage = infoLines[3]; + + // Read the push count for checkin. GIT has no numeric revisions + // TODO: Check if revision can be changed to string to use the hash + string revOutput = CommandExecutor.RunCommand(svnlook, string.Format("-C \"{1}\" rev-list --count {0}", revision, repository)); + string[] revLines = revOutput.Split(new char[] { '\n' }, 3); + string revisioncount = revLines[1]; + + // get all the matching issue id's + Regex RegexObj = new Regex(Settings.Default.IssueIdRegEx.ToString()); + Match MatchResults = RegexObj.Match(logMessage); + + logger.InfoFormat("Found {0} matches...", MatchResults.Groups.Count); + + while (MatchResults.Success) + { + try + { + issueIds.Add(int.Parse(MatchResults.Groups[1].Value.Substring(MatchResults.Groups[1].Value.IndexOf("-") + 1))); + } + catch (Exception ex) + { + logger.ErrorFormat("An error occurred parsing the issue id: {0} \n\n {1}", ex.Message, ex.StackTrace); + } + finally + { + MatchResults = MatchResults.NextMatch(); + } + } + + if (issueIds.Count > 0) + { + + BugNetServices services = new BugNetServices(); + services.CookieContainer = new System.Net.CookieContainer(); + services.Url = Settings.Default.BugNetServicesUrl; + if (Convert.ToBoolean(Settings.Default.BugNetWindowsAuthentication)) + services.UseDefaultCredentials = true; + + try + { + logger.Info("Logging in to BugNET webservices..."); + if (Convert.ToBoolean(Settings.Default.BugNetWindowsAuthentication)) + { + services.UseDefaultCredentials = true; + } + else + { + logger.Info("Logging in to BugNET webservices..."); + bool result = services.LogIn(Settings.Default.BugNetUsername, Settings.Default.BugNetPassword); + if (result) + { + logger.Info("Login successful..."); + } + else + { + throw new UnauthorizedAccessException("Unauthorized access exception, please check the user name and password settings."); + } + } + + foreach (var id in issueIds) + { + try + { + logger.Info("Creating new issue revision..."); + logger.DebugFormat("\n Revision:{0} Id:{1} Repository:{2} Author:{3} DateTime:{4} LogMessage:{5}", revision, id, GetRepositoryName(repository), author, dateTime, Regex.Replace(logMessage, Settings.Default.IssueIdRegEx.ToString(), "$1")); + + bool success = services.CreateNewIssueRevision( + int.Parse(revisioncount), + id, + GetRepositoryName(repository), + author, + dateTime, + Regex.Replace(logMessage, Settings.Default.IssueIdRegEx.ToString(), "$1"), + revision, + ""); + + if (success) + logger.Info("Successfully added new issue revision..."); + else + logger.Warn("Adding new issue revision failed!"); + } + catch (Exception ex) + { + logger.ErrorFormat("An error occurred adding a new issue revision to BugNET: {0} \n\n {1}", ex.Message, ex.StackTrace); + } + + } + } + catch (UnauthorizedAccessException ex) + { + logger.ErrorFormat("{0} \n\n {1}", ex.Message, ex.StackTrace); + } + catch (Exception ex) + { + logger.FatalFormat("An error occurred contacting the BugNET web services: {0} \n\n {1}", ex.Message, ex.StackTrace); + System.Environment.Exit(1); + } + + + }//if + + } + + /// + /// Gets the name of the repository from the directory name repository. + /// + /// The repository path. + /// + public static string GetRepositoryName(string repositoryPath) + { + try + { + DirectoryInfo di = new DirectoryInfo(repositoryPath); + return di.Name; + } + catch + { + return string.Empty; + } + } + + /// + /// Converts a Unixtimestamp to a Local Time + /// + /// Unix Timestamp + /// Local Time + private DateTime UnixTimeStampToDateTime(double unixTimeStamp) + { + // Unix timestamp is seconds past epoch + System.DateTime dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc); + dtDateTime = dtDateTime.AddSeconds(unixTimeStamp).ToLocalTime(); + return dtDateTime; + } + } +} diff --git a/src/BugNET.GitHooks/Program.cs b/src/BugNET.GitHooks/Program.cs new file mode 100644 index 00000000..b57cf8e2 --- /dev/null +++ b/src/BugNET.GitHooks/Program.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BugNET.GitHooks +{ + class Program + { + /// + /// Mains the specified args. + /// + /// The args. + static void Main(string[] args) + { + + log4net.Config.XmlConfigurator.Configure(); + log4net.ILog logger = log4net.LogManager.GetLogger("Main"); + + //Console.WriteLine(IssueTrackerIntegration.GetRepositoryName(@"F:\SVN\Repositories\MyRepo")); + //Console.ReadLine(); + + try + { + if (string.Compare("post-commit", args[0], true) == 0) + { + logger.Info("Starting post-commit..."); + + string repository = args[1]; + string revision = args[2]; + + logger.InfoFormat("Executing IssueTrackerIntegration.UpdateIssueTrackerFromRevision(\"{0}\", \"{1}\")", repository, revision); + IssueTrackerIntegration integration = new IssueTrackerIntegration(); + integration.UpdateIssueTrackerFromRevision(repository, revision); + logger.Info("Finished IssueTrackerIntegration.UpdateIssueTrackerFromRevision\n"); + } + } + catch (Exception ex) + { + logger.ErrorFormat("An error occurred: {0} \n\n {1}", ex.Message, ex.StackTrace); + } + } + } +} diff --git a/src/BugNET.GitHooks/Properties/AssemblyInfo.cs b/src/BugNET.GitHooks/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..d16e8f99 --- /dev/null +++ b/src/BugNET.GitHooks/Properties/AssemblyInfo.cs @@ -0,0 +1,7 @@ +using System.Reflection; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("BugNET.GenericHooks")] +[assembly: AssemblyDescription("")] diff --git a/src/BugNET.GitHooks/Properties/Settings.Designer.cs b/src/BugNET.GitHooks/Properties/Settings.Designer.cs new file mode 100644 index 00000000..31146900 --- /dev/null +++ b/src/BugNET.GitHooks/Properties/Settings.Designer.cs @@ -0,0 +1,99 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace BugNET.GitHooks.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.3.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("admin")] + public string BugNetUsername { + get { + return ((string)(this["BugNetUsername"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("password")] + public string BugNetPassword { + get { + return ((string)(this["BugNetPassword"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Data Source=.\\SQLEXPRESS;Database=BugNET;Integrated Security=True;")] + public string ConnectionString { + get { + return ((string)(this["ConnectionString"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("\\[?([A-Za-z]{1,50}-(\\d+))\\]?")] + public string IssueIdRegEx { + get { + return ((string)(this["IssueIdRegEx"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("http://localhost:59847/Webservices/BugNetServices.asmx")] + public string BugNetServicesUrl { + get { + return ((string)(this["BugNetServicesUrl"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public string BugNetWindowsAuthentication { + get { + return ((string)(this["BugNetWindowsAuthentication"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string SubversionBinDirectory { + get { + return ((string)(this["SubversionBinDirectory"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)] + [global::System.Configuration.DefaultSettingValueAttribute("http://localhost:59847/Webservices/BugNetServices.asmx")] + public string BugNET_SubversionHooks_BugNetServices_BugNetServices { + get { + return ((string)(this["BugNET_SubversionHooks_BugNetServices_BugNetServices"])); + } + } + } +} diff --git a/src/BugNET.GitHooks/Properties/Settings.settings b/src/BugNET.GitHooks/Properties/Settings.settings new file mode 100644 index 00000000..89a9d307 --- /dev/null +++ b/src/BugNET.GitHooks/Properties/Settings.settings @@ -0,0 +1,30 @@ + + + + + + admin + + + password + + + Data Source=.\SQLEXPRESS;Database=BugNET;Integrated Security=True; + + + \[?([A-Za-z]{1,50}-(\d+))\]? + + + http://localhost:59847/Webservices/BugNetServices.asmx + + + False + + + + + + http://localhost:59847/Webservices/BugNetServices.asmx + + + \ No newline at end of file diff --git a/src/BugNET.GitHooks/Web References/WebServices/BugNetServices.disco b/src/BugNET.GitHooks/Web References/WebServices/BugNetServices.disco new file mode 100644 index 00000000..ccfef616 --- /dev/null +++ b/src/BugNET.GitHooks/Web References/WebServices/BugNetServices.disco @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/BugNET.GitHooks/Web References/WebServices/BugNetServices.wsdl b/src/BugNET.GitHooks/Web References/WebServices/BugNetServices.wsdl new file mode 100644 index 00000000..3c8065a4 --- /dev/null +++ b/src/BugNET.GitHooks/Web References/WebServices/BugNetServices.wsdl @@ -0,0 +1,747 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/BugNET.GitHooks/Web References/WebServices/Reference.cs b/src/BugNET.GitHooks/Web References/WebServices/Reference.cs new file mode 100644 index 00000000..00523f1c --- /dev/null +++ b/src/BugNET.GitHooks/Web References/WebServices/Reference.cs @@ -0,0 +1,1057 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.42000. +// +#pragma warning disable 1591 + +namespace BugNET.GitHooks.WebServices { + using System; + using System.Web.Services; + using System.Diagnostics; + using System.Web.Services.Protocols; + using System.Xml.Serialization; + using System.ComponentModel; + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Web.Services.WebServiceBindingAttribute(Name="BugNetServicesSoap", Namespace="http://bugnetproject.com/")] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(object[]))] + public partial class BugNetServices : System.Web.Services.Protocols.SoapHttpClientProtocol { + + private System.Threading.SendOrPostCallback ValidIssueOperationCompleted; + + private System.Threading.SendOrPostCallback CreateNewIssueRevisionOperationCompleted; + + private System.Threading.SendOrPostCallback CreateNewIssueAttachmentOperationCompleted; + + private System.Threading.SendOrPostCallback RenameCategoryOperationCompleted; + + private System.Threading.SendOrPostCallback MoveCategoryOperationCompleted; + + private System.Threading.SendOrPostCallback GetCategoriesOperationCompleted; + + private System.Threading.SendOrPostCallback AddCategoryOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteCategoryOperationCompleted; + + private System.Threading.SendOrPostCallback GetResolutionsOperationCompleted; + + private System.Threading.SendOrPostCallback GetMilestonesOperationCompleted; + + private System.Threading.SendOrPostCallback GetIssueTypesOperationCompleted; + + private System.Threading.SendOrPostCallback GetPrioritiesOperationCompleted; + + private System.Threading.SendOrPostCallback GetStatusOperationCompleted; + + private System.Threading.SendOrPostCallback GetProjectIdOperationCompleted; + + private System.Threading.SendOrPostCallback GetProjectIssuesOperationCompleted; + + private System.Threading.SendOrPostCallback LogInOperationCompleted; + + private System.Threading.SendOrPostCallback LogOutOperationCompleted; + + private bool useDefaultCredentialsSetExplicitly; + + /// + public BugNetServices() { + this.Url = global::BugNET.GitHooks.Properties.Settings.Default.BugNET_SubversionHooks_BugNetServices_BugNetServices; + if ((this.IsLocalFileSystemWebService(this.Url) == true)) { + this.UseDefaultCredentials = true; + this.useDefaultCredentialsSetExplicitly = false; + } + else { + this.useDefaultCredentialsSetExplicitly = true; + } + } + + public new string Url { + get { + return base.Url; + } + set { + if ((((this.IsLocalFileSystemWebService(base.Url) == true) + && (this.useDefaultCredentialsSetExplicitly == false)) + && (this.IsLocalFileSystemWebService(value) == false))) { + base.UseDefaultCredentials = false; + } + base.Url = value; + } + } + + public new bool UseDefaultCredentials { + get { + return base.UseDefaultCredentials; + } + set { + base.UseDefaultCredentials = value; + this.useDefaultCredentialsSetExplicitly = true; + } + } + + /// + public event ValidIssueCompletedEventHandler ValidIssueCompleted; + + /// + public event CreateNewIssueRevisionCompletedEventHandler CreateNewIssueRevisionCompleted; + + /// + public event CreateNewIssueAttachmentCompletedEventHandler CreateNewIssueAttachmentCompleted; + + /// + public event RenameCategoryCompletedEventHandler RenameCategoryCompleted; + + /// + public event MoveCategoryCompletedEventHandler MoveCategoryCompleted; + + /// + public event GetCategoriesCompletedEventHandler GetCategoriesCompleted; + + /// + public event AddCategoryCompletedEventHandler AddCategoryCompleted; + + /// + public event DeleteCategoryCompletedEventHandler DeleteCategoryCompleted; + + /// + public event GetResolutionsCompletedEventHandler GetResolutionsCompleted; + + /// + public event GetMilestonesCompletedEventHandler GetMilestonesCompleted; + + /// + public event GetIssueTypesCompletedEventHandler GetIssueTypesCompleted; + + /// + public event GetPrioritiesCompletedEventHandler GetPrioritiesCompleted; + + /// + public event GetStatusCompletedEventHandler GetStatusCompleted; + + /// + public event GetProjectIdCompletedEventHandler GetProjectIdCompleted; + + /// + public event GetProjectIssuesCompletedEventHandler GetProjectIssuesCompleted; + + /// + public event LogInCompletedEventHandler LogInCompleted; + + /// + public event LogOutCompletedEventHandler LogOutCompleted; + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/ValidIssue", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool ValidIssue(int issueId) { + object[] results = this.Invoke("ValidIssue", new object[] { + issueId}); + return ((bool)(results[0])); + } + + /// + public void ValidIssueAsync(int issueId) { + this.ValidIssueAsync(issueId, null); + } + + /// + public void ValidIssueAsync(int issueId, object userState) { + if ((this.ValidIssueOperationCompleted == null)) { + this.ValidIssueOperationCompleted = new System.Threading.SendOrPostCallback(this.OnValidIssueOperationCompleted); + } + this.InvokeAsync("ValidIssue", new object[] { + issueId}, this.ValidIssueOperationCompleted, userState); + } + + private void OnValidIssueOperationCompleted(object arg) { + if ((this.ValidIssueCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.ValidIssueCompleted(this, new ValidIssueCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/CreateNewIssueRevision", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool CreateNewIssueRevision(int revision, int issueId, string repository, string revisionAuthor, string revisionDate, string revisionMessage, string changeset, string branch) { + object[] results = this.Invoke("CreateNewIssueRevision", new object[] { + revision, + issueId, + repository, + revisionAuthor, + revisionDate, + revisionMessage, + changeset, + branch}); + return ((bool)(results[0])); + } + + /// + public void CreateNewIssueRevisionAsync(int revision, int issueId, string repository, string revisionAuthor, string revisionDate, string revisionMessage, string changeset, string branch) { + this.CreateNewIssueRevisionAsync(revision, issueId, repository, revisionAuthor, revisionDate, revisionMessage, changeset, branch, null); + } + + /// + public void CreateNewIssueRevisionAsync(int revision, int issueId, string repository, string revisionAuthor, string revisionDate, string revisionMessage, string changeset, string branch, object userState) { + if ((this.CreateNewIssueRevisionOperationCompleted == null)) { + this.CreateNewIssueRevisionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateNewIssueRevisionOperationCompleted); + } + this.InvokeAsync("CreateNewIssueRevision", new object[] { + revision, + issueId, + repository, + revisionAuthor, + revisionDate, + revisionMessage, + changeset, + branch}, this.CreateNewIssueRevisionOperationCompleted, userState); + } + + private void OnCreateNewIssueRevisionOperationCompleted(object arg) { + if ((this.CreateNewIssueRevisionCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.CreateNewIssueRevisionCompleted(this, new CreateNewIssueRevisionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/CreateNewIssueAttachment", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool CreateNewIssueAttachment(int issueId, string creatorUserName, string fileName, string contentType, [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] byte[] attachment, int size, string description) { + object[] results = this.Invoke("CreateNewIssueAttachment", new object[] { + issueId, + creatorUserName, + fileName, + contentType, + attachment, + size, + description}); + return ((bool)(results[0])); + } + + /// + public void CreateNewIssueAttachmentAsync(int issueId, string creatorUserName, string fileName, string contentType, byte[] attachment, int size, string description) { + this.CreateNewIssueAttachmentAsync(issueId, creatorUserName, fileName, contentType, attachment, size, description, null); + } + + /// + public void CreateNewIssueAttachmentAsync(int issueId, string creatorUserName, string fileName, string contentType, byte[] attachment, int size, string description, object userState) { + if ((this.CreateNewIssueAttachmentOperationCompleted == null)) { + this.CreateNewIssueAttachmentOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateNewIssueAttachmentOperationCompleted); + } + this.InvokeAsync("CreateNewIssueAttachment", new object[] { + issueId, + creatorUserName, + fileName, + contentType, + attachment, + size, + description}, this.CreateNewIssueAttachmentOperationCompleted, userState); + } + + private void OnCreateNewIssueAttachmentOperationCompleted(object arg) { + if ((this.CreateNewIssueAttachmentCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.CreateNewIssueAttachmentCompleted(this, new CreateNewIssueAttachmentCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/RenameCategory", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void RenameCategory(string categoryId, string name) { + this.Invoke("RenameCategory", new object[] { + categoryId, + name}); + } + + /// + public void RenameCategoryAsync(string categoryId, string name) { + this.RenameCategoryAsync(categoryId, name, null); + } + + /// + public void RenameCategoryAsync(string categoryId, string name, object userState) { + if ((this.RenameCategoryOperationCompleted == null)) { + this.RenameCategoryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRenameCategoryOperationCompleted); + } + this.InvokeAsync("RenameCategory", new object[] { + categoryId, + name}, this.RenameCategoryOperationCompleted, userState); + } + + private void OnRenameCategoryOperationCompleted(object arg) { + if ((this.RenameCategoryCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.RenameCategoryCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/MoveCategory", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void MoveCategory(string categoryId, string oldParentId, string newParentId) { + this.Invoke("MoveCategory", new object[] { + categoryId, + oldParentId, + newParentId}); + } + + /// + public void MoveCategoryAsync(string categoryId, string oldParentId, string newParentId) { + this.MoveCategoryAsync(categoryId, oldParentId, newParentId, null); + } + + /// + public void MoveCategoryAsync(string categoryId, string oldParentId, string newParentId, object userState) { + if ((this.MoveCategoryOperationCompleted == null)) { + this.MoveCategoryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnMoveCategoryOperationCompleted); + } + this.InvokeAsync("MoveCategory", new object[] { + categoryId, + oldParentId, + newParentId}, this.MoveCategoryOperationCompleted, userState); + } + + private void OnMoveCategoryOperationCompleted(object arg) { + if ((this.MoveCategoryCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.MoveCategoryCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/GetCategories", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string GetCategories(string projectId) { + object[] results = this.Invoke("GetCategories", new object[] { + projectId}); + return ((string)(results[0])); + } + + /// + public void GetCategoriesAsync(string projectId) { + this.GetCategoriesAsync(projectId, null); + } + + /// + public void GetCategoriesAsync(string projectId, object userState) { + if ((this.GetCategoriesOperationCompleted == null)) { + this.GetCategoriesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetCategoriesOperationCompleted); + } + this.InvokeAsync("GetCategories", new object[] { + projectId}, this.GetCategoriesOperationCompleted, userState); + } + + private void OnGetCategoriesOperationCompleted(object arg) { + if ((this.GetCategoriesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetCategoriesCompleted(this, new GetCategoriesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/AddCategory", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddCategory(string projectId, string name, string parentCategoryId) { + object[] results = this.Invoke("AddCategory", new object[] { + projectId, + name, + parentCategoryId}); + return ((int)(results[0])); + } + + /// + public void AddCategoryAsync(string projectId, string name, string parentCategoryId) { + this.AddCategoryAsync(projectId, name, parentCategoryId, null); + } + + /// + public void AddCategoryAsync(string projectId, string name, string parentCategoryId, object userState) { + if ((this.AddCategoryOperationCompleted == null)) { + this.AddCategoryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddCategoryOperationCompleted); + } + this.InvokeAsync("AddCategory", new object[] { + projectId, + name, + parentCategoryId}, this.AddCategoryOperationCompleted, userState); + } + + private void OnAddCategoryOperationCompleted(object arg) { + if ((this.AddCategoryCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.AddCategoryCompleted(this, new AddCategoryCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/DeleteCategory", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void DeleteCategory(string categoryId) { + this.Invoke("DeleteCategory", new object[] { + categoryId}); + } + + /// + public void DeleteCategoryAsync(string categoryId) { + this.DeleteCategoryAsync(categoryId, null); + } + + /// + public void DeleteCategoryAsync(string categoryId, object userState) { + if ((this.DeleteCategoryOperationCompleted == null)) { + this.DeleteCategoryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteCategoryOperationCompleted); + } + this.InvokeAsync("DeleteCategory", new object[] { + categoryId}, this.DeleteCategoryOperationCompleted, userState); + } + + private void OnDeleteCategoryOperationCompleted(object arg) { + if ((this.DeleteCategoryCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeleteCategoryCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/GetResolutions", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string[] GetResolutions(int ProjectId) { + object[] results = this.Invoke("GetResolutions", new object[] { + ProjectId}); + return ((string[])(results[0])); + } + + /// + public void GetResolutionsAsync(int ProjectId) { + this.GetResolutionsAsync(ProjectId, null); + } + + /// + public void GetResolutionsAsync(int ProjectId, object userState) { + if ((this.GetResolutionsOperationCompleted == null)) { + this.GetResolutionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetResolutionsOperationCompleted); + } + this.InvokeAsync("GetResolutions", new object[] { + ProjectId}, this.GetResolutionsOperationCompleted, userState); + } + + private void OnGetResolutionsOperationCompleted(object arg) { + if ((this.GetResolutionsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetResolutionsCompleted(this, new GetResolutionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/GetMilestones", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string[] GetMilestones(int ProjectId) { + object[] results = this.Invoke("GetMilestones", new object[] { + ProjectId}); + return ((string[])(results[0])); + } + + /// + public void GetMilestonesAsync(int ProjectId) { + this.GetMilestonesAsync(ProjectId, null); + } + + /// + public void GetMilestonesAsync(int ProjectId, object userState) { + if ((this.GetMilestonesOperationCompleted == null)) { + this.GetMilestonesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMilestonesOperationCompleted); + } + this.InvokeAsync("GetMilestones", new object[] { + ProjectId}, this.GetMilestonesOperationCompleted, userState); + } + + private void OnGetMilestonesOperationCompleted(object arg) { + if ((this.GetMilestonesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetMilestonesCompleted(this, new GetMilestonesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/GetIssueTypes", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string[] GetIssueTypes(int ProjectId) { + object[] results = this.Invoke("GetIssueTypes", new object[] { + ProjectId}); + return ((string[])(results[0])); + } + + /// + public void GetIssueTypesAsync(int ProjectId) { + this.GetIssueTypesAsync(ProjectId, null); + } + + /// + public void GetIssueTypesAsync(int ProjectId, object userState) { + if ((this.GetIssueTypesOperationCompleted == null)) { + this.GetIssueTypesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetIssueTypesOperationCompleted); + } + this.InvokeAsync("GetIssueTypes", new object[] { + ProjectId}, this.GetIssueTypesOperationCompleted, userState); + } + + private void OnGetIssueTypesOperationCompleted(object arg) { + if ((this.GetIssueTypesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetIssueTypesCompleted(this, new GetIssueTypesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/GetPriorities", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string[] GetPriorities(int ProjectId) { + object[] results = this.Invoke("GetPriorities", new object[] { + ProjectId}); + return ((string[])(results[0])); + } + + /// + public void GetPrioritiesAsync(int ProjectId) { + this.GetPrioritiesAsync(ProjectId, null); + } + + /// + public void GetPrioritiesAsync(int ProjectId, object userState) { + if ((this.GetPrioritiesOperationCompleted == null)) { + this.GetPrioritiesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPrioritiesOperationCompleted); + } + this.InvokeAsync("GetPriorities", new object[] { + ProjectId}, this.GetPrioritiesOperationCompleted, userState); + } + + private void OnGetPrioritiesOperationCompleted(object arg) { + if ((this.GetPrioritiesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetPrioritiesCompleted(this, new GetPrioritiesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/GetStatus", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string[] GetStatus(int ProjectId) { + object[] results = this.Invoke("GetStatus", new object[] { + ProjectId}); + return ((string[])(results[0])); + } + + /// + public void GetStatusAsync(int ProjectId) { + this.GetStatusAsync(ProjectId, null); + } + + /// + public void GetStatusAsync(int ProjectId, object userState) { + if ((this.GetStatusOperationCompleted == null)) { + this.GetStatusOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetStatusOperationCompleted); + } + this.InvokeAsync("GetStatus", new object[] { + ProjectId}, this.GetStatusOperationCompleted, userState); + } + + private void OnGetStatusOperationCompleted(object arg) { + if ((this.GetStatusCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetStatusCompleted(this, new GetStatusCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/GetProjectId", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int GetProjectId(string ProjectCode) { + object[] results = this.Invoke("GetProjectId", new object[] { + ProjectCode}); + return ((int)(results[0])); + } + + /// + public void GetProjectIdAsync(string ProjectCode) { + this.GetProjectIdAsync(ProjectCode, null); + } + + /// + public void GetProjectIdAsync(string ProjectCode, object userState) { + if ((this.GetProjectIdOperationCompleted == null)) { + this.GetProjectIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetProjectIdOperationCompleted); + } + this.InvokeAsync("GetProjectId", new object[] { + ProjectCode}, this.GetProjectIdOperationCompleted, userState); + } + + private void OnGetProjectIdOperationCompleted(object arg) { + if ((this.GetProjectIdCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetProjectIdCompleted(this, new GetProjectIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/GetProjectIssues", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public object[] GetProjectIssues(int ProjectId, string Filter) { + object[] results = this.Invoke("GetProjectIssues", new object[] { + ProjectId, + Filter}); + return ((object[])(results[0])); + } + + /// + public void GetProjectIssuesAsync(int ProjectId, string Filter) { + this.GetProjectIssuesAsync(ProjectId, Filter, null); + } + + /// + public void GetProjectIssuesAsync(int ProjectId, string Filter, object userState) { + if ((this.GetProjectIssuesOperationCompleted == null)) { + this.GetProjectIssuesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetProjectIssuesOperationCompleted); + } + this.InvokeAsync("GetProjectIssues", new object[] { + ProjectId, + Filter}, this.GetProjectIssuesOperationCompleted, userState); + } + + private void OnGetProjectIssuesOperationCompleted(object arg) { + if ((this.GetProjectIssuesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetProjectIssuesCompleted(this, new GetProjectIssuesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/LogIn", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool LogIn(string userName, string password) { + object[] results = this.Invoke("LogIn", new object[] { + userName, + password}); + return ((bool)(results[0])); + } + + /// + public void LogInAsync(string userName, string password) { + this.LogInAsync(userName, password, null); + } + + /// + public void LogInAsync(string userName, string password, object userState) { + if ((this.LogInOperationCompleted == null)) { + this.LogInOperationCompleted = new System.Threading.SendOrPostCallback(this.OnLogInOperationCompleted); + } + this.InvokeAsync("LogIn", new object[] { + userName, + password}, this.LogInOperationCompleted, userState); + } + + private void OnLogInOperationCompleted(object arg) { + if ((this.LogInCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.LogInCompleted(this, new LogInCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://bugnetproject.com/LogOut", RequestNamespace="http://bugnetproject.com/", ResponseNamespace="http://bugnetproject.com/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void LogOut() { + this.Invoke("LogOut", new object[0]); + } + + /// + public void LogOutAsync() { + this.LogOutAsync(null); + } + + /// + public void LogOutAsync(object userState) { + if ((this.LogOutOperationCompleted == null)) { + this.LogOutOperationCompleted = new System.Threading.SendOrPostCallback(this.OnLogOutOperationCompleted); + } + this.InvokeAsync("LogOut", new object[0], this.LogOutOperationCompleted, userState); + } + + private void OnLogOutOperationCompleted(object arg) { + if ((this.LogOutCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.LogOutCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + public new void CancelAsync(object userState) { + base.CancelAsync(userState); + } + + private bool IsLocalFileSystemWebService(string url) { + if (((url == null) + || (url == string.Empty))) { + return false; + } + System.Uri wsUri = new System.Uri(url); + if (((wsUri.Port >= 1024) + && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) { + return true; + } + return false; + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void ValidIssueCompletedEventHandler(object sender, ValidIssueCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ValidIssueCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal ValidIssueCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void CreateNewIssueRevisionCompletedEventHandler(object sender, CreateNewIssueRevisionCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateNewIssueRevisionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal CreateNewIssueRevisionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void CreateNewIssueAttachmentCompletedEventHandler(object sender, CreateNewIssueAttachmentCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateNewIssueAttachmentCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal CreateNewIssueAttachmentCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void RenameCategoryCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void MoveCategoryCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void GetCategoriesCompletedEventHandler(object sender, GetCategoriesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetCategoriesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetCategoriesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void AddCategoryCompletedEventHandler(object sender, AddCategoryCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddCategoryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal AddCategoryCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void DeleteCategoryCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void GetResolutionsCompletedEventHandler(object sender, GetResolutionsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetResolutionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetResolutionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void GetMilestonesCompletedEventHandler(object sender, GetMilestonesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMilestonesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetMilestonesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void GetIssueTypesCompletedEventHandler(object sender, GetIssueTypesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetIssueTypesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetIssueTypesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void GetPrioritiesCompletedEventHandler(object sender, GetPrioritiesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetPrioritiesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetPrioritiesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void GetStatusCompletedEventHandler(object sender, GetStatusCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetStatusCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void GetProjectIdCompletedEventHandler(object sender, GetProjectIdCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetProjectIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetProjectIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void GetProjectIssuesCompletedEventHandler(object sender, GetProjectIssuesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetProjectIssuesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetProjectIssuesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public object[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((object[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void LogInCompletedEventHandler(object sender, LogInCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class LogInCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal LogInCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.2046.0")] + public delegate void LogOutCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); +} + +#pragma warning restore 1591 \ No newline at end of file diff --git a/src/BugNET.GitHooks/Web References/WebServices/Reference.map b/src/BugNET.GitHooks/Web References/WebServices/Reference.map new file mode 100644 index 00000000..284bcf20 --- /dev/null +++ b/src/BugNET.GitHooks/Web References/WebServices/Reference.map @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/BugNET.GitHooks/packages.config b/src/BugNET.GitHooks/packages.config new file mode 100644 index 00000000..c40d18e3 --- /dev/null +++ b/src/BugNET.GitHooks/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/BugNET.GitHooks/post-receive b/src/BugNET.GitHooks/post-receive new file mode 100644 index 00000000..d4fa8079 --- /dev/null +++ b/src/BugNET.GitHooks/post-receive @@ -0,0 +1,3 @@ +#!/bin/sh +revision=$(git log -1 --pretty=format:'%H' $newrev) +"C:\inetpub\web\git.intra.jnetwork.ch\App_Data\BugnetProject\BugNET.GitHooks.exe" post-commit ./ $revision \ No newline at end of file diff --git a/src/BugNET.sln b/src/BugNET.sln index 0634162d..3435ce38 100644 --- a/src/BugNET.sln +++ b/src/BugNET.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.24720.0 +# Visual Studio 15 +VisualStudioVersion = 15.0.27004.2009 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{DDC6CC4C-AABD-4AF2-A512-F48C9F964E05}" EndProject @@ -80,6 +80,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".build", ".build", "{3CD2E8 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UnitTests", "UnitTests", "{C3A7E838-782B-4F8D-A6B3-4A2C3A2A3480}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BugNET.GitHooks", "BugNET.GitHooks\BugNET.GitHooks.csproj", "{DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|.NET = Debug|.NET @@ -357,6 +359,22 @@ Global {7F2EBE35-394E-4FB5-B2CB-3FDD0BEBF010}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {7F2EBE35-394E-4FB5-B2CB-3FDD0BEBF010}.Release|Mixed Platforms.Build.0 = Release|Any CPU {7F2EBE35-394E-4FB5-B2CB-3FDD0BEBF010}.Release|x86.ActiveCfg = Release|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Debug|.NET.ActiveCfg = Debug|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Debug|.NET.Build.0 = Debug|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Debug|x86.ActiveCfg = Debug|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Debug|x86.Build.0 = Debug|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Release|.NET.ActiveCfg = Release|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Release|.NET.Build.0 = Release|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Release|Any CPU.Build.0 = Release|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Release|x86.ActiveCfg = Release|Any CPU + {DFFF7129-FA65-4B99-BFEA-7F32CF206EE5}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -378,4 +396,7 @@ Global {DF8C87FA-3398-4AEE-99B0-D47F1831C158} = {B2D1A025-9A81-4F08-A0BA-ACE9086CEA7F} {FDF4A25C-52BE-46EC-AFC3-49965F085E16} = {C3A7E838-782B-4F8D-A6B3-4A2C3A2A3480} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EFD02BB0-4347-4962-A3AA-E4BA9842760A} + EndGlobalSection EndGlobal