/// <summary>
 /// Add an update reveiver.
 /// </summary>
 /// <param name="receiver">The object to add. The Update method will be called until the object is removed. </param>
 public void AddUpdateReceiver(IUpdateReceiver receiver)
 {
     if (receiver == null)
     {
         return;
     }
     m_UpdateReceivers.Add(receiver);
 }
        private void OnObjectAdded(object obj)
        {
            IUpdateReceiver updateReceiver = obj as IUpdateReceiver;

            if (updateReceiver != null)
            {
                m_UpdateReceivers.Add(updateReceiver);
            }
        }
Пример #3
0
        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)));
        }
Пример #4
0
 public void AddPermission(string sPermission)
 {
     m_oPermissions.Add(sPermission);
 }
Пример #5
0
 /// <summary>
 /// Adds <paramref name="historyEntry"/> to <see cref="_connections"/>.
 /// </summary>
 /// <param name="historyEntry">Connection that we're adding to the history.</param>
 protected void AddToHistory(HistoricalConnection historyEntry)
 {
     _connections.Add(historyEntry);
 }