internal TeamFoundationIdentity(Tfs.TeamFoundationIdentity identity)
            : base(
                identity.IsActive,
                identity.TeamFoundationId,
                identity.UniqueUserId,
                identity.MemberOf.Select(i => new IdentityDescriptor(i)).ToArray(),
                identity.Members.Select(i => new IdentityDescriptor(i)).ToArray())
        {
            _identity = identity;

            _descriptor = new Lazy <IIdentityDescriptor>(
                () => ExceptionHandlingDynamicProxyFactory.Create <IIdentityDescriptor>(
                    new IdentityDescriptor(_identity.Descriptor)));
        }
Exemple #2
0
        public IdentityDescriptor GetIdentityToImpersonate(Uri projectCollectionUrl)
        {
            var configurationServer = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(projectCollectionUrl);

            // TODO: Find a way to read the identity from the server object model instead.
            IIdentityManagementService identityManagementService =
                configurationServer.GetService <IIdentityManagementService>();

            Microsoft.TeamFoundation.Framework.Client.TeamFoundationIdentity identity =
                identityManagementService.ReadIdentities(
                    new[] { new Guid(this.Notification.ChangerTeamFoundationId) },
                    MembershipQuery.None).FirstOrDefault();

            return(identity?.Descriptor);
        }
Exemple #3
0
 public void UpdateExtendedProperties(Microsoft.TeamFoundation.Framework.Client.TeamFoundationIdentity identity)
 {
     throw new NotSupportedException();
 }
Exemple #4
0
 public void AddRecentUser(Microsoft.TeamFoundation.Framework.Client.TeamFoundationIdentity identity)
 {
     throw new NotSupportedException();
 }
 internal TeamFoundationIdentityProxy(Tfs.TeamFoundationIdentity identity)
 {
     _identity = identity;
 }