示例#1
0
        public IStockManager[] GetStockManagers(string productFamily, IUniqueObject sender)
        {
            if (familiesMap.ContainsKey(productFamily))
            {
                return((from sm in familiesMap[productFamily]
                        where sm.Key != sender.GetUID()
                        select sm.Value).ToArray());
            }

            return(new IStockManager[0]);
        }
示例#2
0
        public PropagateToken AddHop(IUniqueObject uid)
        {
            if (HasHopedOnObject(uid))
            {
                return(this);
            }

            string[] newHops = new string[hops.Length + 1];
            Array.Copy(hops, newHops, hops.Length);
            newHops[hops.Length] = uid.GetUID();
            hops = newHops;
            return(this);
        }
示例#3
0
 public static IUniqueObject copyOf(IUniqueObject original)
 {
     return(new UniqueObject(original.GetUID()));
 }
示例#4
0
 public bool HasHopedOnObject(IUniqueObject uid)
 {
     return(hops.Contains(uid.GetUID()));
 }