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); }
/// <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; }
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); } }
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>()); }