Class Common
Common class will holds the common methods.
Inheritance
System.Object
Common
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.Olap.Common
Assembly: Syncfusion.Olap.Base.dll
Syntax
public class Common
Constructors
Common()
Initializes a new instance of the Common class.
Declaration
public Common()
Methods
DeserializeObject<T>(String)
De-serializes the object.
Declaration
public static T DeserializeObject<T>(string xml)
Parameters
Type | Name | Description |
---|---|---|
System.String | xml | The XML string. |
Returns
Type |
---|
T |
Type Parameters
Name |
---|
T |
SerializeObject<T>(T)
Serializes the object.
Declaration
public static string SerializeObject<T>(T obj)
Parameters
Type | Name | Description |
---|---|---|
T | obj | The object. |
Returns
Type |
---|
System.String |
Type Parameters
Name |
---|
T |
ToXml(Object, Boolean)
Converts object to XML string format.
Declaration
public static string ToXml(object objToXml, bool includeNameSpace)
Parameters
Type | Name | Description |
---|---|---|
System.Object | objToXml | The input object. |
System.Boolean | includeNameSpace | if set to |
Returns
Type |
---|
System.String |
ToXml(Object, String, Boolean)
Serializes a given object to the file given with the path
Declaration
public static void ToXml(object objToXml, string filePath, bool includeNameSpace)
Parameters
Type | Name | Description |
---|---|---|
System.Object | objToXml | Object wanted to be serialized to the file |
System.String | filePath | Path of the file |
System.Boolean | includeNameSpace | if set to |
XmlToFromFile(String, Type)
De-serializes the object given with the type from the given string
Declaration
public static object XmlToFromFile(string filePath, Type type)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | String containing the serialized xml form of the object |
System.Type | type | Type of the object to be de-serialized |
Returns
Type | Description |
---|---|
System.Object | Deserialized object |