C# Class Engage.Dnn.TellAFriend.Utility

Utility Class for Engage: Tell-A-Friend
Show file Open project: EngageSoftware/Engage-Tell-a-Friend

Public Methods

Method Description
AddJQueryReference ( ) : void

Adds the a reference to jQuery.

AddJavaScriptResource ( Page page, string scriptName ) : void

Adds a reference to the JavaScript (embedded) resource with the given scriptName to the given page.

GetBooleanSetting ( IDictionary settings, string settingName, bool defaultValue ) : bool

Gets the given setting as a bool, or defaultValue if the setting hasn't been set.

GetStringSetting ( Hashtable settings, string settingName, string defaultValue ) : string

Gets the given setting as a string, or defaultValue if the setting is not set.

Private Methods

Method Description
GetJavaScriptResourceName ( string scriptName ) : string

Gets the full name of the JavaScript (embedded) resource with the given name, providing a debug version if compiled in Debug mode, and a minified version in Release mode.

Method Details

AddJQueryReference() public static method

Adds the a reference to jQuery.
public static AddJQueryReference ( ) : void
return void

AddJavaScriptResource() public static method

Adds a reference to the JavaScript (embedded) resource with the given scriptName to the given page.
is null
public static AddJavaScriptResource ( Page page, string scriptName ) : void
page System.Web.UI.Page The page to which the reference needs to be added.
scriptName string Name of the script (without file extension).
return void

GetBooleanSetting() public static method

Gets the given setting as a bool, or defaultValue if the setting hasn't been set.
or are null
public static GetBooleanSetting ( IDictionary settings, string settingName, bool defaultValue ) : bool
settings IDictionary The settings collection.
settingName string Name of the setting.
defaultValue bool The default value.
return bool

GetStringSetting() public static method

Gets the given setting as a string, or defaultValue if the setting is not set.
public static GetStringSetting ( Hashtable settings, string settingName, string defaultValue ) : string
settings System.Collections.Hashtable The settings collection.
settingName string Name of the setting.
defaultValue string The default value.
return string