Converting to file-scoped namespaces
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
namespace Common
|
||||
{
|
||||
namespace Common;
|
||||
|
||||
class Config
|
||||
{
|
||||
public string PasswordStorePath { get; set; }
|
||||
@@ -11,4 +11,3 @@ namespace Common
|
||||
this.Recipient = Recipient;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.VisualBasic.FileIO;
|
||||
|
||||
namespace Common
|
||||
{
|
||||
namespace Common;
|
||||
|
||||
static class ConfigFileManager
|
||||
{
|
||||
#region Config flags
|
||||
@@ -91,4 +91,3 @@ namespace Common
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
namespace Common
|
||||
{
|
||||
namespace Common;
|
||||
|
||||
class InvalidConfigurationException : Exception
|
||||
{
|
||||
public InvalidConfigurationException() : base() { }
|
||||
public InvalidConfigurationException(string message) : base(message) { }
|
||||
public InvalidConfigurationException(string message, Exception inner) : base(message, inner) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Text;
|
||||
|
||||
namespace Common
|
||||
{
|
||||
namespace Common;
|
||||
|
||||
static class PasswordGenerator
|
||||
{
|
||||
private static string RandomStr(int length, bool no_symbols = false)
|
||||
@@ -36,4 +36,3 @@ namespace Common
|
||||
return new ProcessBuilder().GetOutput("cmd.exe", $"echo {RandomStr(length, no_symbols)} | gpg --quiet --encrypt --recipient {recipient}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
|
||||
namespace Common
|
||||
{
|
||||
namespace Common;
|
||||
|
||||
public delegate void ProcessSuccess();
|
||||
public delegate void ProcessFailure(Exception e);
|
||||
sealed class ProcessBuilder
|
||||
@@ -58,4 +58,3 @@ namespace Common
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
5
GUI/GeneratePassword.Designer.cs
generated
5
GUI/GeneratePassword.Designer.cs
generated
@@ -1,5 +1,5 @@
|
||||
namespace GUI
|
||||
{
|
||||
namespace GUI;
|
||||
|
||||
partial class GeneratePassword
|
||||
{
|
||||
/// <summary>
|
||||
@@ -133,4 +133,3 @@
|
||||
private Button generate;
|
||||
private Button cancel;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace GUI
|
||||
{
|
||||
namespace GUI;
|
||||
|
||||
public delegate void MethodRequest();
|
||||
public partial class GeneratePassword : Form
|
||||
{
|
||||
@@ -53,4 +53,3 @@
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
5
GUI/MainForm.Designer.cs
generated
5
GUI/MainForm.Designer.cs
generated
@@ -1,5 +1,5 @@
|
||||
namespace GUI
|
||||
{
|
||||
namespace GUI;
|
||||
|
||||
sealed partial class MainForm : Form
|
||||
{
|
||||
/// <summary>
|
||||
@@ -112,4 +112,3 @@
|
||||
private Button DecryptBtn;
|
||||
private Button Cancel;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace GUI
|
||||
{
|
||||
namespace GUI;
|
||||
|
||||
sealed public partial class MainForm : Form
|
||||
{
|
||||
public event DataRequest PathRequest;
|
||||
@@ -66,4 +66,3 @@ namespace GUI
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections;
|
||||
|
||||
namespace GUI
|
||||
{
|
||||
namespace GUI;
|
||||
|
||||
public delegate string SearchQuery();
|
||||
public class PasswordListBox : ListBox
|
||||
{
|
||||
@@ -70,4 +70,3 @@ namespace GUI
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace GUI
|
||||
{
|
||||
namespace GUI;
|
||||
|
||||
public delegate string DataRequest(); //Fire whenever a specific field of ProfileHandler.CurrentProfile is needed
|
||||
internal static class Program
|
||||
{
|
||||
@@ -19,4 +19,3 @@ namespace GUI
|
||||
() => ConfigFileManager.GetRecipient()
|
||||
); //needed at creation so that MainForm may pass this method down to other classes in its constructor
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user