Example #1
0
        public TrackedItemFiler(string defaultTitle, string defaultDescription, string[] defaultFileAttachments, string currentProject, IServiceProvider services)
        {
            this.defaultTitle           = defaultTitle;
            this.defaultDescription     = defaultDescription;
            this.defaultFileAttachments = defaultFileAttachments;
            this.currentProject         = currentProject;
            this.services = (IServiceProvider)(services as IServices);
            IIssueTrackingService issueTrackingService = this.services.GetService(typeof(IIssueTrackingService)) as IIssueTrackingService;

            if (issueTrackingService == null)
            {
                return;
            }
            this.issueTrackingProvider = issueTrackingService.ActiveProvider;
        }
 public void Load(IServices services)
 {
     if (services == null)
     {
         throw new ArgumentNullException("services");
     }
     this.services             = services;
     this.sourceControlService = (ISourceControlService) new SourceControlService((IServiceProvider)services);
     this.issueTrackingService = (IIssueTrackingService) new IssueTrackingService((IServiceProvider)services);
     this.services.AddService(typeof(ISourceControlService), (object)this.sourceControlService);
     this.services.AddService(typeof(IIssueTrackingService), (object)this.issueTrackingService);
     this.sourceControlService.RegisterProvider("TeamFoundationVersionControl", new SourceControlProviderCreatorCallback(this.LoadTeamFoundationServiceSourceControlProviderCallback));
     this.issueTrackingService.RegisterProvider("TeamFoundationVersionControl", new IssueTrackingProviderCreatorCallback(this.LoadTeamFoundationServiceIssueTrackingProviderCallback));
     this.sourceControlService.SetProperty("TeamFoundationVersionControl", "Description", (object)"Team Foundation Server");
     this.issueTrackingService.SetProperty("TeamFoundationVersionControl", "Description", (object)"Team Foundation Server");
 }
 protected IssueTrackingProviderBase(IServiceProvider serviceProvider)
 {
     this.serviceProvider      = serviceProvider;
     this.issueTrackingService = (IIssueTrackingService)serviceProvider.GetService(typeof(IIssueTrackingService));
 }