internal static object Run() { SimpleEventQueue eventQueue = new SimpleEventQueue(); ExportComponent exportComponent = ExportComponent.CreateWithInProcessStores(eventQueue); TelemetryConfiguration.Active.InstrumentationKey = "instrumentation-key"; var exporter = new ApplicationInsightsExporter(exportComponent, Stats.ViewManager, TelemetryConfiguration.Active); exporter.Start(); var tagContextBuilder = Tagger.CurrentBuilder.Put(FrontendKey, TagValue.Create("mobile-ios9.3.5")); var spanBuilder = Tracer .SpanBuilder("incoming request") .SetRecordEvents(true) .SetSampler(Samplers.AlwaysSample); Stats.ViewManager.RegisterView(VideoSizeView); using (tagContextBuilder.BuildScoped()) { using (Tracer.WithSpan(spanBuilder.StartSpan())) { Tracer.CurrentSpan.AddEvent("Start processing video."); Thread.Sleep(TimeSpan.FromMilliseconds(10)); StatsRecorder.NewMeasureMap().Put(VideoSize, 25 * MiB).Record(); Tracer.CurrentSpan.AddEvent("Finished processing video."); } } Thread.Sleep(TimeSpan.FromMilliseconds(5100)); var viewData = Stats.ViewManager.GetView(VideoSizeViewName); Console.WriteLine(viewData); Console.WriteLine("Done... wait for events to arrive to backend!"); Console.ReadLine(); exportComponent.SpanExporter.Dispose(); return(null); }
public ExportComponentPanel(ExportComponent component) : base(component) { InitializeComponent(); _component = component; base.CancelButton = _cancelButton; base.AcceptButton = _okButton; _patientId.DataBindings.Add("Value", _component, "PatientId", true, DataSourceUpdateMode.OnPropertyChanged); _patientsName.DataBindings.Add("Value", _component, "PatientsName", true, DataSourceUpdateMode.OnPropertyChanged); _dateOfBirth.DataBindings.Add("Value", _component, "PatientsDateOfBirth", true, DataSourceUpdateMode.OnPropertyChanged); _studyId.DataBindings.Add("Value", _component, "StudyId", true, DataSourceUpdateMode.OnPropertyChanged); _studyDescription.DataBindings.Add("Value", _component, "StudyDescription", true, DataSourceUpdateMode.OnPropertyChanged); _accessionNumber.DataBindings.Add("Value", _component, "AccessionNumber", true, DataSourceUpdateMode.OnPropertyChanged); _studyDate.DataBindings.Add("Value", _component, "StudyDate", true, DataSourceUpdateMode.OnPropertyChanged); _outputPath.DataBindings.Add("Text", _component, "OutputPath", true, DataSourceUpdateMode.OnPropertyChanged); base.ErrorProvider.SetIconAlignment(_outputPath, ErrorIconAlignment.MiddleLeft); }
private bool Initialize() { _synchronizationContext = SynchronizationContext.Current; _exportedInstances = new AuditedInstances(); _canceled = false; _overwrite = false; if (Anonymize) { ExportComponent component = new ExportComponent(); component.OutputPath = OutputPath; if (DialogBoxAction.Ok != DesktopWindow.ShowDialogBox(component, SR.Export)) return false; OutputPath = component.OutputPath; StudyData studyData = new StudyData { PatientId = component.PatientId, PatientsNameRaw = component.PatientsName, PatientsBirthDate = component.PatientsDateOfBirth, StudyId = component.StudyId, StudyDescription = component.StudyDescription, AccessionNumber = component.AccessionNumber, StudyDate = component.StudyDate }; _anonymizer = new DicomAnonymizer(); _anonymizer.ValidationOptions = ValidationOptions.RelaxAllChecks; _anonymizer.StudyDataPrototype = studyData; } else { SelectFolderDialogCreationArgs args = new SelectFolderDialogCreationArgs(); args.Prompt = SR.MessageSelectOutputLocation; args.Path = OutputPath; FileDialogResult result = DesktopWindow.ShowSelectFolderDialogBox(args); if (result.Action != DialogBoxAction.Ok) return false; OutputPath = result.FileName; } return true; }
public void SetComponent(IApplicationComponent component) { _component = (ExportComponent) component; }
public void SetComponent(IApplicationComponent component) { _component = (ExportComponent)component; }