diff --git a/X10D/src/StringExtensions.cs b/X10D/src/StringExtensions.cs index 8a88a32..8287064 100644 --- a/X10D/src/StringExtensions.cs +++ b/X10D/src/StringExtensions.cs @@ -368,51 +368,7 @@ } } } - - /// - /// Converts a to a . - /// - /// The string to convert. - /// Returns a . - /// is . - public static SecureString ToSecureString(this string str) - { - if (str is null) - { - throw new ArgumentNullException(nameof(str)); - } - - if (string.IsNullOrWhiteSpace(str)) - { - return null; - } - - var result = new SecureString(); - foreach (var c in str) - { - result.AppendChar(c); - } - - return result; - } - - /// - /// Converts a to a . - /// - /// The to convert. - /// Whether or not to use this extension method. - /// Returns a . - /// is . - public static string ToString(this SecureString str, bool extension) - { - if (str is null) - { - throw new ArgumentNullException(nameof(str)); - } - - return extension ? new NetworkCredential(string.Empty, str).Password : str.ToString(); - } - + /// /// Parses a shorthand time span string (e.g. 3w 2d 1.5h) and converts it to an instance of /// .