/// <summary>
        /// Clone storage.
        /// </summary>
        /// <returns></returns>
        public IDataStore <T> Clone()
        {
            InMemoryDataStore <T> cloned = new InMemoryDataStore <T>();

            cacheLock.EnterReadLock();
            try
            {
                foreach (var entry in memoryStore)
                {
                    cloned.Insert(entry.Key, (T)FHSyncUtils.Clone(entry.Value));
                }
                return(cloned);
            }
            finally
            {
                cacheLock.ExitReadLock();
            }
        }
Beispiel #2
0
 /// <summary>
 /// Clone a data record.
 /// </summary>
 /// <returns></returns>
 public FHSyncDataRecord <T> Clone()
 {
     return((FHSyncDataRecord <T>)FHSyncUtils.Clone(this));
 }
Beispiel #3
0
 /// <summary>
 /// Contructor with a Data type.
 /// </summary>
 /// <param name="pData"></param>
 public FHSyncDataRecord(T pData)
 {
     Data = (T)FHSyncUtils.Clone(pData);
 }