Ejemplo n.º 1
0
 internal bool TryGetBagObject(AbcBagKey key, out object bagObject)
 {
     if (this.bag != null)
     {
         return(this.bag.TryGetValue(key, out bagObject));
     }
     else
     {
         bagObject = null;
         return(false);
     }
 }
Ejemplo n.º 2
0
        internal static AbcBagKey GetBagKey(string objectIdentifier)
        {
            AbcBagKey bagKey;

            if (!objectIdentifierToBagKey.TryGetValue(objectIdentifier, out bagKey))
            {
                bagKey = AbcBagKey.GetNextBagKey();
                objectIdentifierToBagKey[objectIdentifier] = bagKey;
            }

            return(bagKey);
        }
Ejemplo n.º 3
0
        internal void SetBagObject(AbcBagKey key, object value)
        {
            if (this.bag == null)
            {
                lock (this)
                {
                    if (this.bag == null)
                    {
                        this.bag = new Dictionary <AbcBagKey, object>();
                    }
                }
            }

            this.bag[key] = value;
        }