Class Utils
Inheritance
System.Object
Utils
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Syncfusion.EJ.dll
Syntax
public static class Utils
Fields
dataManager
Declaration
public const string dataManager = "DataManager"
Field Value
Type |
Description |
System.String |
|
dataSource
Declaration
public const string dataSource = "dataSource"
Field Value
Type |
Description |
System.String |
|
ej
Declaration
public const string ej = "ej"
Field Value
Type |
Description |
System.String |
|
endBody
Declaration
public const string endBody = "</body></html>"
Field Value
Type |
Description |
System.String |
|
endDiv
Declaration
public const string endDiv = "\"></div>"
Field Value
Type |
Description |
System.String |
|
endHead
Declaration
public const string endHead = "</head>"
Field Value
Type |
Description |
System.String |
|
endScript
Declaration
public const string endScript = "});</script>"
Field Value
Type |
Description |
System.String |
|
Grid
Declaration
public const string Grid = "Grid"
Field Value
Type |
Description |
System.String |
|
handleEvent
Declaration
public const string handleEvent = "([a-z:\\,])"
Field Value
Type |
Description |
System.String |
|
replaceEvent
Declaration
public const string replaceEvent = "{*}*"
Field Value
Type |
Description |
System.String |
|
startBody
Declaration
public const string startBody = "<body>"
Field Value
Type |
Description |
System.String |
|
startDiv
Declaration
public const string startDiv = "<div id=\""
Field Value
Type |
Description |
System.String |
|
startHead
Declaration
public const string startHead = "<!DOCTYPE html><html><head><meta http-equiv='X-UA-Compatible' content='IE=edge' />"
Field Value
Type |
Description |
System.String |
|
startScript
Declaration
public const string startScript = "<script type='text/javascript'>$(function($){"
Field Value
Type |
Description |
System.String |
|
table
Declaration
public const string table = "#([A-Za-z0-9_])"
Field Value
Type |
Description |
System.String |
|
Methods
AutoIncrementKey(IDictionary<String, Object>, String, Object, Int32)
Extension method to insert by automatically calculate the key value.
Declaration
public static string AutoIncrementKey(this IDictionary<string, object> inputdict, string prefix, object value, int start = 0)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
inputdict |
The input dictionary
|
System.String |
prefix |
The prefix appended with the generated key
|
System.Object |
value |
The value to be added in the target dictionary
|
System.Int32 |
start |
Optional parameter which indicates the start of the key value. By default 0
|
Returns
Type |
Description |
System.String |
Returns th key with which new value added
|
CreateSanitizedId(String)
Declaration
public static string CreateSanitizedId(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.String |
|
DataTableToJson(DataTable)
Declaration
public static IEnumerable<Dictionary<string, object>> DataTableToJson(DataTable dt)
Parameters
Type |
Name |
Description |
System.Data.DataTable |
dt |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.Collections.Generic.Dictionary<System.String, System.Object>> |
|
DefaultNullableValueHandler(PropertyInfo, Object)
Declaration
public static bool DefaultNullableValueHandler(PropertyInfo inputObject, object baseObject)
Parameters
Type |
Name |
Description |
System.Reflection.PropertyInfo |
inputObject |
|
System.Object |
baseObject |
|
Returns
Type |
Description |
System.Boolean |
|
DefaultValueHandler(PropertyInfo, Object)
Declaration
public static bool DefaultValueHandler(PropertyInfo inputObject, object baseObject)
Parameters
Type |
Name |
Description |
System.Reflection.PropertyInfo |
inputObject |
|
System.Object |
baseObject |
|
Returns
Type |
Description |
System.Boolean |
|
DeserializeToModel(Type, String)
Declaration
public static object DeserializeToModel(Type modelType, string modelString)
Parameters
Type |
Name |
Description |
System.Type |
modelType |
|
System.String |
modelString |
|
Returns
Type |
Description |
System.Object |
|
DeserializeToModel(Type, String, List<String>)
Declaration
public static IDictionary<string, object> DeserializeToModel(Type modelType, string modelString, List<string> additionalProperties)
Parameters
Type |
Name |
Description |
System.Type |
modelType |
|
System.String |
modelString |
|
System.Collections.Generic.List<System.String> |
additionalProperties |
|
Returns
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
|
EmptyDatasourceText(String)
Declaration
public static HtmlString EmptyDatasourceText(string EmptyDataText)
Parameters
Type |
Name |
Description |
System.String |
EmptyDataText |
|
Returns
Type |
Description |
System.Web.HtmlString |
|
EscapeString(String)
Escape special charaters in string literals.
Declaration
public static string EscapeString(string input)
Parameters
Type |
Name |
Description |
System.String |
input |
The input object.
|
Returns
Type |
Description |
System.String |
escaped string
|
GetJsonPair()
Declaration
public static Dictionary<string, string> GetJsonPair()
Returns
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.String> |
|
GetJsonPair(Boolean)
Declaration
public static Dictionary<string, string> GetJsonPair(bool reset)
Parameters
Type |
Name |
Description |
System.Boolean |
reset |
|
Returns
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.String> |
|
IsComplexObject(PropertyInfo)
Declaration
public static bool IsComplexObject(PropertyInfo property)
Parameters
Type |
Name |
Description |
System.Reflection.PropertyInfo |
property |
|
Returns
Type |
Description |
System.Boolean |
|
IsComplexObject(PropertyInfo, Object)
Declaration
public static bool IsComplexObject(PropertyInfo property, object propertyValue)
Parameters
Type |
Name |
Description |
System.Reflection.PropertyInfo |
property |
|
System.Object |
propertyValue |
|
Returns
Type |
Description |
System.Boolean |
|
IsComplexObject(Type)
Declaration
public static bool IsComplexObject(Type type)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
Returns
Type |
Description |
System.Boolean |
|
IsComplexObject(Type, Object)
Declaration
public static bool IsComplexObject(Type type, object propertyValue)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
System.Object |
propertyValue |
|
Returns
Type |
Description |
System.Boolean |
|
IsSimpleObject(Type, Object)
Declaration
public static bool IsSimpleObject(Type type, object propertyValue)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
System.Object |
propertyValue |
|
Returns
Type |
Description |
System.Boolean |
|
IsUnObtrusive()
Declaration
public static bool IsUnObtrusive()
Returns
Type |
Description |
System.Boolean |
|
IsUnObtrusiveInScriptManager()
Declaration
public static bool IsUnObtrusiveInScriptManager()
Returns
Type |
Description |
System.Boolean |
|
KeyValueToDictionary(List<KeyValue>, List<Dictionary<String, Object>>)
Utility method to convert KeyValue collection to Dictionary collection.
Declaration
public static void KeyValueToDictionary(List<KeyValue> target, List<Dictionary<string, object>> value)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<KeyValue> |
target |
|
System.Collections.Generic.List<System.Collections.Generic.Dictionary<System.String, System.Object>> |
value |
The value to be added in the target collection
|
PropertyCompare(Object, Object)
Declaration
public static bool PropertyCompare(object source, object destination)
Parameters
Type |
Name |
Description |
System.Object |
source |
|
System.Object |
destination |
|
Returns
Type |
Description |
System.Boolean |
|
ToJsonString(IDictionary)
Declaration
public static string ToJsonString(this IDictionary dic)
Parameters
Type |
Name |
Description |
System.Collections.IDictionary |
dic |
|
Returns
Type |
Description |
System.String |
|