JEF (Just Enough Functions) A Nuget Package that contains a lot of functions that should just be in the defualt c# .NET Runtime And Some Usefull Functions
$ dotnet add package MagmaMc.JEFIsElevated(): checks if the current program running function is elevated (.NET 4.0+ or .NET 6.0+).IsUserAdministrator(): checks if the current user running the program is an administrator (.NET 4.0+ or .NET 6.0+).CreatePartition(short DiskNumber = 0, int partitionSizeInGB = 1, char DriveLetter = 'e'): creates a partition on the hard disk.ExecuteCommand(string Command, bool Administrator = false, bool WaitForExit = false, string username = null, string password = null): executes a command in the command prompt and returns the output.CreateService(string serviceName, string displayName, string binPath, ServiceStartType startType, ServiceAccount serviceAccount, string username = null, string password = null, string description = null): This function creates a Windows service using sc.exeAddDescription(string ServiceName, string Description): Adds A Description To A Service CreatedDelete(string ServiceName): Deletes A Created ServiceDoesProcessHaveWindow(Process externalProcess): checks if a process has a window or is in the background.HideWindow(IntPtr Window): hides a window.MaximizeWindow(IntPtr Window): maximizes a window.MinimizeWindow(IntPtr Window): minimizes a window.RestoreWindow(IntPtr Window): restores a window.ShowWindow(IntPtr Window): shows a window.ComputeHash(string input, HashAlgorithm hashAlgo): Computes the string into the hash for a given string input.Base64Encode(string input): Encodes a given string input into a Base64 string.Base64Decode(string input): Decodes a given Base64 string into a plain text string.ConvertStringToSecure(string input): Converts a plain text string into a secure string, which can be used to store passwords and other sensitive information securely in memory.IsInList<T>(List<T> Array, T Value, bool DefualtValue = false): Checks if a given value is present in the input list. It returns a boolean value indicating if the value is present or not. If the value is not present, the function returns the default value.GetValueFromListKey<T>(List<T> List, string include): Checks whether a given list contains a key and returns the value associated with that key. It returns a string value representing the value associated with the specified key if it is present in the input list. If the specified key is not present in the input list, the function returns the default value.DoesKeyStartWith<T>(List<T> List, string include):Checks whether a given list contains a key that starts with a specified value. It returns a boolean value indicating whether a key starting with the specified value is present or not.JEF is licensed under the MIT License.