public static ITaggerEventSource OnDiagnosticsChanged( ITextBuffer subjectBuffer, IDiagnosticService service, TaggerDelay delay) { return new DiagnosticsChangedEventSource(subjectBuffer, service, delay); }
private MiscellaneousDiagnosticListTable( SVsServiceProvider serviceProvider, Workspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) : base(serviceProvider, workspace, diagnosticService, provider) { _source = new LiveTableDataSource(serviceProvider, workspace, diagnosticService, IdentifierString); AddInitialTableSource(workspace.CurrentSolution, _source); }
public HomeController(IDiagnosisService diagnosesService, ISymptomeService symptomService, IDiagnosticService diagnosticService) { _diagnosesService = diagnosesService; _symptomeService = symptomService; _diagnosticService = diagnosticService; }
public VisualStudioDiagnosticListTable( SVsServiceProvider serviceProvider, VisualStudioWorkspace workspace, IDiagnosticService diagnosticService, ExternalErrorDiagnosticUpdateSource errorSource, ITableManagerProvider provider) : this(serviceProvider, (Workspace)workspace, diagnosticService, errorSource, provider) { ConnectWorkspaceEvents(); _errorList = serviceProvider.GetService(typeof(SVsErrorList)) as IErrorList; if (_errorList == null) { AddInitialTableSource(workspace.CurrentSolution, _liveTableSource); return; } _errorList.PropertyChanged += OnErrorListPropertyChanged; AddInitialTableSource(workspace.CurrentSolution, GetCurrentDataSource()); SuppressionStateColumnDefinition.SetDefaultFilter(_errorList.TableControl); if (ErrorListHasFullSolutionAnalysisButton()) { SetupErrorListFullSolutionAnalysis(workspace); } }
public VisualStudioErrorTaskList( SVsServiceProvider serviceProvider, VisualStudioWorkspace workspace, IForegroundNotificationService notificationService, IDiagnosticService diagnosticService, [ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners) : base(serviceProvider, workspace, notificationService, diagnosticService, asyncListeners) { }
public VisualStudioDiagnosticListTable( SVsServiceProvider serviceProvider, VisualStudioWorkspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) : base(serviceProvider, workspace, diagnosticService, Identifier, provider) { ConnectWorkspaceEvents(); // create initial project rank map this.Source.OnProjectDependencyChanged(workspace.CurrentSolution); }
private VisualStudioDiagnosticListTable( SVsServiceProvider serviceProvider, Workspace workspace, IDiagnosticService diagnosticService, ExternalErrorDiagnosticUpdateSource errorSource, ITableManagerProvider provider) : base(serviceProvider, workspace, diagnosticService, provider) { _liveTableSource = new LiveTableDataSource(serviceProvider, workspace, diagnosticService, IdentifierString); _buildTableSource = new BuildTableDataSource(workspace, errorSource); }
public IEnumerable <string> EnumerateFiles() { IDiagnosticService target = fileSearchService as IDiagnosticService; if (target == null) { return(Enumerable.Empty <string>()); } return(target.EnumerateFiles()); }
public DashboardViewModel( Func<IAnonymousSession> getAnonymousSession, Func<TwitterCredentials,IUserSession> getUserSession, IDiagnosticService diagnostics, CoreDispatcher dispatcher) { _getAnonymousSession = getAnonymousSession; _getUserSession = getUserSession; _diagnostics = diagnostics; _dispatcher = dispatcher; }
public RazorInProcLanguageClient( LanguageServerProtocol languageServerProtocol, VisualStudioWorkspace workspace, IDiagnosticService diagnosticService, IAsynchronousOperationListenerProvider listenerProvider, ILspSolutionProvider solutionProvider, DefaultCapabilitiesProvider defaultCapabilitiesProvider) : base(languageServerProtocol, workspace, diagnosticService, listenerProvider, solutionProvider, ClientName) { _defaultCapabilitiesProvider = defaultCapabilitiesProvider; }
public CourierController(IDiagnosticService diagnosticService, ICourierService courierService, IUserService userService, IContactService contactService, IFranchiseeConfigurationService franchiseeConfigurationService, IEmailHandler emailHandler, IWebApiConsumeUserService webApiConsumeUserService) : base(diagnosticService, null) { _diagnosticService = diagnosticService; _courierService = courierService; _userService = userService; _contactService = contactService; _franchiseeConfigurationService = franchiseeConfigurationService; _emailHandler = emailHandler; _webApiConsumeUserService = webApiConsumeUserService; }
protected override bool AuthorizeCore(HttpContextBase httpContext) { var user = httpContext.User as IQuickspatchPrincipal; if (user == null) { return(false); } _diagnosticService = DependencyResolver.Current.GetService <IDiagnosticService>(); _diagnosticService.Info("Begin AuthorizeCore"); if (DocumentTypeKey == DocumentTypeKey.None) { return(true); } //return true; var objectAuthorization = DependencyResolver.Current.GetService <IOperationAuthorization>(); List <UserRoleFunction> userRoleFunctions; var exception = new UnAuthorizedAccessException("UnAuthorizedAccessText") { QuickspatchUserName = user.User != null ? user.User.UserName : null }; //Check this franchisee can use some module from license key if (ConstantValue.DeploymentMode == DeploymentMode.Franchisee) { if (!string.IsNullOrEmpty(user.User.UserRole.AppRoleName) && user.User.UserRole.AppRoleName.Equals("GlobalAdmin", StringComparison.InvariantCultureIgnoreCase)) { return(true); } if (MenuExtractData.Instance.ModuleForFranchisee != null && MenuExtractData.Instance.ModuleForFranchisee.ListModuleDocumentTypeOperations.Count > 0) { // Check this document type key have permision in this module for franchisee var hasPermissionForModule = MenuExtractData.Instance.ModuleForFranchisee.ListModuleDocumentTypeOperations.Any( o => o.DocumentTypeId == (int)DocumentTypeKey && o.OperationId == (int)OperationAction); if (!hasPermissionForModule) { throw exception; } } } var permission = objectAuthorization.VerifyAccess(DocumentTypeKey, OperationAction, out userRoleFunctions); httpContext.Items["UserRoleFunctions"] = userRoleFunctions; if (!permission) { throw exception; } //_diagnosticService.Info("AuthorizeCore Completed."); return(true); }
internal VisualStudioDiagnosticListTable( Workspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider ) : base(workspace, provider) { AddInitialTableSource( workspace.CurrentSolution, new LiveTableDataSource(workspace, diagnosticService, IdentifierString) ); }
public SQLiteMessageQueueingService(DirectoryInfo baseDirectory, ISecurityTokenService securityTokenService = null, IDiagnosticService diagnosticService = null) : this(new SQLiteMessageQueueingOptions { DiagnosticService = diagnosticService, BaseDirectory = baseDirectory, SecurityTokenService = securityTokenService }) { }
public TroubleshootViewModel(ILogService logProvider, IDiagnosticService searchDiagnostics, FileLogBatchFactory executorFactory) { Ensure.NotNull(logProvider, "logProvider"); this.logProvider = logProvider; Logs = new ObservableCollection <LogModel>(logProvider.GetFileNames()); OpenLog = new OpenLogCommand(logProvider); OpenIsolatedFolder = new OpenIsolatedFolderCommand(); OpenLastSearchFiles = new OpenLastSearchFilesCommand(searchDiagnostics); FlushLogMessages = new DelegateCommand(executorFactory.Flush); }
public MiscellaneousDiagnosticListTable( Workspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider ) : base(workspace, provider) { _source = new LiveTableDataSource(workspace, diagnosticService, IdentifierString); AddInitialTableSource(workspace.CurrentSolution, _source); ConnectWorkspaceEvents(); }
public DiagnosticsSuggestionTaggerProvider( IEditorFormatMapService editorFormatMapService, IDiagnosticService diagnosticService, IForegroundNotificationService notificationService, [ImportMany] IEnumerable <Lazy <IAsynchronousOperationListener, FeatureMetadata> > listeners) : base(diagnosticService, notificationService, listeners) { _editorFormatMap = editorFormatMapService.GetEditorFormatMap("text"); _editorFormatMap.FormatMappingChanged += OnFormatMappingChanged; _suggestionTag = new SuggestionTag(_editorFormatMap); }
/// <summary> /// Initializes a new <see cref="JwtSecurityTokenService"/> with the specified options /// </summary> public JwtSecurityTokenService(JwtSecurityTokenServiceOptions options) { var myOptions = options ?? new JwtSecurityTokenServiceOptions(); _diagnosticService = myOptions.DiagnosticService ?? DiagnosticService.DefaultInstance; _signingKey = myOptions.SigningKey; _fallbackSigningKey = myOptions.FallbackSigningKey; _defaultTtl = myOptions.DefaultTTL <= TimeSpan.Zero ? TimeSpan.FromDays(3) : myOptions.DefaultTTL; }
public XamlInProcLanguageClientDisableUX( XamlRequestDispatcherFactory xamlDispatcherFactory, IGlobalOptionService globalOptions, IDiagnosticService diagnosticService, IAsynchronousOperationListenerProvider listenerProvider, LspWorkspaceRegistrationService lspWorkspaceRegistrationService, ILspLoggerFactory lspLoggerFactory, IThreadingContext threadingContext) : base(xamlDispatcherFactory, globalOptions, diagnosticService, listenerProvider, lspWorkspaceRegistrationService, lspLoggerFactory, threadingContext, diagnosticsClientName: null) { }
public DocumentPullDiagnosticHandlerFactory( IDiagnosticService diagnosticService, IDiagnosticAnalyzerService analyzerService, EditAndContinueDiagnosticUpdateSource editAndContinueDiagnosticUpdateSource, IGlobalOptionService globalOptions) { _diagnosticService = diagnosticService; _analyzerService = analyzerService; _editAndContinueDiagnosticUpdateSource = editAndContinueDiagnosticUpdateSource; _globalOptions = globalOptions; }
public LiveShareInProcLanguageClient( CSharpVisualBasicRequestDispatcherFactory csharpVBRequestDispatcherFactory, VisualStudioWorkspace workspace, IDiagnosticService diagnosticService, IAsynchronousOperationListenerProvider listenerProvider, ILspWorkspaceRegistrationService lspWorkspaceRegistrationService, DefaultCapabilitiesProvider defaultCapabilitiesProvider) : base(csharpVBRequestDispatcherFactory, workspace, diagnosticService, listenerProvider, lspWorkspaceRegistrationService, diagnosticsClientName: null) { _defaultCapabilitiesProvider = defaultCapabilitiesProvider; }
public XamlInProcLanguageClient( XamlRequestDispatcherFactory xamlDispatcherFactory, VisualStudioWorkspace workspace, IDiagnosticService diagnosticService, IAsynchronousOperationListenerProvider listenerProvider, ILspWorkspaceRegistrationService lspWorkspaceRegistrationService, [Import(typeof(SAsyncServiceProvider))] VSShell.IAsyncServiceProvider asyncServiceProvider, IThreadingContext threadingContext) : base(xamlDispatcherFactory, workspace, diagnosticService, listenerProvider, lspWorkspaceRegistrationService, asyncServiceProvider, threadingContext, diagnosticsClientName: null) { }
private void PopulateInitialData(Workspace workspace, IDiagnosticService diagnosticService) { foreach (var bucket in diagnosticService.GetDiagnosticBuckets(workspace, projectId: null, documentId: null, cancellationToken: CancellationToken.None)) { // We only need to issue an event to VS that these docs have diagnostics associated with them. So // we create a dummy notification for this. It doesn't matter that it is 'DiagnosticsRemoved' as // this doesn't actually change any data. All that will happen now is that VS will call back into // us for these IDs and we'll fetch the diagnostics at that point. OnDataAddedOrChanged(DiagnosticsUpdatedArgs.DiagnosticsRemoved( bucket.Id, bucket.Workspace, solution: null, bucket.ProjectId, bucket.DocumentId)); } }
public TableDataSource(IServiceProvider serviceProvider, Workspace workspace, IDiagnosticService diagnosticService, Guid identifier) { _workspace = workspace; _serviceProvider = serviceProvider; _identifier = identifier; _projectRanks = ImmutableDictionary <ProjectId, int> .Empty; _tracker = new OpenDocumentTracker(_workspace); _diagnosticService = diagnosticService; _diagnosticService.DiagnosticsUpdated += OnDiagnosticsUpdated; }
/// <summary> /// Initializes a new <see cref="MongoDBMessageQueueingService"/> /// </summary> /// <param name="options">Options governing the behavior of the service</param> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="options"/> is <c>null</c> /// </exception> public MongoDBMessageQueueingService(MongoDBMessageQueueingOptions options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } _diagnosticService = options.DiagnosticService ?? DiagnosticService.DefaultInstance; _database = options.Database; _collectionNameFactory = options.CollectionNameFactory ?? (_ => DefaultCollectionName); _securityTokenService = options.SecurityTokenService ?? new JwtSecurityTokenService(); _messageEncryptionService = options.MessageEncryptionService; }
public DiagnosticsClassificationTaggerProvider( IDiagnosticService diagnosticService, ClassificationTypeMap typeMap, IForegroundNotificationService notificationService, IEditorOptionsFactoryService editorOptionsFactoryService, [ImportMany] IEnumerable <Lazy <IAsynchronousOperationListener, FeatureMetadata> > listeners) : base(diagnosticService, notificationService, new AggregateAsynchronousOperationListener(listeners, FeatureAttribute.Classification)) { _typeMap = typeMap; _classificationTag = new ClassificationTag(_typeMap.GetClassificationType(ClassificationTypeDefinitions.UnnecessaryCode)); _editorOptionsFactoryService = editorOptionsFactoryService; }
public CommandHandlersFactory(IOutboundEventBus outboundEventBus, IDiagnosticService diagnosticService, WindowsManagingService windowsManagingService) { _mappings = new Hashtable { //Add here all command factories { nameof(PingCommand), new PingCommandHandler(outboundEventBus) }, { nameof(SendDiagnosticDataCommand), new SendDiagnosticDataCommandHandler(outboundEventBus, diagnosticService) }, { nameof(OpenWindowCommand), new OpenWindowCommandHandler(outboundEventBus, windowsManagingService) }, { nameof(CloseWindowCommand), new CloseWindowCommandHandler(outboundEventBus, windowsManagingService) } }; }
public RemoteDiagnosticListTable( SVsServiceProvider serviceProvider, RemoteLanguageServiceWorkspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider ) : base(workspace, provider) { _source = new LiveTableDataSource(workspace, diagnosticService, IdentifierString); AddInitialTableSource(workspace.CurrentSolution, _source); ConnectWorkspaceEvents(); }
public LiveTableDataSource(Workspace workspace, IDiagnosticService diagnosticService, string identifier) : base(workspace) { _workspace = workspace; _identifier = identifier; _tracker = new OpenDocumentTracker <DiagnosticTableItem>(_workspace); _diagnosticService = diagnosticService; ConnectToDiagnosticService(workspace, diagnosticService); }
private void ConnectToDiagnosticService(Workspace workspace, IDiagnosticService diagnosticService) { if (diagnosticService == null) { // it can be null in unit test return; } _diagnosticService.DiagnosticsUpdated += OnDiagnosticsUpdated; PopulateInitialData(workspace, diagnosticService); }
/// <summary> /// Initializes a new <see cref="SQLSubscriptionTrackingService"/> with the specified connection /// string settings and dialect /// </summary> /// <param name="connectionStringSettings">The connection string settings to use to connect to /// the SQL database</param> /// <param name="commandBuilders">(Optional) A collection of factories capable of /// generating database commands for manipulating subscriptions that conform to the SQL /// syntax required by the underlying connection provider (if needed)</param> /// <param name="diagnosticService">(Optional) The service through which diagnostic events /// are reported and processed</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="connectionStringSettings"/> /// is <c>null</c></exception> /// <remarks> /// If a SQL dialect is not specified, then one will be selected based on the supplied /// connection string settings /// </remarks> /// <seealso cref="ISubscriptionTrackingCommandBuildersProvider"/> public SQLSubscriptionTrackingService(ConnectionStringSettings connectionStringSettings, ISubscriptionTrackingCommandBuilders commandBuilders = null, IDiagnosticService diagnosticService = null) { if (connectionStringSettings == null) { throw new ArgumentNullException(nameof(connectionStringSettings)); } DiagnosticService = diagnosticService ?? Diagnostics.DiagnosticService.DefaultInstance; ConnectionProvider = new DefaultConnectionProvider(connectionStringSettings, DiagnosticService); _commandBuilders = commandBuilders ?? new CommandBuildersFactory(connectionStringSettings, DiagnosticService) .InitSubscriptionTrackingCommandBuilders(); }
public AbstractLanguageServerClient(AbstractRequestHandlerProvider requestHandlerProvider, VisualStudioWorkspace workspace, IDiagnosticService diagnosticService, IAsynchronousOperationListenerProvider listenerProvider, string?diagnosticsClientName) { _requestHandlerProvider = requestHandlerProvider; _workspace = workspace; _diagnosticService = diagnosticService; _listenerProvider = listenerProvider; _diagnosticsClientName = diagnosticsClientName; }
public InProcLanguageServer(Stream inputStream, Stream outputStream, LanguageServerProtocol protocol, Workspace workspace, IDiagnosticService diagnosticService) { _protocol = protocol; _workspace = workspace; _jsonRpc = new JsonRpc(outputStream, inputStream, this); _jsonRpc.StartListening(); _diagnosticService = diagnosticService; _diagnosticService.DiagnosticsUpdated += DiagnosticService_DiagnosticsUpdated; }
public DiagnosticsClassificationTaggerProvider( IDiagnosticService diagnosticService, ClassificationTypeMap typeMap, IForegroundNotificationService notificationService, IEditorOptionsFactoryService editorOptionsFactoryService, IAsynchronousOperationListenerProvider listenerProvider) : base(diagnosticService, notificationService, listenerProvider.GetListener(FeatureAttribute.Classification)) { _typeMap = typeMap; _classificationTag = new ClassificationTag(_typeMap.GetClassificationType(ClassificationTypeDefinitions.UnnecessaryCode)); _editorOptionsFactoryService = editorOptionsFactoryService; }
public SQLMessageQueueingService(ConnectionStringSettings connectionStringSettings, IMessageQueueingCommandBuilders commandBuilders = null, ISecurityTokenService securityTokenService = null, IDiagnosticService diagnosticService = null) : this(new SQLMessageQueueingOptions(new DefaultConnectionProvider(connectionStringSettings), commandBuilders) { DiagnosticService = diagnosticService, SecurityTokenService = securityTokenService }) { }
/// <summary> /// Initializes a new <see cref="SQLMessageQueueingService"/> with the specified connection /// string settings and dialect /// </summary> /// <param name="options">Options influencing the behavior of this service</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="options"/> /// is <c>null</c></exception> /// <remarks> /// <para>If a SQL dialect is not specified, then one will be selected based on the /// supplied connection string settings</para> /// <para>If a security token service is not specified then a default implementation /// based on unsigned JWTs will be used.</para> /// </remarks> /// <seealso cref="Platibus.Config.Extensibility.IMessageQueueingCommandBuildersProvider"/> public SQLMessageQueueingService(SQLMessageQueueingOptions options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } DiagnosticService = options.DiagnosticService ?? Diagnostics.DiagnosticService.DefaultInstance; ConnectionProvider = options.ConnectionProvider; CommandBuilders = options.CommandBuilders; _securityTokenService = options.SecurityTokenService ?? new JwtSecurityTokenService(); _messageEncryptionService = options.MessageEncryptionService; }
public LiveTableDataSource(Workspace workspace, IDiagnosticService diagnosticService, string identifier, ExternalErrorDiagnosticUpdateSource?buildUpdateSource = null) : base(workspace) { _workspace = workspace; _identifier = identifier; _tracker = new OpenDocumentTracker <DiagnosticTableItem>(_workspace); _diagnosticService = diagnosticService; ConnectToDiagnosticService(workspace, diagnosticService); ConnectToBuildUpdateSource(buildUpdateSource); }
public VisualStudioDiagnosticListTable( SVsServiceProvider serviceProvider, VisualStudioWorkspace workspace, IDiagnosticService diagnosticService, ExternalErrorDiagnosticUpdateSource errorSource, ITableManagerProvider provider) : this(serviceProvider, (Workspace)workspace, diagnosticService, errorSource, provider) { ConnectWorkspaceEvents(); _errorList = serviceProvider.GetService(typeof(SVsErrorList)) as IErrorList; if (_errorList == null) { AddInitialTableSource(workspace.CurrentSolution, _liveTableSource); return; } _errorList.PropertyChanged += OnErrorListPropertyChanged; AddInitialTableSource(workspace.CurrentSolution, GetCurrentDataSource()); }
/// this is for test only internal MiscellaneousDiagnosticListTable(Workspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) : base(null, workspace, diagnosticService, Identifier, provider) { }
public MiscellaneousDiagnosticListTable( SVsServiceProvider serviceProvider, MiscellaneousFilesWorkspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) : base(serviceProvider, workspace, diagnosticService, Identifier, provider) { AddTableSource(); }
/// this is for test only internal VisualStudioDiagnosticListTable(Workspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) : this(null, workspace, diagnosticService, null, provider) { AddInitialTableSource(workspace.CurrentSolution, _liveTableSource); }
public DiagnosticsChangedEventSource(ITextBuffer subjectBuffer, IDiagnosticService service, TaggerDelay delay) : base(delay) { _subjectBuffer = subjectBuffer; _service = service; }
/// this is for test only internal VisualStudioDiagnosticListTable(Workspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) : base(null, workspace, diagnosticService, Identifier, provider) { }
public MiscellaneousDiagnosticListTable( SVsServiceProvider serviceProvider, MiscellaneousFilesWorkspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) : this(serviceProvider, (Workspace)workspace, diagnosticService, provider) { ConnectWorkspaceEvents(); }