Utils_Other Methods |
The Utils_Other type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | Add(DateTime, Int32, Int32, Int32, Int32) |
Adds the specified days, hours, minutes and seconds to the given date.
|
![]() ![]() | Add(DateTimeOffset, Int32, Int32, Int32, Int32) |
Adds the specified days, hours, minutes and seconds to the given date.
|
![]() ![]() | AsT |
Casts an object to another type. Returns default(T) if the object is null.
|
![]() ![]() | CompareVersions |
Compares the versions.
|
![]() ![]() | ConvertArrayToStringCollection |
Converts an array of strings to a StringCollection.
|
![]() ![]() | ConvertToUnsecureString |
Gets an unsecured string from a secured string.
|
![]() ![]() | CreateGetMethod |
Creates a dynamic getter for the property.
https://jachman.wordpress.com/2006/08/22/2000-faster-using-dynamic-method-calls/
|
![]() ![]() | CreateSetMethod |
Creates a dynamic setter for the property.
https://jachman.wordpress.com/2006/08/22/2000-faster-using-dynamic-method-calls/
|
![]() ![]() | CreateValueTKey, TValue |
Creates a new instance of TValue and add it in the dictionary for the specified key.
|
![]() ![]() | EnsureValueTKey, TValue |
Ensures that the value for the specified key is the given value.
|
![]() ![]() | EqualsAll |
Checks that this object is equal to every object in parameters.
|
![]() ![]() | EqualsAny |
Checks that this object is equal to at least one of the parameters.
|
![]() ![]() | GetAssembky(String, String) | Gets an assembly from a folder. This method cannot be used to load Utils (current assembly). This assembly must be in default bin or in GAC. |
![]() ![]() | GetAssembky(String, String, String) | Gets an assembly from a folder. This method cannot be used to load Utils (current assembly). This assembly must be in default bin or in GAC. |
![]() ![]() | GetCleanSegments |
Gets an URI's segments, splitted with more characters. "/" is trimmed.
|
![]() ![]() | GetCompleteTextFromHours |
Converts a number of hours to a number of days, given a certain amount of hours per day.
This method returns a textual representation '[X] days ([val] hours)'. |
![]() ![]() | GetConstants | |
![]() ![]() | GetDateForBdd |
Returns a DateTime that can't be prior to 1/1/1970.
|
![]() ![]() | GetDaysFromHours |
Converts a number of hours to a number of days, given a certain amount of hours per day.
|
![]() ![]() | GetDaysFromHours_Text |
Converts a number of hours to a number of days, given a certain amount of hours per day.
This method returns a text. |
![]() ![]() | GetDbValue(NullableBoolean) |
Gets the value if available, else returns false.
|
![]() ![]() | GetDbValue(NullableDateTime) |
Gets the value if available, else returns DateTime.MinValue.
|
![]() ![]() | GetDbValue(NullableDouble) |
Gets the value if available, else returns 0.
|
![]() ![]() | GetDbValue(NullableInt32) |
Gets the value if available, else returns 0.
|
![]() ![]() | GetEnumGuid |
Using the EnumGuid attribute, gets the guid associated to an enum.
|
![]() ![]() | GetFieldsAttributeAttributeType |
Gets all attributes of a given type associated to a field on the specified type.
|
![]() ![]() | GetFileVersion |
Gets the file version of an assembly.
|
![]() ![]() | GetLoadableTypes |
Gets loadable types of the assembly.
Types that cannot be loaded will be ignored.
|
![]() ![]() | GetOrCreateValueTKey, TValue(DictionaryTKey, TValue, TKey) |
Tries to find the value associated with the given key.
If not found, creates a new instance of TValue and add it in the dictionary for the specified key. |
![]() ![]() | GetOrCreateValueTKey, TValue(DictionaryTKey, TValue, TKey, FuncTValue) |
Tries to find the value associated with the given key.
If not found, uses [valueCreatorIfNotExists] to add the value in the dictionary for the specified key. |
![]() ![]() | GetOrCreateValueTKey, TValue(DictionaryTKey, TValue, TKey, TValue) |
Tries to find the value associated with the given key.
If not found, adds [valueIfNotExists] in the dictionary for the specified key. |
![]() ![]() | GetProcessOwner |
Gets the user name owning/running a given process.
If there are multiple process with the same name, only the first owner is returned.
|
![]() ![]() | GetPropertiesAttributeType |
Gets all properties associated to a given type of attribute on the specified type.
|
![]() ![]() | GetPropertiesAttributesAttributeType |
Gets all attributes of a given type associated to a property on the specified type.
|
![]() ![]() | GetRandomDay |
Gets a random day.
|
![]() ![]() | GetString |
Converts an object to String using ToString() method, else returns String.Empty.
|
![]() ![]() | GetValueTKey, TValue |
Gets the value associated with the specified key.
|
![]() ![]() | InT(T, IEnumerableT) |
Checks if a value is equal to any other specified value in the list.
|
![]() ![]() | InT(T, T) |
Checks if a value is equal to any other specified value.
|
![]() ![]() | IsNotNullOrEmpty |
Checks if a guid is NOT null or empty.
|
![]() ![]() | IsNullOrEmpty |
Checks if a guid is null or empty.
|
![]() ![]() | IsNumber |
Checks if an object if of any of these types :
sbyte, byte, short, ushort, int, uint, long, ulong, float, double, decimal.
|
![]() ![]() | IsProcessRunning |
Determines whether the specified process is running.
|
![]() ![]() | IsStatic |
Checks if a type is static. (uses IsAbstract and IsSealed conditions)
|
![]() ![]() | IsSubclassOfRawGeneric |
Checks if a type inherits from another one, even if the class is generic.
|
![]() ![]() | MergeArrays(String) |
Merges multiple arrays into a single array.
|
![]() ![]() | MergeArraysT(T) |
Merges multiple arrays into a single array.
|
![]() ![]() | SmartConcat |
Concatanates multiple strings into a single string, using the specified separator.
|
![]() ![]() | SmartConcatObjects |
Concatanates multiple objects into a single string, using the specified separator.
|
![]() ![]() | ToStringCollection |
Converts a list of strings to a StringCollection.
|
![]() ![]() | TryGetValueTKey, TValue |
Gets the value associated with the specified key.
|
![]() ![]() | TryLoadAssemblyByFullName |
Tries to load an assembly given the long form of its name.
|