public static IssueReporterManager GetInstance() { if (_defaultInstance == null) { lock (_lockObject) { if (_defaultInstance == null) { _defaultInstance = new IssueReporterManager(); } } } return(_defaultInstance); }
public static IssueReporterManager GetInstance() { if (_defaultInstance == null) { lock (_lockObject) { if (_defaultInstance == null) { IssueReporterManager newInstance = new IssueReporterManager(); newInstance.RestorePersistedConfigurations(); _defaultInstance = newInstance; } } } return(_defaultInstance); }
public static IssueReporterManager GetInstance() { if (_defaultInstance == null) { lock (_lockObject) { #pragma warning disable CA1508 // Analyzer doesn't understand threading if (_defaultInstance == null) { IssueReporterManager newInstance = new IssueReporterManager(); newInstance.RestorePersistedConfigurations(); _defaultInstance = newInstance; } #pragma warning restore CA1508 // Analyzer doesn't understand threading } } return(_defaultInstance); }
public static IIssueResult FileIssueAsync(IssueInformation issueInformation) { if (TestControlledFileIssueAsync != null) { return(TestControlledFileIssueAsync(issueInformation)); } if (IsEnabled && IsConnected) { // Coding to the agreement that FileIssueAsync will return a kicked off task. // This will block the main thread. // It does seem like we currently block the main thread when we show the win form for azure devops // so keeping it as is till we have a discussion. Check for blocking behavior at that link. // https://github.com/Microsoft/accessibility-insights-windows/blob/master/src/AccessibilityInsights.SharedUx/Controls/HierarchyControl.xaml.cs#L858 IIssueResult result = IssueReporting.FileIssueAsync(issueInformation).Result; IssueReporterManager.GetInstance().UpdateIssueReporterSettings(IssueReporting); return(result); } return(null); }
public static Dictionary <Guid, IIssueReporting> GetIssueReporters() { return(IssueReporterManager.GetInstance().IssueFilingOptionsDict); }