示例#1
0
 internal AbstractStatistics(IAbstractBuilder abstractBuilder)
 {
     this.ProcessIdentifier      = abstractBuilder.GetPeppolProcessTypeId();
     this.DocumentTypeIdentifier = abstractBuilder.GetPeppolDocumentTypeId();
     this.AccessPointIdentifier  = abstractBuilder.GetAccessPointIdentifier();
     this.Date      = abstractBuilder.GetDate();
     this.Direction = abstractBuilder.GetDirection();
     this.ChannelId = abstractBuilder.GetChannelId();
 }
 protected virtual void SetObjectPoolConfigBuilder <B>(IAbstractBuilder <WorkerThread, B> builder)
     where B : IAbstractBuilder <WorkerThread, B>
 {
     builder.SetMaxSize(Config.MaxSize)
     .SetMinSize(Config.MinSize)
     .SetObjectFactory(() => new WorkerThread(t => ObjectPool.Release(t.PoolEntry)))
     .SetOnCreate(e =>
     {
         e.Object.PoolEntry = e;
         e.Object.Start();
     })
     .SetOnClose(e => e.Object.InnerThread.Interrupt());
 }