ExtensionMethods Methods |
The ExtensionMethods type exposes the following members.
| Name | Description | |
|---|---|---|
| kAddFlag(Int64, Int64) |
Adds the flag.
| |
| kAddFlagT(Enum, T) |
Adds the flag.
| |
| kAsReadableTime |
Displays a readable time
| |
| kBeginningOfDay |
Returns 12:00am time for the date passed.
Useful for date only search ranges start value
| |
| kBeginningOfMonth |
Returns the Start of the given month (the fist millisecond of the given date)
| |
| kBeginningOfWeek |
Get the date for the beginning of the week.
| |
| kBetween |
Returns true if the date is between or equal to one of the two values.
| |
| kCaesar |
Places a Caesar shift cipher on a string of a specified number of shifts.
| |
| kCalculateAge |
Calculates the age of something/someone.
| |
| kCoinToss |
Coins the toss.
| |
| kCompareTo |
Compares to.
| |
| kContains(String, String, StringComparison) |
Determines whether string [contains] [the specified value].
| |
| kContains(String, String, CompareOptions, CultureInfo) |
Determines whether string [contains] [the specified other].
| |
| kCountDaysBetween |
Counts the days between.
| |
| kEndOfDay |
Returns 12:59:59pm time for the date passed.
Useful for date only search ranges end value
| |
| kEndOfMonth |
Returns the very end of the given month (the last millisecond of the last hour for the given date)
| |
| kEqualsIgnoreCase |
compare strings ignoring case.
| |
| kEqualsTo |
Check if strings are same.
| |
| kFiscalInfo |
Returns all information relative to Fiscal Quarters
| |
| kForEachT(IEnumerableT, ActionT) |
Iterates through IEnumerbale and runs action
| |
| kForEachT(IListT, ActionT) |
Iterates through IList and runs action
| |
| kGetAllMessages |
Gets all messages (including InnerExceptions!).
| |
| kGetAsString(MemoryStream) |
Returns the content of the stream as a string
| |
| kGetAsString(MemoryStream, Encoding) |
Returns the content of the stream as a string
| |
| kGetValueOrDefaultTKey, TValue |
Gets the value or default if key doesn't exist.
| |
| kHasFlag(Int64, Int64) |
Determines whether the specified current long (bitwise) has flag (& Logic).
| |
| kHasFlagT(Enum, T) |
Determines whether the specified value has flag.
| |
| kIndexOf |
checks for index of specified string - case insenstive.
| |
| kIsEmpty |
Determines whether this is an empty guid
| |
| kIsFlag(Int64, Int64) |
Determines whether the specified current long (bitwise) is the same as flag (& Logic).
| |
| kIsFlagT(Enum, T) |
Determines whether the specified value is flag.
| |
| kIsInT |
Determines whether the specified variable is contained within the "list".
| |
| kIsNumeric |
Determines whether the specified the value is numeric.
| |
| kLastIndexOf |
checks for Last index of specified string - case insenstive.
| |
| kLoadFromJsonFileT | ||
| kLoadFromJsonStringT |
Loads JSON from string into class(type).
| |
| kOccurences |
Occurenceses the specified substring within a string (FAST).
| |
| kOneOfT |
Returns a random entry from an array of strings/numebers.
| |
| kPadCenter |
Pads the center of a string.
| |
| kProperSentence |
Convert Sentence to ProperCase
| |
| kProperWord | Return Converted Word | |
| kQuarterInfo |
Returns all information relative to a Business Quarter
| |
| kRandomize |
Randomizes the specified source. - used for test data, among other options
| |
| kRemoveDiacritics |
Removes the diacritics.
based on http://stackoverflow.com/a/3769995/852829
| |
| kRemoveDiacriticsAndRecompose |
Removes the diacritics and recompose.
| |
| kRemoveFlag(Int64, Int64) |
Removes the flag.
| |
| kRemoveFlagT(Enum, T) |
Removes the flag.
| |
| kRemoveHTML |
Removes the HTML tags from a string.
| |
| kSaveToCSVFileT(IEnumerableT, String) |
Saves an Inumerable class/model to CSV file.
| |
| kSaveToCSVFileT(IListT, String) |
Saves an Inumerable class/model to CSV file.
| |
| kSaveToJsonFileT |
Saves a class in JSON format to a file
| |
| kSemiAnnualInfo |
Returns all information relative to a Business Quarter (or Fiscal year quarters)
SemiAnnual Dates are 10/1 - 3/31 and 4/1 - 9/30 (Default)
!Default is HARDCODED, fiscal year change will require method modification!
| |
| kSplice |
Splices the specified string.
| |
| kStepChar |
Returns a RangeIterator over the given range, where the stepping function
is to step by the given number of characters.
| |
| kStuff |
Stuffs the specified string.
| |
| kThrowIfNullT(T) |
Throws an ArgumentNullException if the given data item is null.
No parameter name is specified.
| |
| kThrowIfNullT(T, String) |
Throws an ArgumentNullException if the given data item is null.
| |
| kToT |
Creates an inclusive range between two values. The default comparer is used
to compare values.
| |
| kToByteWithDefault |
To the byte.
| |
| kToDecimalWithDefault |
To the decimal.
| |
| kToDoubleWithDefault |
Double to Default
| |
| kToInt16WithDefault |
To the int16.
| |
| kToInt32WithDefault |
To the int32.
| |
| kToInt64WithDefault |
To the int64.
| |
| kToSafeSQL |
Removes/fixes single quotes from strings used in SQL Queries.
| |
| kToSByteWithDefault |
To an SByte with default on fail
| |
| kToSingleWithDefault |
Single or default
| |
| kToUInt16WithDefault |
To the u int16.
| |
| kToUInt32WithDefault |
To the u int32.
| |
| kToUInt64WithDefault |
To the u int64.
| |
| kTruncate |
Truncates a string to maxLength. Returns string if less than maxlength or null
| |
| kWith |
Replace string.Format() with .With(params[]).
| |
| kWriteString(MemoryStream, String) |
Writes the specified string into the memory stream
| |
| kWriteString(MemoryStream, String, Encoding) |
Writes the specified string into the memory stream
|