public BicepEditLinterRuleCommandHandler(ISerializer serializer, ILanguageServerFacade server, ITelemetryProvider telemetryProvider) : base(LanguageConstants.EditLinterRuleCommandName, serializer) { DefaultBicepConfig = DefaultBicepConfigHelper.GetDefaultBicepConfig(); this.server = server; this.telemetryProvider = telemetryProvider; }
public async Task <bool> Handle(BicepCreateConfigParams request, CancellationToken cancellationToken) { string?destinationPath = request.DestinationPath; if (destinationPath is null) { throw new ArgumentException($"{nameof(destinationPath)} should not be null"); } this.logger.LogTrace($"Writing new configuration file to {destinationPath}"); string defaultBicepConfig = DefaultBicepConfigHelper.GetDefaultBicepConfig(); await File.WriteAllTextAsync(destinationPath, defaultBicepConfig); return(true); }
public BicepDisableLinterRuleCommandHandler(ISerializer serializer) : base(LanguageConstants.DisableLinterRuleCommandName, serializer) { DefaultBicepConfig = DefaultBicepConfigHelper.GetDefaultBicepConfig(); }