Example #1
0
 public override int CalculateVersion()
 {
     return(new
     {
         Base = base.CalculateVersion(),
         Active,
         Locale,
         Name = Name == null ? 0 : Name.CalculateVersion(),
         NickName,
         DisplayName,
         Password,
         PreferredLanguage,
         ProfileUrl,
         Timezone,
         Title,
         UserName,
         UserType,
         Addresses = Addresses.GetMultiValuedAttributeCollectionVersion(),
         Emails = Emails.GetMultiValuedAttributeCollectionVersion(),
         Entitlements = Entitlements.GetMultiValuedAttributeCollectionVersion(),
         Groups = Groups.GetMultiValuedAttributeCollectionVersion(),
         Ims = Ims.GetMultiValuedAttributeCollectionVersion(),
         PhoneNumbers = PhoneNumbers.GetMultiValuedAttributeCollectionVersion(),
         Photos = Photos.GetMultiValuedAttributeCollectionVersion(),
         Roles = Roles.GetMultiValuedAttributeCollectionVersion(),
         X509Certificates = X509Certificates.GetMultiValuedAttributeCollectionVersion()
     }.GetHashCode());
 }
Example #2
0
        public static TeamFoundationIdentity GetIdentity(string name)
        {
            TeamFoundationIdentity identity = null;

            if (Ims != null && Group != null)
            {
                identity = Ims.ReadIdentity(IdentitySearchFactor.DisplayName, name, MembershipQuery.None, ReadIdentityOptions.None);
            }

            return(identity);
        }
Example #3
0
 public Channel GetChannel(string p)
 {
     if (string.IsNullOrEmpty(p) || p == "#" || p == "@")
     {
         return(null);
     }
     if (p[0] == '@')
     {
         return(Ims.FirstOrDefault(c => c.Id == p || c.Name == p));
     }
     if (p[0] == '#')
     {
         p = p.Substring(1);
     }
     return(Channels.FirstOrDefault(c => c.Id == p || c.Name == p));
 }
Example #4
0
        internal static bool Synchronize()
        {
            log.Info("Uruchomiono program z opcją \"synchronize\"");
            if (!IisIntegration.CheckBeforeSynchronization)
            {
                return(false);
            }

            UpdatePermanentList();
            List <EntityIpDomain> compareList = Lists.Zip(GetListFromFile(permanentFileName), Ims.GetList());

            List <EntityIpDomain> iisList   = IisIntegration.GetIpSecurityPropertyArray(IisIntegration.METABASE, MethodName.Get, MethodArgument.IPSecurity, Member.IPGrant);
            List <EntityIpDomain> compToIms = Lists.GetDifference(compareList, iisList);
            List <EntityIpDomain> imsToComp = Lists.GetDifference(iisList, compareList);

            if ((compToIms.Count > 0) || (imsToComp.Count > 0))
            {
                IisIntegration.UpdateIpSecurityPropertyArray(IisIntegration.METABASE, MethodName.Get, MethodArgument.IPSecurity, Member.IPGrant, compareList);
                string ErrorDescription = string.Format("Dodane do IMS adresy: {0}. Usunięte w IMS adresy: {1}", Lists.ToString(compToIms), Lists.ToString(imsToComp));
                Console.WriteLine(ErrorDescription);
                log.Info(ErrorDescription);
            }
            log.Info("Zakończono synchronizację.");

            return(true);
        }
Example #5
0
        private static void UpdatePermanentList()
        {
            List <EntityIpDomain> permanentList = GetListFromFile(permanentFileName);
            List <EntityIpDomain> diffList      = Lists.RemoveNotUnique(permanentList, Ims.GetList());

            ExportToFile(permanentFileName, diffList, false);
        }