예제 #1
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public override void Dispose()
 {
     if (DataSource != null)
     {
         DataSource.Dispose(); this.Data.Clear(); DataSource = null;
     }
 }
예제 #2
0
 /// <summary>
 /// 默认构造函数
 /// </summary>
 /// <param name="Stream"></param>
 /// <param name="bufferSize"></param>
 public BufferedStreamService(IEnumer <TMaterial> Stream, int bufferSize = 50)
 {
     this.Name            = Stream.Name;
     this.DataSource      = Stream;
     this.MaterialBuffers = new WindowData <TMaterial>(bufferSize);
     log.Info("数据流缓存大小:" + bufferSize);
 }
예제 #3
0
 /// <summary>
 /// 默认构造函数
 /// </summary>
 /// <param name="Stream"></param>
 public ReversedEnumber(IEnumer <TMaterial> Stream)
 {
     this.DataSource = Stream;
     this.Name       = "Reversed_" + Stream.Name;
     Init();
 }