Example #1
0
        /// <summary>
        /// 添加Pair
        /// </summary>
        /// <returns>添加的Pair</returns>
        public async Task <IPair> AddPairAsync()
        {
            Pair pair = await Task.Run(() => {
                APMCore.Model.Pair source = new APMCore.Model.Pair(-1)
                {
                    ContainerUID = ContainerUID
                };
                return(new Pair(source)
                {
                    DataBase = DataBase,
                    UpdateMethod = UpdateMethod.Insert
                });
            });

            await Task.Run(() => {
                lock (_pairsLocker) {
                    AddPairHelper(pair);
                }
            });

            return(pair);
        }
Example #2
0
 public Pair(APMCore.Model.Pair source) : base(source)
 {
 }