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()); }
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); }
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)); }
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); }
private static void UpdatePermanentList() { List <EntityIpDomain> permanentList = GetListFromFile(permanentFileName); List <EntityIpDomain> diffList = Lists.RemoveNotUnique(permanentList, Ims.GetList()); ExportToFile(permanentFileName, diffList, false); }