Show / Hide Table of Contents

Class DumpHelper

Helps to get the current state (values of properties) of the provided object.

Inheritance
System.Object
DumpHelper
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: OpenSilver
Assembly: OpenSilver.dll
Syntax
public static class DumpHelper

Methods

| Improve this Doc View Source

DumpProperties(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>
| Improve this Doc View Source

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

| Improve this Doc View Source

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.

  • Improve this Doc
  • View Source