Example #1
0
 public WorkItemRepository(Uri tfsCollectionUri, IdentityDescriptor toImpersonate, IRuntimeContext context)
 {
     this.logger        = context.Logger;
     this.context       = context;
     this.tfs           = new TfsTeamProjectCollection(tfsCollectionUri, toImpersonate);
     this.workItemStore = this.tfs.GetService <WorkItemStore>();
 }
Example #2
0
        public ConnectionInfo GetConnectionInfo()
        {
            var requestUri = this.RequestContext.GetProjectCollectionUri();
            var uri        = requestUri.ApplyServerSetting(this);

            Microsoft.TeamFoundation.Framework.Client.IdentityDescriptor toImpersonate = null;
            if (this.Settings.AutoImpersonate)
            {
                toImpersonate = this.RequestContext.GetIdentityToImpersonate(uri);
            }

            return(new ConnectionInfo(uri, toImpersonate));
        }
Example #3
0
        public IWorkItemRepository GetWorkItemRepository()
        {
            var uri = this.RequestContext.GetProjectCollectionUri();

            Microsoft.TeamFoundation.Framework.Client.IdentityDescriptor toImpersonate = null;
            if (this.Settings.AutoImpersonate)
            {
                toImpersonate = this.RequestContext.GetIdentityToImpersonate();
            }

            var newRepo = this.repoBuilder(uri, toImpersonate, this.Logger);

            this.Logger.WorkItemRepositoryBuilt(uri, toImpersonate);
            return(newRepo);
        }
Example #4
0
        protected virtual IWorkItemRepository CreateWorkItemRepository()
        {
            var requestUri = this.RequestContext.GetProjectCollectionUri();
            var uri        = requestUri.ApplyServerSetting(this);

            Microsoft.TeamFoundation.Framework.Client.IdentityDescriptor toImpersonate = null;
            if (this.Settings.AutoImpersonate)
            {
                toImpersonate = this.RequestContext.GetIdentityToImpersonate(uri);
            }

            var newRepo = this.repoBuilder(uri, toImpersonate, this);

            this.Logger.WorkItemRepositoryBuilt(uri, toImpersonate);
            return(newRepo);
        }
Example #5
0
 public ImpersonateAuthenticationToken(IdentityDescriptor identityDescriptor)
 {
     this.identityDescriptor = identityDescriptor;
 }
Example #6
0
 public WorkItemRepository(string tfsCollectionUrl, IdentityDescriptor toImpersonate, ILogEvents logger)
 {
     this.logger           = logger;
     this.tfsCollectionUrl = tfsCollectionUrl;
     this.toImpersonate    = toImpersonate;
 }
 public WorkItemRepository(string tfsCollectionUrl, IdentityDescriptor toImpersonate, ILogEvents logger)
 {
     this.logger = logger;
     this.tfsCollectionUrl = tfsCollectionUrl;
     this.toImpersonate = toImpersonate;
 }
 public WorkItemRepository(Uri tfsCollectionUri, IdentityDescriptor toImpersonate, ILogEvents logger)
 {
     this.logger = logger;
     this.tfs = new TfsTeamProjectCollection(tfsCollectionUri, toImpersonate);
     this.workItemStore = (WorkItemStore)this.tfs.GetService(typeof(WorkItemStore));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EventProcessor"/> class.
 /// </summary>
 /// <param name="tfsCollectionUrl">The TFS Project Colection Uri</param>
 /// <param name="toImpersonate">The IdentityDescriptor to Impoersonate</param>
 /// <param name="runtime">The runtime context</param>
 public EventProcessor(string tfsCollectionUrl, IdentityDescriptor toImpersonate, IRuntimeContext runtime)
     : this(new WorkItemRepository(tfsCollectionUrl, toImpersonate, runtime.Logger), runtime)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EventProcessor"/> class.
 /// </summary>
 /// <param name="tfsCollectionUrl">The TFS Project Colection Uri</param>
 /// <param name="toImpersonate">The IdentityDescriptor to Impoersonate</param>
 /// <param name="runtime">The runtime context</param>
 public EventProcessor(string tfsCollectionUrl, IdentityDescriptor toImpersonate, IRuntimeContext runtime)
     : this(new WorkItemRepository(tfsCollectionUrl, toImpersonate, runtime.Logger), runtime)
 {
 }
 public WorkItemRepository(Uri tfsCollectionUri, IdentityDescriptor toImpersonate, ILogEvents logger)
 {
     this.logger        = logger;
     this.tfs           = new TfsTeamProjectCollection(tfsCollectionUri, toImpersonate);
     this.workItemStore = (WorkItemStore)this.tfs.GetService(typeof(WorkItemStore));
 }