MiscUtils MembersNFX Class Library

[This is preliminary documentation and is subject to change.]

The MiscUtils type exposes the following members.
Methods

  NameDescription
Public methodStatic memberAllFileNames
Walks all file names in a directory
Public methodStatic memberAllFileNamesThatMatch
Walks all file names that match the pattern in a directory
Public methodStatic memberAppendFormatLine(StringBuilder, String, Object)
Appends the string followed by new line and returned by processing a composite format string, which contains zero or more format items, to this instance. Each format item is replaced by the string representation of a single argument.
Public methodStatic memberAppendFormatLine(StringBuilder, String,  Object )
Appends the string followed by new line and returned by processing a composite format string, which contains zero or more format items, to this instance. Each format item is replaced by the string representation of a single argument.
Public methodStatic memberAppendFormatLine(StringBuilder, String, Object, Object)
Appends the string followed by new line and returned by processing a composite format string, which contains zero or more format items, to this instance. Each format item is replaced by the string representation of a single argument.
Public methodStatic memberAppendFormatLine(StringBuilder, String, Object, Object, Object)
Appends the string followed by new line and returned by processing a composite format string, which contains zero or more format items, to this instance. Each format item is replaced by the string representation of a single argument.
Public methodStatic memberArgs
Shortcut helper for string.Format(tpl, params object[] args)
Public methodStatic memberArgsTpl(String, Object)
Interprets template of the form: Some text {@value_name@:C} by replacing with property/field values. Note: this function does not recognize escapes for simplicity (as escapes can be replaced by regular strings instead)
Public methodStatic memberArgsTpl(String, Object, Boolean )
Interprets template of the form: Some text {@value_name@:C} by replacing with property/field values. Note: this function does not recognize escapes for simplicity (as escapes can be replaced by regular strings instead). Matched is set to true if at least one property match was made
Public methodStatic memberBurmatographize
Swaps string letters that "obfuscates" string- usefull for generation of keys from strings that have to become non-obvious to user. This function does not offer any real protection (as it is easy to decipher the original value), just visual. The name comes from non-existing science "Burmatography" used in "Neznaika" kids books
Public methodStatic memberCapitalizeFirstChar
Capitalizes first character of string
Public methodStatic memberDefault
Defaults string if it is null or whitespace
Public methodStatic memberDisplayNameWithExpandedGenericArgs
Returns the the name of the type with expanded generic argument names. This helper is useful for printing class names to logs/messages. List'1[System.Object] -> List<Object>
Public methodStatic memberEntryExeName
Returns the name of entry point executable file optionaly with its path
Public methodStatic memberEqualsIgnoreCase
Helper function that performs case-insensitive comparison between strings using invariant comparison. Either lhs and rhs can be null. Use this in conjunction with GetHashCodeIgnoreCase
Public methodStatic memberEqualsOrdIgnoreCase
Helper function that performs case-insensitive comparison between strings using ordinal comparison. Either lhs and rhs can be null. Use this in conjunction with GetHashCodeOrdIgnoreCase
Public methodStatic memberEqualsOrdSenseCase
Helper function that performs case-insensitive comparison between strings using ordinal comparison. Either lhs and rhs can be null. Use this in conjunction with GetHashCodeOrdSenseCase
Public methodStatic memberEqualsSenseCase
Helper function that performs comparison between strings using invariant comparison. Either lhs and rhs can be null. Use this in conjunction with GetHashCodeSenseCase
Public methodStatic memberEvaluateVars
Evaluates variables in a context of optional variable resolver and macro runner
Public methodStatic memberEvaluateVarsInConfigScope
Evaluates variables in a context of optional configuration supplied as config object
Public methodStatic memberEvaluateVarsInDictionaryScope
Evaluates variables in a context of optional configuration supplied as dictionary which is converted to attributes
Public methodStatic memberEvaluateVarsInXMLConfigScope
Evaluates variables in a context of optional configuration supplied in XML format
Public methodStatic memberFromMicrosecondsSinceUnixEpochStart(Int64)
Gets UTC DateTime from number of microseconds since Unix epoch start (1970/1/1 0:0:0)
Public methodStatic memberFromMicrosecondsSinceUnixEpochStart(UInt64)
Gets UTC DateTime from number of microseconds since Unix epoch start (1970/1/1 0:0:0)
Public methodStatic memberFromMillisecondsSinceUnixEpochStart(Int64)
Gets UTC DateTime from number of milliseconds since Unix epoch start (1970/1/1 0:0:0)
Public methodStatic memberFromMillisecondsSinceUnixEpochStart(UInt64)
Gets UTC DateTime from number of milliseconds since Unix epoch start (1970/1/1 0:0:0)
Public methodStatic memberFromSecondsSinceUnixEpochStart(Int64)
Gets UTC DateTime from number of seconds since Unix epoch start (1970/1/1 0:0:0)
Public methodStatic memberFromSecondsSinceUnixEpochStart(UInt64)
Gets UTC DateTime from number of seconds since Unix epoch start (1970/1/1 0:0:0)
Public methodStatic memberFromUTF8Bytes
Decode string with standart UTF8 decoder
Public methodStatic memberFullNameWithExpandedGenericArgs
Returns the full name of the type optionally prefixed with verbatim id specifier '@'. The generic arguments ar expanded into their full names i.e. List'1[System.Object] -> System.Collections.Generic.List<System.Object>
Public methodStatic memberGetHashCodeIgnoreCase
Helper function that performs case-insensitive GetHashcode for string using invariant comparison. Use this in conjunction with EqualsIgnoreCase
Public methodStatic memberGetHashCodeOrdIgnoreCase
Helper function that performs case-insensitive GetHashcode for string using ordinal comparison. Use this in conjunction with EqualsOrdIgnoreCase
Public methodStatic memberGetHashCodeOrdSenseCase
Helper function that performs case-insensitive GetHashcode for string using ordinal comparison. Use this in conjunction with EqualsOrdSenseCase
Public methodStatic memberGetHashCodeSenseCase
Helper function that performs GetHashcode for string using invariant comparison. Use this in conjunction with EqualsSenseCase
Public methodStatic memberIPStringToIPEndPointObsolete.
Converts string of format "xx.xx.xx.xx:nnnn" into IPEndPoint. DNS names are NOT supported
Public methodStatic memberIsComponentDesignerHosted
Determines if component is being used within designer
Public methodStatic memberIsNotNullOrEmpty
Helper function that calls !string.IsNullOrEmpty()
Public methodStatic memberIsNotNullOrWhiteSpace
Helper function that calls !string.IsNullOrWhiteSpace()
Public methodStatic memberIsNullOrEmpty
Helper function that calls string.IsNullOrEmpty()
Public methodStatic memberIsNullOrWhiteSpace
Helper function that calls string.IsNullOrWhiteSpace()
Public methodStatic memberIsTrue
Public methodStatic memberIsValidXMLName
Returns true when supplied name can be used for XML node naming (node names, attribute names)
Public methodStatic memberNonNull T 
Checks the value for null and throws exception if it is. The method is useful for .ctor call chaining to preclude otherwise anonymous NullReferenceException
Public methodStatic memberRoundToNextWeekDay
Round date to next specific week day
Public methodStatic memberRoundToWeekDay
Round date to specific week day
Public methodStatic memberRunAndCompleteProcess
Runs specified process and waits for termination returning standard process output. This is a blocking call
Public methodStatic memberSplitLines
Splits string into lines using Win or .nix line brakes
Public methodStatic memberStripSimpleHtml
Strip simple html from string
Public methodStatic memberTakeFirstChars
Takes first X chars from a string. If string is null returns null. If string does not have enough the function returns what the string has
Public methodStatic memberToConfigAttributes
Converts dictionary into configuration where every original node gets represented as an attribute of config's root
Public methodStatic memberToConfigSections
Converts dictionary into configuration where every original node gets represented as a sub-section of config's root
Public methodStatic memberToDebugView
Converts expression tree to simple textual form for debugging
Public methodStatic memberToDescription
Returns MemberInfo described as short string
Public methodStatic memberToDumpString
Convert a buffer to a printable string
Public methodStatic memberToGUID
Generates GUID based on a string MD5 hash
Public methodStatic memberToIPEndPoint
Resolve IP address by Name
Public methodStatic memberToJSONDataMap
If there is error, converts its details to JSOnDataMap
Public methodStatic memberToMD5( Byte )
Returns a MD5 hash of a byte array
Public methodStatic memberToMD5(String)
Returns a MD5 hash of a UTF8 string represented as byte[]
Public methodStatic memberToMD5String
Returns a MD5 hash of a UTF8 string represented as hex string
Public methodStatic memberToMessageWithType
Writes exception message with exception type
Public methodStatic memberToMicrosecondsSinceUnixEpochStart
Gets number of microseconds since Unix epoch start (1970/1/1 0:0:0)
Public methodStatic memberToMillisecondsSinceUnixEpochStart
Gets number of milliseconds since Unix epoch start (1970/1/1 0:0:0)
Public methodStatic memberToSecondsSinceUnixEpochStart
Gets number of seconds since Unix epoch start (1970/1/1 0:0:0)
Public methodStatic memberToUTF8Bytes
Encodes string with standart UTF8 encoder
Public methodStatic memberTruncate
Tuncate date to specific resolution
Back to Top
Fields

  NameDescription
Public fieldStatic memberUNIX_EPOCH_START_DATE
Public fieldStatic memberWIN_UNIX_LINE_BRAKES
Back to Top
See Also