Class CommonUtils
Contains common static methods.
public static class CommonUtils
- Inheritance
-
CommonUtils
Methods
- CallIf(bool, Action)
Calls the specified action if condition is
true.
- GetAppExePath()
Gets path to the exe file of the application.
- GetAppFolder()
Returns path to the application folder.
- GetNotNull<T>(T?[]?)
Returns a new array containing all non-null elements from the specified array of nullable values.
- GetPalFolder(string)
Gets Alternet.UI.Pal folder.
- GetSamplesFolder(string)
Gets Samples folder of the UI Installation.
- GetUIFolder(string)
Gets Alternet.UI folder.
- HasNulls<T>(T?[]?)
Determines whether the specified array contains any null elements.
- Nop()
Does nothing.
- PrepareFileUrl(string)
Prepends filename with "file" url protocol prefix.
- PrepareZipUrl(string, string, string)
Prepares zip url in the form "{schemeName}:///{arcPath};protocol={fileInArchivePath}"
- ReplaceNonUrlChars(string)
Replaces spaces with %20, other non url chars with corresponding html codes.
- Swap<T>(ref T, ref T)
Exchanges the values of two variables of the same type.
- TrimEndDirectorySeparator(string?)
Removes a DirectorySeparatorChar and AltDirectorySeparatorChar characters from the end of the specified string.