private TfsIssueTrackingProvider GetProvider() { var application = StoredProcs.Applications_GetApplication(this.EditorContext.ApplicationId) .Execute() .Applications_Extended .First(); return((TfsIssueTrackingProvider)Util.Providers.CreateProviderFromId <IssueTrackingProviderBase>(application.IssueTracking_Provider_Id.Value)); }
private static object GetAreas(int applicationId, string collectionId, string projectName) { WebUserContext.ValidatePrivileges(SecuredTask.Applications_EditApplication, applicationId: applicationId); var application = StoredProcs.Applications_GetApplication(applicationId) .Execute() .Applications_Extended .First(); using (var provider = (TfsIssueTrackingProvider)Util.Providers.CreateProviderFromId <IssueTrackingProviderBase>(application.IssueTracking_Provider_Id.Value)) { return(GetAreasInternal(null, provider.GetAreas(Guid.Parse(collectionId), projectName))); } }
private static object GetProjects(int applicationId, string collectionId) { WebUserContext.ValidatePrivileges(SecuredTask.Applications_EditApplication, applicationId: applicationId); var application = StoredProcs.Applications_GetApplication(applicationId) .Execute() .Applications_Extended .First(); using (var provider = (TfsIssueTrackingProvider)Util.Providers.CreateProviderFromId <IssueTrackingProviderBase>(application.IssueTracking_Provider_Id.Value)) { return(from p in provider.GetProjects(Guid.Parse(collectionId)) orderby p.Name select new { id = p.Name, text = p.Name }); } }