google-code-export / dataobjectsdotnet

Automatically exported from code.google.com/p/dataobjectsdotnet
0 stars 0 forks source link

CachingKeyGenerator.CacheSize must be protected, not private #779

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Subj. This would allow users to specify it for a particular key generator.

See http://forum.x-tensive.com/viewtopic.php?f=29&t=6085

Original issue reported on code.google.com by alex.yakunin on 17 Aug 2010 at 5:03

GoogleCodeExporter commented 9 years ago
Done. It's protected now. And it's pretty easy to declare a generator with 
non-default increment:

  [Service(typeof(KeyGenerator), Name="Author")]
  [Service(typeof(KeyGenerator), Name="Book")]
  public class CustomInt32KeyGenerator : CachingKeyGenerator<int>
  {
    [ServiceConstructor]
    public CustomInt32KeyGenerator(DomainConfiguration configuration)
      : base(configuration)
    {
      CacheSize = 4; // Non-default increment
    }
  }

Original comment by alex.yakunin on 26 Aug 2010 at 9:32

GoogleCodeExporter commented 9 years ago

Original comment by alex.yakunin on 26 Aug 2010 at 9:35