-
-
Notifications
You must be signed in to change notification settings - Fork 5
Converter
Taiizor edited this page Mar 1, 2023
·
12 revisions
The Converter
class provides methods to convert between different enumerations used in the Skylark library. The supported enumeration types are:
-
AlphabeticPasswordType
(SEAPT) -
ClearNumericType
(SECNT) -
CompressWebType
(SECWT) -
HttpWebType
(SEHWT) -
ModeStorageType
(SEMST) -
QueryDomainType
(SEQDT) -
SpecialPasswordType
(SESLPT) -
SimilarPasswordType
(SESRPT) -
StorageType
(SEST) -
TimeType
(SETET) -
TaxType
(SETXT)
The Converter
class contains the following methods:
Convert(string Type, SEST Back = SEST.Bit)
Convert(string Type, SEQDT Back = SEQDT.TXT)
Convert(string Type, SECNT Back = SHN.ClearType)
Convert(string Type, SEMST Back = SEMST.Toucan)
Convert(string Type, SETET Back = SETET.Attosecond)
Convert(string Type, SETXT Back = SETXT.Amount)
Convert(string Type, SESRPT Back = SESRPT.Jaccard)
Convert(string Type, SESLPT Back = SESLPT.Mixed)
Convert(string Type, SECWT Back = SECWT.None)
Check(string str1, string str2)
TryGetEnum<TEnum>(string value, out TEnum result)
The Check
method is a private helper method that checks if a given string matches an enumeration value.
The TryGetEnum
method is a generic helper method that tries to parse a string into an enumeration value of the specified type.
The following example demonstrates how to use the Converter
class to convert a string to an enumeration value:
using Skylark.Enum;
using Skylark.Helper;
string input = "Bit";
StorageType result = Converter.Convert(input);
Console.WriteLine(result); // Outputs "Bit"
- Tax
- Url
- Web
- Ping
- Port
- Text
- Time
- Hash
- Word
- Color
- Speed
- Lottery
- Storage
- Browser
- Unicode
- Password
- JavaScript
- Cryptology
- Typography
- Temperature
- Compression
- Decompression
- Cascading Style Sheets
- JavaScript Object Notation
- Hypertext Markup Language
- Extensible Markup Language
- Extensible HyperText Markup Language