Пример #1
0
 /// <summary>
 ///     Remove the <see cref="IGridion" /> item from active server list.
 /// </summary>
 /// <param name="gridion">
 ///     The <see cref="IGridion" /> instance to remove.
 /// </param>
 internal static void RemoveGridion(IGridion gridion)
 {
     lock (GridionList)
     {
         if (GridionList.TryGetByName(gridion.Name, out _))
         {
             GridionList.Remove(gridion.Name);
         }
     }
 }
Пример #2
0
            /// <summary>
            ///     Creates an array of <see cref="IGridion" />s located in the collection.
            /// </summary>
            /// <returns>
            ///     an array of <see cref="IGridion" />s.
            /// </returns>
            internal IGridion[] ToArray()
            {
                var list = new IGridion[this.Count];

                var i = 0;

                foreach (var pair in this.Values)
                {
                    list[i++] = pair;
                }

                return(list);
            }