电子药箱通讯服务端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CacheInfo.cs 626B

1234567891011121314151617181920
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading;
  7. using System.Threading.Tasks;
  8. namespace RDH.Data
  9. {
  10. class CacheInfo
  11. {
  12. public Func<IDataReader, object> Deserializer { get; set; }
  13. public Func<IDataReader, object>[] OtherDeserializers { get; set; }
  14. public Action<IDbCommand, object> ParamReader { get; set; }
  15. private int hitCount;
  16. public int GetHitCount() { return Interlocked.CompareExchange(ref hitCount, 0, 0); }
  17. public void RecordHit() { Interlocked.Increment(ref hitCount); }
  18. }
  19. }