Class DumpHelper
Helps to get the current state (values of properties) of the provided object.
Inheritance
Inherited Members
Namespace: OpenSilver
Assembly: OpenSilver.dll
Syntax
public static class DumpHelper
Methods
| Improve this Doc View SourceDumpProperties(String, String[])
Retrieves a dictionary of properties and corresponding values of the provided element by it's id.
Declaration
[JSInvokable]
public static IDictionary<string, string> DumpProperties(string elementId, params string[] names)
Parameters
Type | Name | Description |
---|---|---|
System.String | elementId | Html id of an element. |
System.String[] | names | Names of properties, provided as string of names separated by comma (,). Null or empty value means all public properties are return. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.String> |
GetPropertiesAndValues(Object, String[])
Retrieves a dictionary of properties and corresponding values of the provided object.
Declaration
public static IDictionary<string, object> GetPropertiesAndValues(object obj, params string[] names)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Object to get properties. |
System.String[] | names | Names of properties, provided as string of names separated by comma (,). Null or empty value means all public properties are return. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Provided object is null |
PrintProperties(Object, String[])
Prints properties and corresponding values to console.
Declaration
public static void PrintProperties(object element, params string[] names)
Parameters
Type | Name | Description |
---|---|---|
System.Object | element | |
System.String[] | names | Names of properties, provided as string of names separated by comma (,). Null or empty value means all public properties are return. |