Swiss Army Knife
General utility tools for Scada Minds
Static Public Member Functions | List of all members
ObjectExtensions Class Reference

Extensions that can go on every object. Such as printing the object to JSON. More...

Static Public Member Functions

static string AsJson (this object objectToSerialize)
 Creates an object and turns it into a compact JSON string Converts Enums to their string values. More...
 
static string AsIndentedJson (this object objectToSerialize)
 Creates an object and turns it into an indented JSON string Converts Enums to their string values. More...
 
static string ToIndentedJson (this object objectToSerialize)
 Creates an object and turns it into an indented JSON string Converts Enums to their string values. More...
 
static string ToJson (this object objectToSerialize)
 Creates an object and turns it into a compact JSON string Converts Enums to their string values. More...
 
static void PrintAsJson (this object objectToPrint)
 Shortcut for Console.Writeline(object.ToIndentedJson()) Use only for debugging purposes. More...
 

Detailed Description

Extensions that can go on every object. Such as printing the object to JSON.

Member Function Documentation

◆ AsIndentedJson()

static string AsIndentedJson ( this object  objectToSerialize)
inlinestatic

Creates an object and turns it into an indented JSON string Converts Enums to their string values.

◆ AsJson()

static string AsJson ( this object  objectToSerialize)
inlinestatic

Creates an object and turns it into a compact JSON string Converts Enums to their string values.

◆ PrintAsJson()

static void PrintAsJson ( this object  objectToPrint)
inlinestatic

Shortcut for Console.Writeline(object.ToIndentedJson()) Use only for debugging purposes.

◆ ToIndentedJson()

static string ToIndentedJson ( this object  objectToSerialize)
inlinestatic

Creates an object and turns it into an indented JSON string Converts Enums to their string values.

◆ ToJson()

static string ToJson ( this object  objectToSerialize)
inlinestatic

Creates an object and turns it into a compact JSON string Converts Enums to their string values.


The documentation for this class was generated from the following file: