Exemplo n.º 1
0
 public void Play(IMessageReceiver receiver, PlaybackOptions options)
 {
     //      this.dyoW602sJA = receiver;
     //      this.NC2WHwLVfD = options != null ? new twdoksMNpxZIumpxuq(options) : new twdoksMNpxZIumpxuq(new PlaybackOptions());
     //      if (Environment.Is64BitProcess)
     //      {
     //        this.xJaWIK04pm = 0;
     //        q5MvANBnPa6CFYed7NI.Vh1gSi0InU(this.path, (string) null, 0U, 0U, new DVPVC6BSxkKNJHTPTfU(this.pRAW3TVs6Y));
     //      }
     //      else
     //      {
     //        this.xJaWIK04pm = 0;
     //        nmD5uEBtLJoqZgMkfld.hvoPYknI3d(this.path, (string) null, 0U, 0U, new TEOWwGRGb1uR7wafRG(this.ak2WwU46ee));
     //      }
 }
Exemplo n.º 2
0
		public void Play(IMessageReceiver receiver, PlaybackOptions options)
		{
			//      this.dyoW602sJA = receiver;
			//      this.NC2WHwLVfD = options != null ? new twdoksMNpxZIumpxuq(options) : new twdoksMNpxZIumpxuq(new PlaybackOptions());
			//      if (Environment.Is64BitProcess)
			//      {
			//        this.xJaWIK04pm = 0;
			//        q5MvANBnPa6CFYed7NI.Vh1gSi0InU(this.path, (string) null, 0U, 0U, new DVPVC6BSxkKNJHTPTfU(this.pRAW3TVs6Y));
			//      }
			//      else
			//      {
			//        this.xJaWIK04pm = 0;
			//        nmD5uEBtLJoqZgMkfld.hvoPYknI3d(this.path, (string) null, 0U, 0U, new TEOWwGRGb1uR7wafRG(this.ak2WwU46ee));
			//      }
		}
Exemplo n.º 3
0
    private void worker_DoWork(object sender, DoWorkEventArgs e)
    {
      foreach (TaskInfo taskInfo in this.tasks)
      {
        TapeFile tapeFile = new TapeFile(taskInfo.File.FullName);
        this.currentTask = taskInfo;
        this.currentTape = tapeFile;
        PlaybackOptions playbackOptions = new PlaybackOptions();
				playbackOptions.Symbols = new List<string>((IEnumerable<string>) this.instruments.Keys).ToArray();
				playbackOptions.Trades = this.settings.Trades;
				playbackOptions.Quotes = this.settings.Quotes;
				playbackOptions.BeginTime = this.settings.From;
				playbackOptions.EndTime = this.settings.To;
        this.OnCurrentTaskBegin();
        if (this.worker.CancellationPending)
        {
          e.Cancel = true;
          this.OnCurrentTaskDone((Exception) null);
        }
        else
        {
          Exception error = (Exception) null;
          try
          {
            this.currentSkipped = false;
            this.currentWriter = !this.settings.Advanced.WriteDataAsync ? (DataWriter) new SyncDataWriter() : (DataWriter) new AsyncDataWriter(this.settings.Advanced.MaxBufferSize);
            this.currentWriter.BeginWrite();
            tapeFile.Play((IMessageReceiver) this, playbackOptions);
          }
          catch (Exception ex)
          {
            error = ex;
          }
          finally
          {
            try
            {
              this.currentWriter.EndWrite();
            }
            catch (Exception ex)
            {
              error = ex;
            }
            this.OnCurrentTaskDone(error);
          }
        }
      }
    }