internal static void RegisterType <K, S>(short streamId) { if (Enum.IsDefined(typeof(KnownDbType), streamId)) { throw new ArgumentException("streamId"); } var reader = GetReadMethodFrom <K, S>(); var writer = GetWriteMethodFrom <K, S>(); DbTypes.Register <K>(streamId); var readerMethod = reader; var writerMethod = writer; lock (_readerMethods) _readerMethods.Add(typeof(K), readerMethod); lock (_writerMethods) _writerMethods.Add(typeof(K), writerMethod); }
public DbType(short id) : this(id, DbTypes.GetType(id)) { }