コード例 #1
0
ファイル: YEventRouter.cs プロジェクト: sm6uax/plegma
        //--------------------------------------------------------------------------------------------------------------------------------------
        #endregion


        #region Constructor
        //--------------------------------------------------------------------------------------------------------------------------------------
        public YEventRouter()
        {
            _ActiveRoutes = new DictionaryTS <Type, SortedSetTS <EvHandler> >();

            EventQueue = new RequestQueueConsumer <EventDescriptor>(EventDequeue);
            EventQueue.Start();
        }
コード例 #2
0
        //--------------------------------------------------------------------------------------------------------------------
        public static DictionaryTS <TKey, TValue> ToDictionaryTS <TKey, TValue>(this IEnumerable <KeyValuePair <TKey, TValue> > source, DictionaryTS <TKey, TValue> inPlace = null)
        {
            var ret = inPlace ?? new DictionaryTS <TKey, TValue>();

            if (source != null)
            {
                ret.AddFromSource(source.WhereNotNull());
            }
            return(ret);
        }