Table of Contents

Class UtilsNonNetStandard

Namespace
SunamoShared.Crypting
Assembly
SunamoShared.dll

Shared utility methods used by multiple encryption classes.

public class UtilsNonNetStandard
Inheritance
UtilsNonNetStandard
Inherited Members
Extension Methods

Methods

GetConfigString(string, bool)

Returns the specified string value from the application .config file.

public static string GetConfigString(string key, bool isRequired)

Parameters

key string

The config key to retrieve.

isRequired bool

Whether the key is required (throws if missing).

Returns

string

GetXmlElement(string, string)

Retrieves the content of a named element from an XML string.

public static string GetXmlElement(string xml, string element)

Parameters

xml string

The XML string to search in.

element string

The element name to find.

Returns

string

WriteConfigKey(string, string)

Returns an XML config key element string in the format: <add key="..." value="..." />

public static string WriteConfigKey(string key, string value)

Parameters

key string

The config key name.

value string

The config key value.

Returns

string

WriteXmlElement(string, string)

Returns an XML element string with the specified name and value.

public static string WriteXmlElement(string element, string value)

Parameters

element string

The element name.

value string

The element value.

Returns

string

WriteXmlNode(string, bool)

Returns an opening or closing XML tag for the specified element.

public static string WriteXmlNode(string element, bool isClosing)

Parameters

element string

The element name.

isClosing bool

Whether to return a closing tag.

Returns

string