コード例 #1
0
ファイル: ZmqRepository.cs プロジェクト: Gtach/ruh
        private void AddToItemCache(IIdentifyable item)
        {
            var type = item.GetType();

            IDictionary <Guid, IIdentifyable> typeCache;

            if (!_itemCache.TryGetValue(type, out typeCache))
            {
                typeCache = new Dictionary <Guid, IIdentifyable>();
                _itemCache.Add(type, typeCache);
            }

            typeCache.Add(item.Id, item);
        }
コード例 #2
0
ファイル: ZmqRepository.cs プロジェクト: Gtach/ruh
 private static string GetFileName(IIdentifyable item)
 {
     return(GetFileName(item.GetType(), item.Id));
 }
コード例 #3
0
 public static string GetKey(IIdentifyable pIdentifyable)
 {
     return(LOCAL_STORAGE_PREFIX + pIdentifyable.GetType().Name + pIdentifyable.Identifier);
 }