The methods of the MainUtil class are listed below. For a complete list of MainUtil class members, see the MainUtil Members topic.
![]() AcquireLock | Acquires a named lock. |
![]() AddArrays | Concatenates two arrays. |
![]() AppendMissingIDBrace | Appends a mssing closing brace "}" if a path starts with a brace "{". |
![]() BoolToString | Converts a boolean to "true" or "false". |
![]() BuildHashtable | Builds the hashtable. |
![]() Capitalize | Obsolete. Uppercases the first letter of a string and lowercases the remaining letters. |
![]() ClearBit | Resets a bit in an integer. |
![]() CompactArray | Overloaded. Compacts an object array by removing null values. |
![]() CompareVersionNumbers | Compares two Sitecore version numbers. |
![]() ConvertArray | Converts an array to another type. |
![]() ConvertToHashtable | Converts an array list to a hashtable. |
![]() ConvertToNameValues | Overloaded. Converts an array list to a name/value collection. |
![]() ConvertToString | Overloaded. Converts an array list of strings to a single string. |
![]() CopyArray | Inserts an array into another array. |
![]() CreateObject | Overloaded. Creates an instance of an object. |
![]() DecodeName | Decodes an item name. |
![]() EncodeName | Encodes an item name. |
![]() EncodePath | Encodes an item path. |
![]() EscapePling | Escapes plings (') or quotes (") in a HTML tag attribute value. |
![]() ExpandArray | Overloaded. Expands the array. |
![]() ExpandSitecorePath | Expands the sitecore path. |
![]() FindStartTag | Finds an end tag in a string. |
![]() FormatSize | Formats a number into a size string. |
![]() GarbageCollect | Performs garbage collection to keep memory usage down. |
![]() GenerateShortID | Generates a short unique ID. |
![]() GetArrayList | Gets an array list of strings. |
![]() GetAssemblyName | Gets the name of the assembly containing a type. |
![]() GetBackupFilename | Gets a filename for a backup file. |
![]() GetBool | Overloaded. Gets the boolean value of a string. |
![]() GetCallerMethod | Gets a reference to a method on the call stack. |
![]() GetCallerName | Gets name of the calling method. |
![]() GetCallerType | Gets the caller type. |
![]() GetDotNetFolder | Gets the root folder of the current .NET Framework. |
![]() GetDotNetVersion | Gets the version of the current .NET Framework. |
![]() GetExceptionMessage | Gets the message from an exception. |
![]() GetExtraEntries | Gets the extra entries in one hashtable compared to another. |
![]() GetFileLock | Obsolete. Gets file specific lock object. |
![]() GetFileTime | Obsolete. Gets the last modified time of a file. |
![]() GetFileWriteTime | Obsolete. Gets the last modified time of a file. |
![]() GetGuid | Overloaded. Gets a guid from a string. |
![]() GetHashtable | Gets a Hashtable from a list of objects. |
![]() GetID | Overloaded. Gets the ID. |
![]() GetImage | Overloaded. Gets an image HTML tag. |
![]() GetInt | Gets the integer value of a string. |
![]() GetMemoryUsed | Uses the get memory. |
![]() GetNameValues | Overloaded. Converts a string to a name/value collection. |
![]() GetNewID | Generates a new GUID. |
![]() GetNextSequence | Gets next value of the sequencer. |
![]() GetNextVarNameSequence | Gets next value of the variable name sequencer, optionally resetting it if it has reached a certain maximum. |
![]() GetObject | Gets an object reference. |
![]() GetPagefileUsage | Gets current page file usage. |
![]() GetProcessInfo | Get current process info. |
![]() GetProcessMemoryInfo | Win32 memory method. |
![]() GetRequestFlag | Gets a boolean flag from the query string. |
![]() GetRequestInt | Gets an integer from the query string. |
![]() GetSequencer | Gets the current sequencer value. |
![]() GetSortKey | Overloaded. Generates a unique sort key. |
![]() GetSpacer | Overloaded. Gets an image HTML tag with a blank image. |
![]() GetString | Overloaded. Gets the string value of an object. |
![]() GetStringList | Gets an array list of strings. |
![]() GetThreadID | Gets the current thread ID. |
![]() GetTristate | Gets the tristate. |
![]() GetWebItemSource | Overloaded. Gets the web item data source from the query string. |
![]() GetWord | Gets n'th word from a string. |
![]() GetWorkFileName | Gets a unique filename. |
![]() GetWorkingSetSize | Gets size of current working set. |
![]() GuidToString | Overloaded. Converts guid to string. |
![]() HexToColor | Hexs color of the to. |
![]() HexToInt | Hexs to integer. |
![]() Html | Writes a line of HTML to the Response output stream. |
![]() IndexOf | Gets the index of an object in an array. |
![]() IntToHex | Ints to hex. |
![]() IsBitSet | Gets a value indicating whether the current instance is bit set. |
![]() IsEmpty | Gets a value indicating whether the current instance is empty. |
![]() IsFullPath | Gets a value indicating whether the current instance is full path. |
![]() IsID | Checks if string is a valid GUID. |
![]() IsType | Checks if an object is of a given type |
![]() IsXPath | Checks if a string contains an XPath expression. |
![]() Join | Overloaded. Joins two strings excluding any empty string from the result. |
![]() MakeFilePath | Overloaded. Builds a file path from a folder and a file. |
![]() MakePath | Obsolete. Makes a path from two filename parts. |
![]() MapPath | Maps a virtual file path to a physical file path. |
![]() MsgBox | Overloaded. Shows a message box. |
![]() NormalizeGuid | Overloaded. Normalizes a GUID. |
![]() NormalizeItemName | Normalizes an item name. |
![]() Out | Overloaded. Writes a line of HTML to the Response output stream. |
![]() ReadFromFile | Obsolete. Reads a text file. |
![]() ReleaseLock | Release a named lock |
![]() RemoveEmptyStrings | Removes the empty strings. |
![]() RemoveEnd | Removes a number of characters from the end of a string. |
![]() RemoveFromArray | Removes from array. |
![]() RemoveStart | Remove the first characters from a string. |
![]() ReplaceItemIDs | Replaces all item IDs in an XML document with new GUIDs. |
![]() ReplacePostfix | Replaces the postfix of a string. |
![]() ReplacePrefix | Replaces the prefix of a string. |
![]() SendMail | Sends the mail. |
![]() SetBit | Sets the bit. |
![]() ShortenGuid | Shortens a GUID by removing braces and hyphens. |
![]() ShrinkArray | Overloaded. Compacts an object array by removing nulls. |
![]() Split | Overloaded. Splits a string into an array of strings. |
![]() SplitPath | Splits a Sitecore path into parts, optionally expanding it to include the root. |
![]() StringToBool | Converts a string to boolean. |
![]() Substring | Overloaded. Retrieves a substring from a string. The substring starts at a specified character position and has a specified length. |
![]() ThemedImage | Overloaded. Gets a themed image path. |
![]() Trace | Writes a message to the trace. |
![]() TraceIf | Conditionally writes a message to the trace. |
![]() TristateToString | Stres tristate to. |
![]() UnmapPath | Maps a physical path to a virtual path. |
![]() Unquote | Obsolete. Removes enclosing single and double quotes from a string. |
![]() Warn | Writes a warning message to the trace. |
![]() WriteToFile | Overloaded. |
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object. |
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. |
GetType (inherited from Object) | Gets the Type of the current instance. |
ToString (inherited from Object) | Returns a String that represents the current Object. |
Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. |
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object. |
MainUtil Class | Sitecore Namespace | DateUtil | FileUtil | HtmlUtil | SqlUtil | StringUtil | WebUtil | XmlUtil