Beispiel #1
0
        /// <summary>
        /// Add item to queue. It is possible to create a named queue.
        /// Preferred method for adding items.
        /// </summary>
        /// <param name="queue_name"></param>
        /// <param name="item"></param>
        /// <returns></returns>
        public bool Add(string queue_name, InputItem item)
        {
            if (queue_name == null)
            {
                queue_name = item.GetType().Name;
            }
            InputItemQueue iiq = Session.GetInputItemQueue(queue_name);

            return(InputItem.Add2Queue(iiq, current_item, item));
        }
Beispiel #2
0
        /// <summary>
        /// Add item to queue. It is possible to create a named queue.
        /// It is the same like BotCycle.Add() but not so efficient.
        /// </summary>
        /// <param name="queue_name"></param>
        /// <param name="item"></param>
        static public bool Add(string queue_name, InputItem item)
        {
            if (queue_name == null)
            {
                queue_name = item.GetType().Name;
            }
            InputItemQueue iiq = Session.GetInputItemQueue(queue_name);

            return(InputItem.Add2Queue(iiq, BotCycle.GetCurrentInputItemForThisThread(), item));
        }
Beispiel #3
0
        /// <summary>
        /// Add item as dynamic object to queue. It is possible to create a named queue.
        /// Preferred method for adding items.
        /// </summary>
        /// <typeparam name="ItemT"></typeparam>
        /// <param name="queue_name"></param>
        /// <param name="anonymous_object"></param>
        /// <returns></returns>
        public bool Add <ItemT>(string queue_name, object anonymous_object) where ItemT : InputItem
        {
            InputItemQueue iiq = Session.GetInputItemQueue(queue_name);

            return(InputItem.Add2Queue <ItemT>(iiq, current_item, anonymous_object));
        }
Beispiel #4
0
        /// <summary>
        /// Add item as dynamic object to queue. It is possible to create a named queue.
        /// It is the same like BotCycle.Add() but not so efficient and safe.
        /// </summary>
        /// <typeparam name="ItemT"></typeparam>
        /// <param name="queue_name"></param>
        /// <param name="anonymous_object"></param>
        /// <returns></returns>
        static public bool Add <ItemT>(string queue_name, object anonymous_object) where ItemT : InputItem
        {
            InputItemQueue iiq = Session.GetInputItemQueue(queue_name);

            return(InputItem.Add2Queue <ItemT>(iiq, BotCycle.GetCurrentInputItemForThisThread(), anonymous_object));
        }
 /// <summary>
 /// Add item as dynamic object to queue. By default name of queue is name of item type.
 /// It is the same as BotCycle.Add() but not so efficient and safe.
 /// </summary>
 /// <typeparam name="ItemT"></typeparam>
 /// <param name="anonymous_object"></param>
 /// <returns></returns>
 public bool Add <ItemT>(object anonymous_object) where ItemT : InputItem
 {
     return(InputItem.Add2Queue <ItemT>(this, BotCycle.GetCurrentInputItemForThisThread(), anonymous_object));
 }
 /// <summary>
 /// Add item as dynamic object to queue. It is possible to create a named queue.
 /// It is the same like BotCycle.Add() but not so efficient and safe.
 /// </summary>
 /// <param name="queue_name"></param>
 /// <param name="item"></param>
 public bool Add(InputItem item)
 {
     return(InputItem.Add2Queue(this, BotCycle.GetCurrentInputItemForThisThread(), item));
 }