Пример #1
0
        /// <summary>
        /// Removes given instance from history
        /// </summary>
        /// <param name="instance">Instance</param>
        public override void ForgetInstance(Instance instance)
        {
            // Remove all instance profiles from history.
            for (var i = ConnectingProfileList.Count; i-- > 0;)
            {
                if (ConnectingProfileList[i].Instance.Equals(instance))
                {
                    ConnectingProfileList.RemoveAt(i);
                }
            }

            // Remove the instance from history.
            ConnectingInstanceList.Remove(instance);

            if (ConnectingInstance != null && ConnectingInstance.Equals(instance))
            {
                base.ForgetInstance(instance);

                // Reset authenticating instance.
                AuthenticatingInstance = ConnectingInstance;
            }
            else
            {
                base.ForgetInstance(instance);
            }
        }
Пример #2
0
        /// <summary>
        /// Removes given instance from history
        /// </summary>
        /// <param name="instance">Instance</param>
        public virtual void ForgetInstance(Instance instance)
        {
            // Remove the instance from history.
            ConnectingInstanceList.Remove(instance);

            // Reset connecting instance.
            if (ConnectingInstance != null && ConnectingInstance.Equals(instance))
            {
                ConnectingInstance = ConnectingInstanceList.FirstOrDefault();
            }
        }