예제 #1
0
 public void CallCreateSnapshotOnIMediaPlayer([Frozen] IMediaPlayer mediaPlayer,
                                              Stream outStream, CreateSnapshot message, RequestService sut)
 {
     mediaPlayer.CreateSnapshot(Arg.Any <int>(), Arg.Any <int>(), Arg.Any <int>(), Arg.Any <string>()).Returns(true);
     sut.CanHandleMessage(mediaPlayer, message, outStream);
     mediaPlayer.Received(1).CreateSnapshot(message.NumberOfVideoOutput, message.Width, message.Height, message.FilePath);
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ForwardAnalysisBase" /> class.
 /// Create forward analysis object for given entry method graph.
 /// </summary>
 /// <param name="entryMethodGraph">Control flow graph of method which is entry point of analysis</param>
 /// <param name="createSnapshotDelegate">Method that creates a snapshot used during analysis</param>
 public ForwardAnalysisBase(Weverca.ControlFlowGraph.ControlFlowGraph entryMethodGraph, CreateSnapshot createSnapshotDelegate)
 {
     _createSnapshotDelegate = createSnapshotDelegate;
     WideningLimit           = int.MaxValue;
     SimplifyLimit           = int.MaxValue;
     EntryInput = createEmptySet();
     EntryInput.StartTransaction();
     EntryCFG = entryMethodGraph;
 }
예제 #3
0
        private void snapshot_btn_Click(object sender, RoutedEventArgs e)
        {
            SaveFileDialog SFD = new SaveFileDialog();

            SFD.AddExtension     = true;
            SFD.Filter           = "Panorama Screenshot|*.pss";
            SFD.InitialDirectory = Directory.GetCurrentDirectory() + "\\snapshots";
            SFD.OverwritePrompt  = true;
            SFD.FileName         = "Snapshot-" + DateTime.Today.Year + "-" +
                                   DateTime.Today.Month + "-" + DateTime.Today.Day;

            if (SFD.ShowDialog() == true)
            {
                if (File.Exists(SFD.FileName))
                {
                    File.Delete(SFD.FileName);
                }
                CreateSnapshot.RunWorkerAsync(SFD.FileName);
                StatusBarText.Content = "Generating snapshot " + SFD.SafeFileName;
                StatusBarWorker.RunWorkerAsync(CreateSnapshot);
                StatusBarPulse.RunWorkerAsync(CreateSnapshot);
            }
        }
예제 #4
0
 public void CallReturnResultResponseOnIResponseServiceForCreateSnapshot([Frozen] IResponseService responseService,
                                                                         IMediaPlayer mediaPlayer, Stream outStream, CreateSnapshot message, RequestService sut)
 {
     sut.CanHandleMessage(mediaPlayer, message, outStream);
     responseService.Received(1).ReturnResultResponse(outStream, message, Arg.Any <bool>());
 }