Ejemplo n.º 1
0
        public bool AddData(IDTO <DE> dtoObject)
        {
            if (dtoCollection.ContainsKey(dtoObject.GetHashCode()))
            {
                return(false);
            }

            lock (dtoCollection.SyncRoot)
            {
                dtoCollection.Add(dtoObject.GetHashCode(), dtoObject);
                key = dtoObject.GetHashCode();
            }

            return(true);
        }