Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

Commit

Permalink
Revert "Add disable pragmas"
Browse files Browse the repository at this point in the history
This reverts commit c9f2274.
  • Loading branch information
StrangeRanger committed Mar 29, 2024
1 parent c9f2274 commit 1a32af1
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions ActiveDirectoryQuerier/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ internal void ClearConsoleOutput(ConsoleViewModel consoleOutput)
}
}

#pragma warning disable S2326 // Unused parameters should be removed | This method is used as a relay command.
private async void ExecuteSelectedQueryInADInfo(object? _)
{
if (SelectedQueryInActiveDirectoryInfo is null)
Expand All @@ -277,7 +276,6 @@ private async void ExecuteSelectedQueryInADInfo(object? _)
throw new KeyNotFoundException("The selected option was not found in the dictionary.");
}
}
#pragma warning restore S2326 // Unused parameters should be removed

internal void EditQueryFromQueryStackPanel(object? queryButton)
{
Expand Down Expand Up @@ -374,7 +372,7 @@ internal void DeleteQueryFromQueryStackPanel(object? queryButton)
}
}

#pragma warning disable S2326 // Unused parameters should be removed | This method is used as a relay command.
// TODO: Continue refactoring starting here...
private void CreateNewQueryFile(object? _)
{
// Saves/creates a new save file for the queries
Expand All @@ -386,7 +384,6 @@ private void CreateNewQueryFile(object? _)
_queryManager.QueryFileSaveLocation = saveFileDialog.FileName;
}
}
#pragma warning restore S2326 // Unused parameters should be removed

private void LoadSavedQueriesFromFile()
{
Expand All @@ -408,7 +405,6 @@ private void LoadSavedQueriesFromFile()
}
}

#pragma warning disable S2326 // Unused parameters should be removed | This method is used as a relay command.
private void ImportQueryFile(object? _)
{
OpenFileDialog dialog =
Expand All @@ -427,7 +423,6 @@ private void ImportQueryFile(object? _)
LoadSavedQueriesFromFile();
}
}
#pragma warning restore S2326

private async Task InitializeActiveDirectoryCommandsAsync()
{
Expand Down Expand Up @@ -465,7 +460,6 @@ private async Task LoadCommandParametersAsync(Command? selectedCommand)
}
}

#pragma warning disable S2326 // Unused parameters should be removed | This method is used as a relay command.
internal void AddParameterComboBoxInQueryBuilder(object? _)
{
// Check if some variable is null and throw an exception if it is
Expand All @@ -483,15 +477,12 @@ internal void AddParameterComboBoxInQueryBuilder(object? _)
new ComboBoxParameterViewModel(AvailableADCommandParameters));
DynamicallyAvailableADCommandParameterValueTextBoxes.Add(new TextBoxViewModel());
}
#pragma warning restore S2326

#pragma warning disable S2326 // Unused parameters should be removed | This method is used as a relay command.
private void AddCommandComboBoxInQueryBuilder(object? _)
{
Trace.WriteLine("Not implemented yet.");
MessageBoxService.Show("Not implemented yet.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}
#pragma warning restore S2326

private void UpdateCommandWithSelectedParameters()
{
Expand Down Expand Up @@ -545,7 +536,6 @@ private void GetCurrentQuery()
_currentQuery.PSCommandParameterValues = commandParameterValues;
}

#pragma warning disable S2326 // Unused parameters should be removed | This method is used as a relay command.
internal void RemoveParameterComboBoxInQueryBuilder(object? _)
{
if (DynamicallyAvailableADCommandParameterComboBoxes.Count != 0)
Expand All @@ -563,7 +553,6 @@ internal void RemoveParameterComboBoxInQueryBuilder(object? _)
MessageBoxImage.Warning);
}
}
#pragma warning restore S2326

internal void SaveCurrentQuery(object? commandParameter)
{
Expand Down Expand Up @@ -609,7 +598,6 @@ internal void SaveCurrentQuery(object? commandParameter)
}
}

#pragma warning disable S2326 // Unused parameters should be removed | This method is used as a relay command.
internal void ClearQueryBuilder(object? _)
{
if (SelectedCommandInQueryBuilder is null && DynamicallyAvailableADCommandParameterComboBoxes.Count == 0)
Expand Down Expand Up @@ -638,7 +626,6 @@ internal void ClearQueryBuilder(object? _)
DynamicallyAvailableADCommandParameterValueTextBoxes.Clear();
}
}
#pragma warning restore S2326

/// <remarks>
/// The use of the <c>command</c> parameter indicates that the method can be called from the Query Stack Panel.
Expand Down Expand Up @@ -707,7 +694,6 @@ private async void ExecuteQueryFromQueryStackPanelAsync(object? queryButton)
await ExecuteQueryAsync(ConsoleOutputInQueryBuilder, buttonQuery.Command);
}

#pragma warning disable S2326 // Unused parameters should be removed | This method is used as a relay command.
private void ExportConsoleOutputToFile(object? _)
{
if (ConsoleOutputInQueryBuilder.GetConsoleOutput.Length == 0)
Expand All @@ -729,7 +715,6 @@ private void ExportConsoleOutputToFile(object? _)
ConsoleOutputInQueryBuilder.ExportToTextFile(filename);
}
}
#pragma warning restore S2326

private async void OutputExecutionResultsToTextFileAsync(object? queryButton)
{
Expand Down Expand Up @@ -836,7 +821,6 @@ private void OnIsQueryEditingEnabledChanged()
}
}

#pragma warning disable S2326 // Unused parameters should be removed | This method is used as a relay command.
private void CheckBoxChecked(object? _)
{
if (IsQueryEditingEnabled)
Expand All @@ -849,7 +833,6 @@ private void CheckBoxChecked(object? _)
IsQueryEditingEnabled = false;
}
}
#pragma warning restore S2326

private OutputFormat CalculateOutputFormat()
{
Expand Down

0 comments on commit 1a32af1

Please sign in to comment.