Ejemplo n.º 1
0
 public void CreateWorkItem(string appid, TfsWorkItem workItem)
 {
     this.Invoke("CreateWorkItem", new object[] {
         appid,
         workItem
     });
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Submits the bug.
        /// </summary>
        /// <param name="title">The title.</param>
        /// <param name="description">The description.</param>
        /// <param name="asm">The asm.</param>
        public void SubmitBug(string title, string description, /*FileInfo attachedFile,*/ Assembly asm)
        {
            org.ccnetconfig.services.TfsWorkItem workItem = new org.ccnetconfig.services.TfsWorkItem( );
            workItem.TfsServer        = this.TfsServer;
            workItem.ProjectId        = this.ProjectId;
            workItem.Description      = description;
            workItem.Title            = title;
            workItem.WorkItemTypeName = "Work Item";

            List <TfsField> fields = new List <TfsField>(  );
            TfsField        f      = new CCNetConfig.BugTracking.org.ccnetconfig.services.TfsField(  );

            f.ReferenceName = "CodePlex.UserVotes";
            f.Value         = "1";
            fields.Add(f);

            f = new CCNetConfig.BugTracking.org.ccnetconfig.services.TfsField( );
            f.ReferenceName = "System.AreaPath";
            f.Value         = this.GetCategoryNameByAssembly(asm);
            fields.Add(f);

            f = new CCNetConfig.BugTracking.org.ccnetconfig.services.TfsField( );
            f.ReferenceName = "CodeStudio.Rank";
            f.Value         = "Medium";
            fields.Add(f);

            f = new CCNetConfig.BugTracking.org.ccnetconfig.services.TfsField( );
            f.ReferenceName = "CodeStudio.WorkItemType";
            f.Value         = "Issue";
            fields.Add(f);

            workItem.Fields = fields.ToArray( );
            SubmitBug(workItem);
        }
Ejemplo n.º 3
0
 /// <remarks/>
 public void CreateWorkItemAsync(string appid, TfsWorkItem workItem, object userState)
 {
     if ((this.CreateWorkItemOperationCompleted == null))
     {
         this.CreateWorkItemOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateWorkItemOperationCompleted);
     }
     this.InvokeAsync("CreateWorkItem", new object[] {
         appid,
         workItem
     }, this.CreateWorkItemOperationCompleted, userState);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Submits the bug.
        /// </summary>
        /// <param name="item">The item.</param>
        public void SubmitBug(org.ccnetconfig.services.TfsWorkItem item)
        {
            org.ccnetconfig.services.BugTracker webService = new org.ccnetconfig.services.BugTracker( );
            Assembly asm = Assembly.GetCallingAssembly();

            webService.Proxy                    = this.Proxy;
            webService.UserAgent                = string.Format("{0} v{1}", asm.GetName().Name, asm.GetName().Version.ToString());
            webService.Url                      = this.ServiceUri.ToString();
            webService.CookieContainer          = new System.Net.CookieContainer();
            webService.CreateWorkItemCompleted += new CCNetConfig.BugTracking.org.ccnetconfig.services.CreateWorkItemCompletedEventHandler(webService_CreateWorkItemCompleted);
            webService.CreateWorkItemAsync(Properties.Resources.WebServiceApplicationId, item);
        }
Ejemplo n.º 5
0
 /// <remarks/>
 public void CreateWorkItemAsync(string appid, TfsWorkItem workItem)
 {
     this.CreateWorkItemAsync(appid, workItem, null);
 }