Beispiel #1
0
        /// <summary>
        /// 查找数据交换对象多个
        /// </summary>
        /// <param name="Match"></param>
        /// <returns></returns>
        public List <ISwap> FindSwaps(ISwapMatch Match)
        {
            List <ISwap> result = new List <ISwap>();

            foreach (ISwap swp in this.swaplist)
            {
                if (Match.IsSwap(swp))
                {
                    result.Add(swp);
                }
            }
            return(result);
        }
Beispiel #2
0
        /// <summary>
        /// 查找数据交换对象
        /// </summary>
        /// <param name="Match"></param>
        /// <returns></returns>
        public ISwap FindSwap(ISwapMatch Match)
        {
            ISwap result = null;

            foreach (ISwap swp in this.swaplist)
            {
                if (Match.IsSwap(swp))
                {
                    result = swp;
                    break;
                }
            }
            return(result);
        }
Beispiel #3
0
        /// <summary>
        /// 根据自定义交换匹配实例查找交换池中的对象实例
        /// </summary>
        public static object SwapFindObject(ISwapMatch Match)
        {
            object result = null;
            ISwap  swap   = LemonEnvironment.GetInstance().SwapPool.FindSwap(Match);

            if (swap != null)
            {
                if (swap.PackageObject != null)
                {
                    result = swap.PackageObject;
                }
            }
            return(result);
        }