internal bool TryGetBagObject(AbcBagKey key, out object bagObject) { if (this.bag != null) { return(this.bag.TryGetValue(key, out bagObject)); } else { bagObject = null; return(false); } }
internal static AbcBagKey GetBagKey(string objectIdentifier) { AbcBagKey bagKey; if (!objectIdentifierToBagKey.TryGetValue(objectIdentifier, out bagKey)) { bagKey = AbcBagKey.GetNextBagKey(); objectIdentifierToBagKey[objectIdentifier] = bagKey; } return(bagKey); }
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; }