예제 #1
0
파일: Reference.cs 프로젝트: sukchr/Logira
 /// <remarks/>
 public void createIssueWithParentWithSecurityLevelAsync(string in0, RemoteIssue in1, string in2, long in3) {
     this.createIssueWithParentWithSecurityLevelAsync(in0, in1, in2, in3, null);
 }
예제 #2
0
파일: Reference.cs 프로젝트: sukchr/Logira
 /// <remarks/>
 public void createIssueWithParentWithSecurityLevelAsync(string in0, RemoteIssue in1, string in2, long in3, object userState) {
     if ((this.createIssueWithParentWithSecurityLevelOperationCompleted == null)) {
         this.createIssueWithParentWithSecurityLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OncreateIssueWithParentWithSecurityLevelOperationCompleted);
     }
     this.InvokeAsync("createIssueWithParentWithSecurityLevel", new object[] {
                 in0,
                 in1,
                 in2,
                 in3}, this.createIssueWithParentWithSecurityLevelOperationCompleted, userState);
 }
예제 #3
0
파일: Reference.cs 프로젝트: sukchr/Logira
 /// <remarks/>
 public void createIssueWithParentAsync(string in0, RemoteIssue in1, string in2) {
     this.createIssueWithParentAsync(in0, in1, in2, null);
 }
예제 #4
0
파일: Reference.cs 프로젝트: sukchr/Logira
 public RemoteIssue createIssueWithParentWithSecurityLevel(string in0, RemoteIssue in1, string in2, long in3) {
     object[] results = this.Invoke("createIssueWithParentWithSecurityLevel", new object[] {
                 in0,
                 in1,
                 in2,
                 in3});
     return ((RemoteIssue)(results[0]));
 }
예제 #5
0
파일: Reference.cs 프로젝트: sukchr/Logira
 /// <remarks/>
 public void createIssueAsync(string in0, RemoteIssue in1, object userState) {
     if ((this.createIssueOperationCompleted == null)) {
         this.createIssueOperationCompleted = new System.Threading.SendOrPostCallback(this.OncreateIssueOperationCompleted);
     }
     this.InvokeAsync("createIssue", new object[] {
                 in0,
                 in1}, this.createIssueOperationCompleted, userState);
 }
예제 #6
0
파일: Reference.cs 프로젝트: sukchr/Logira
 public RemoteIssue createIssueWithParent(string in0, RemoteIssue in1, string in2) {
     object[] results = this.Invoke("createIssueWithParent", new object[] {
                 in0,
                 in1,
                 in2});
     return ((RemoteIssue)(results[0]));
 }
예제 #7
0
파일: Reference.cs 프로젝트: sukchr/Logira
 /// <remarks/>
 public void createIssueAsync(string in0, RemoteIssue in1) {
     this.createIssueAsync(in0, in1, null);
 }
예제 #8
0
파일: Reference.cs 프로젝트: sukchr/Logira
 public RemoteIssue createIssue(string in0, RemoteIssue in1) {
     object[] results = this.Invoke("createIssue", new object[] {
                 in0,
                 in1});
     return ((RemoteIssue)(results[0]));
 }
예제 #9
0
        protected override void Append(LoggingEvent loggingEvent)
        {
            var summary = Layout != null ? RenderLoggingEvent(loggingEvent) : loggingEvent.MessageObject.ToString();

            var issue = new RemoteIssue
            {
                project = ProjectKey,
                type = IssueTypeId,
                summary = summary.Truncate(SummaryMaxCharCount)
            };
            if (!string.IsNullOrEmpty(AssigneeUsername)) issue.assignee = AssigneeUsername;
            if (!string.IsNullOrEmpty(ComponentId)) issue.components = new[] { new RemoteComponent { id = ComponentId } };
            var description = new StringBuilder();
            if (summary.Length > SummaryMaxCharCount) description.AppendFormat("Message: {0}\n", summary);
            description.AppendFormat("Level: {0}\n", loggingEvent.Level);
            description.AppendFormat("Logger: {0}\n", loggingEvent.LoggerName);
            if (loggingEvent.ExceptionObject != null)
            {
                description.Append("\n{code:title=Exception}");
                description.Append(loggingEvent.GetExceptionString());
                description.Append("{code}");
            }
            issue.description = description.ToString();

            var service = new JiraSoapServiceService { Url = Url };
            var token = service.login(Username, Password);
            LogLog.Debug(string.Format("Sending request to JIRA: {0}", issue.ToJson()));
            var returnedIssue = service.createIssue(token, issue);
            LogLog.Debug(string.Format("Got response from JIRA: {0}", returnedIssue.ToJson()));
            LogLog.Debug(string.Format("Created issue: {0}", returnedIssue.key));
        }
예제 #10
0
파일: Jira.cs 프로젝트: bjovas/Logira
        internal static RemoteIssue CreateIssue(string token, RemoteIssue remoteIssue)
        {
            if (!IsConfigured)
                throw new InvalidOperationException("JIRA is not configured");

            if (Log.IsDebugEnabled)
                Log.DebugFormat("Creating issue:\n{0}", remoteIssue.ToJson());

            remoteIssue = Service.createIssue(token, remoteIssue);

            if (Log.IsDebugEnabled)
                Log.DebugFormat("Successfully created issue:\n{0}", remoteIssue.ToJson());

            return remoteIssue;
        }
예제 #11
0
파일: Jira.cs 프로젝트: bjovas/Logira
        /// <summary>
        /// Adds attachments to a given issue.
        /// </summary>
        /// <param name="token"></param>
        /// <param name="remoteIssue"></param>
        /// <param name="remoteAttachments">A tuple where the first string array is a list of names, the second array a base64 encoded list of files corresponding to the names.</param>
        internal static void AddAttachments(string token, RemoteIssue remoteIssue, Tuple<string[], string[]> remoteAttachments)
        {
            if (!IsConfigured)
                throw new InvalidOperationException("JIRA is not configured");

            if (Log.IsDebugEnabled)
                Log.DebugFormat("Adding attachments to issue {0}: {1}", remoteIssue.key, remoteAttachments.Item1.Join());

            Service.addBase64EncodedAttachmentsToIssue(token, remoteIssue.key, remoteAttachments.Item1, remoteAttachments.Item2);
        }