public bool Contains(object item) { if (m_oSystemUsers.Contains((TisSystemUser)item)) { return(true); } else { TisSystemUser oSystemUser = GetByIdentity( ((TisSystemUser)item).Name, ((TisSystemUser)item).AuthenticationType); return(oSystemUser != null); } }
public ITisSystemUser[] Add(string[] UsersName, AUTHENTICATION_TYPE enAuthType) { ArrayList oSystemUsers = new ArrayList(); TisSystemUser oSystemUser; foreach (string sUserName in UsersName) { oSystemUser = GetByIdentity(sUserName, enAuthType); if (OnSystemUserAdded != null && oSystemUser == null) { oSystemUser = new TisSystemUser(sUserName, enAuthType); SystemUserArgs oSystemUserArgs = new SystemUserArgs(oSystemUser); OnSystemUserAdded(oSystemUserArgs); if (oSystemUserArgs.IsValid) { m_oSystemUsers.Add(oSystemUser); } else { Log.WriteWarning("{0} : [{1}]", System.Reflection.MethodInfo.GetCurrentMethod(), String.Format("Attempt to add user [{0}] failed", oSystemUser.Name)); continue; } } oSystemUsers.Add(oSystemUser); } return((ITisSystemUser[])ArrayBuilder.CreateArray( oSystemUsers, typeof(ITisSystemUser), new ArrayElementFilter(AddSystemUsersFilter))); }
public bool Contains(TisSystemUser oSystemUser) { return(Contains(oSystemUser)); }