static EmailNotificationSettings()
 {
     try
     {
         AvistaESBCommonSection section = AvistaESBCommonSection.GetSection();
         emailNotificationSettingsCollection = section.EmailNotificationSettings;
         smtpServerName     = section.EmailNotificationSettings.SmtpServerName;
         defaultFromAddress = section.EmailNotificationSettings.DefaultFromAddress;
         emailSubject       = section.EmailNotificationSettings.EmailSubject;
     }
     catch (Exception)
     {
         // If the values cannot be loaded, default values will be used.
     }
 }
示例#2
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 public OrchestrationContext()
 {
     // Load information from the application configuration.
     try
     {
         AvistaESBCommonSection section = AvistaESBCommonSection.GetSection();
         environment = section.Context.Environment;
         trace       = section.Context.Trace;
     }
     catch (Exception)
     {
         // If the values cannot be loaded, default values will be used.
     }
     // Load information from the service context.
     try
     {
         serviceName = Context.RootService.Name;
         instanceId  = Context.RootService.InstanceId.ToString();
     }
     catch (Exception)
     {
         // If the values cannot be loaded, default values will be used.
     }
 }