Esempio n. 1
0
 /// <summary>
 /// 通过主键查找连接元素。
 /// </summary>
 /// <param name="key"></param>
 /// <returns></returns>
 public ConnectionElement FindConnection(IConnectionKey key)
 {
     //return this._connections.FirstOrDefault(el => el.From == key.From && el.To == key.To && el.Label == key.Label);
     return this.FindConnection(key.From, key.To, key.Label);
 }
Esempio n. 2
0
 bool IEquatable <IConnectionKey> .Equals(IConnectionKey other) => other == this || (other is INamedPipeKey otherClient &&
Esempio n. 3
0
        //private ModelingDesigner _designer;

        //public BlockRelationCollection(ModelingDesigner designer)
        //{
        //    _designer = designer;
        //}

        //public BlockRelation FindByKey(string from, string to, string label)
        //{
        //    return this.FirstOrDefault(r => r.FromBlock == from && r.ToBlock == to && r.Label == label);
        //}

        /// <summary>
        /// 通过连接键,查找指定的关系
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public BlockRelation FindByKey(IConnectionKey key)
        {
            return(this.FirstOrDefault(r => r.FromBlock == key.From && r.ToBlock == key.To && r.Label == key.Label));
        }
Esempio n. 4
0
 /// <summary>
 /// 通过主键查找连接元素。
 /// </summary>
 /// <param name="key"></param>
 /// <returns></returns>
 public ConnectionElement FindConnection(IConnectionKey key)
 {
     //return this._connections.FirstOrDefault(el => el.From == key.From && el.To == key.To && el.Label == key.Label);
     return(this.FindConnection(key.From, key.To, key.Label));
 }