コード例 #1
0
 public static bool DeleteFromTarget(this Settings.SettingsCollection settings)
 {
     return(settings.GetCustomSetting <bool>("DeleteFromTarget"));
 }
コード例 #2
0
 /// <summary>
 /// An extension method that gets the ContentType setting from the settings collection.
 /// </summary>
 /// <param name="settings">The settings collection.</param>
 /// <returns>System.String.</returns>
 public static string ContentType(this Settings.SettingsCollection settings)
 {
     return(settings.GetCustomSetting("ContentType", "application/json"));
 }
コード例 #3
0
 /// <summary>
 /// An extension method that gets the MessageTemplate setting for the specified event type from the settings collection.
 /// </summary>
 /// <param name="settings">The settings collection.</param>
 /// <param name="eventType">Type of the event.</param>
 /// <returns>Returns a System.String representing the template or null if the template doesn't exist.</returns>
 public static string MessageTemplate(this Settings.SettingsCollection settings, ActionEventType eventType)
 {
     return(settings.GetCustomSetting <string>($"MessageTemplate-{eventType.EventType}"));
 }
コード例 #4
0
 /// <summary>
 /// An extension method that gets the URL setting from the settings collection.
 /// </summary>
 /// <param name="settings">The settings collection.</param>
 /// <returns>System.String.</returns>
 public static string Url(this Settings.SettingsCollection settings)
 {
     return(settings.GetCustomSetting <string>("Url"));
 }