Conversions Class |
Namespace: ShellBoost.Core.Utilities
public static class Conversions
The Conversions type exposes the following members.
Name | Description | |
---|---|---|
ChangeType(Object, Type) |
Converts the input object to a specified typed equivalent. If conversion failed, the default value for the expected type will be used.
| |
ChangeType(Object, Type, Object) |
Converts the input object to a specified typed equivalent. If conversion failed, the specified default value will be used.
| |
ChangeType(Object, Type, Object, IFormatProvider) |
Converts the input object to a specified typed equivalent. If conversion failed, the specified default value will be used.
| |
ChangeTypeT(Object) |
Converts the input object to a specified typed equivalent. If conversion failed, the default value for the expected type will be used.
| |
ChangeTypeT(Object, T) |
Converts the input object to a specified typed equivalent. If conversion failed, a specified default value will be used.
| |
ChangeTypeT(Object, T, IFormatProvider) |
Converts the input object to a specified typed equivalent. If conversion failed, a specified default value will be used.
| |
CompareTKey, TValue |
Compares two dictionaries.
| |
ComputeGuidHash |
Computes hash as a 128-bit guid.
| |
ComputeInt64Hash |
Computes a 64-bit signed integer hash.
| |
ComputeUInt64Hash |
Computes a 64-bit unsigned integer hash.
| |
EnumToObject |
Converts the specified enum value object to an enumeration member.
| |
EnumToUInt64(Object) |
Converts an enum value object to an unsigned 64-bit integer.
| |
EnumToUInt64(String, Type) |
Converts a string representation of an enum value to an unsigned 64-bit integer.
| |
EnumTryParse |
Converts an input object to an equivalent enumerated object. The return value indicates whether the conversion succeeded.
| |
EqualsIgnoreCase |
Test two strings for equality using OrdinalIgnoreCase string comparison.
| |
GetEnumeratedType |
Gets the item type of a collection type.
| |
GetHexaByte |
Gets the byte from an hexadecimal character. Returns 255 (0xFF) is the character is not hexadecimal.
| |
GetNewFileName |
Compute a new name from a tentative name and a function that tests if a name exists.
| |
GetNewFileNameAsync |
Compute a new name from a tentative name and a function that tests if a name exists.
| |
GetNullifiedValue(IDictionaryString, String, String, String) |
Gets a string value from a dictionary by its key/name. If the value is not found, the specified default value will be returned.
A whitespaces or empty string will be converted to null.
| |
GetNullifiedValue(IDictionaryString, Object, String, IFormatProvider, String) |
Gets a string value from a dictionary by its key/name. If the value is not found, the specified default value will be returned.
A whitespaces or empty string will be converted to null.
| |
GetValueT(IDictionaryString, Object, String, T, IFormatProvider) |
Gets a value from a dictionary by its key/name.
| |
GetValueT(IDictionaryString, String, String, T, IFormatProvider) |
Gets a value from a dictionary by its key/name.
| |
IsFlagsEnum |
Determines whether a type is Flags (multi-valued) enum type.
| |
IsValidFileTime(DateTime) |
Determines if a given DateTime is a valid file time.
| |
IsValidFileTime(DateTimeOffset) |
Determines if a given DateTimeOffset is a valid file time.
| |
Nullify |
Nullifies (trim and treat an empty string as null) the specified text.
| |
RemoveMilliseconds(DateTime) |
Removes the milliseconds from a DateTime instance.
| |
RemoveMilliseconds(DateTimeOffset) |
Removes the milliseconds from a DateTimeOffset instance.
| |
Replace |
Returns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string, using the provided comparison type.
| |
SplitToListT(String, Char) |
Splits a text into a list of values.
| |
SplitToListT(String, IFormatProvider, Char) |
Splits a text into a list of values.
| |
StructuresToBytesT |
Marshals data from a list of managed object of a specified type to array of bytes.
| |
StructuresToPtrT |
Marshals data from a list of managed object of a specified type to array of bytes.
| |
StructureToBytesT |
Marshals data from a managed object of a specified type to array of bytes.
| |
ToBytesFromHexa |
Converts the string representation of hexadecimal values to an array of bytes.
| |
ToCompareIdReturnValue |
Converts a result of a comparison to the CompareIdReturnValue type.
| |
ToDateTime |
Converts a FILETIME to a DateTime.
| |
ToDateTimeOffset |
Converts a FILETIME to a DateTimeOffset.
| |
ToDateTimeUtc |
Converts a FILETIME to a UTC DateTime.
| |
ToDictionary |
Converts a non-generic dictionary to a generic one.
| |
ToEnum(Object, Enum) |
Converts an input value to an enumeration member
| |
ToEnum(String, Enum) |
Converts an input string to an enumeration member
| |
ToEnum(String, Type) |
Converts an input string to an enumeration member
| |
ToFileTime(DateTime) |
Converts a DateTime to an UTC file time. The returned file time can be a negative value. In this case, it's not a valid Win32 FILETIME.
| |
ToFileTime(DateTimeOffset) |
Converts a DateTimeOffset to an UTC file time. The returned file time can be a negative value. In this case, it's not a valid Win32 FILETIME.
| |
ToFileTime(FILETIME) |
Converts a FILETIME to an Int64 file time.
| |
ToFileTime(Int64) |
Converts an Int64 file tie to a FILETIME.
| |
ToHexa(Byte) |
Converts an array of bytes to its hexadecimal string representation.
| |
ToHexa(Byte, Int32) |
Converts an array of bytes to its hexadecimal string representation.
| |
ToHexa(Byte, Int32, Int32) |
Converts an array of bytes to its hexadecimal string representation.
| |
ToHexaDump(Byte, Int32) |
Converts an array of bytes to an hexadecimal dump representation.
| |
ToHexaDump(Byte, String) |
Converts a buffer to an hexadecimal dump representation.
| |
ToHexaDump(IntPtr, Int32) |
Converts a buffer to an hexadecimal dump representation.
| |
ToHexaDump(String, Encoding) |
Converts a text to an hexadecimal dump representation.
| |
ToHexaDump(Byte, Int32, Int32, String, Boolean) |
Converts an array of bytes to an hexadecimal dump representation.
| |
ToHexaDump(IntPtr, Int32, Int32, String, Boolean) |
Converts a buffer to an hexadecimal dump representation.
| |
ToPositiveFileTime(DateTime) |
Converts a DateTime to an always positive or zero file time. It's always a valid Win32 FILETIME.
| |
ToPositiveFileTime(DateTimeOffset) |
Converts a DateTimeOffset to an always positive or zero file time. It's always a valid Win32 FILETIME.
| |
ToStringNoZero |
Converts an enum value to a string without using the possible zero values.
| |
ToStructureT |
Converts a byte array into a structure.
| |
TryChangeType(Object, Type, Object) |
Converts the input object to a specified typed equivalent. A return value indicates whether the conversion succeeded.
| |
TryChangeType(Object, Type, IFormatProvider, Object) |
Converts the input object to a specified typed equivalent. A return value indicates whether the conversion succeeded.
| |
TryChangeTypeT(Object, T) |
Converts the input object to a specified typed equivalent. A return value indicates whether the conversion succeeded.
| |
TryChangeTypeT(Object, IFormatProvider, T) |
Converts the input object to a specified typed equivalent. A return value indicates whether the conversion succeeded.
|
Name | Description | |
---|---|---|
MinFileTime |
Gets the minimum file time as a DateTime.
| |
MinFileTimeOffset |
Gets the minimum file time as a DateTimeOffset.
|