public GrowlHealthCheckSessionPublisher(GrowlConfiguration config, IGrowlConnection connection) { myConfig = config; myGrowler = connection; Enabled = config.Enabled; FriendlyId = config.FriendlyId; }
public GrowlStartup(GrowlConfiguration config) { myConfig = config; myIdentity = new PluginDescriptor { Description = string.Format("Initalises a Growl connection"), TypeId = new Guid("D040058E-8E88-49d2-B9E1-4794CE92702F"), Name = "GrowlConnector" }; }
public GrowlHealthCheckResultPublisher(GrowlConfiguration config, IGrowlConnection connection, IGrowlNotificationFinaliser finaliser) { myConfig = config; myGrowl = connection; myNotificationFinaliser = finaliser; Enabled = config.Enabled; FriendlyId = config.FriendlyId; }
/// <summary> /// Initializes a new instance of the <see cref="T:System.Object"/> class. /// </summary> public GrowlConnection(GrowlConfiguration config) { myConfig = config; // create the growl connection and register it if (!string.IsNullOrEmpty(config.Password)) { myConnector = !string.IsNullOrEmpty(config.Hostname) ? new GrowlConnector(config.Password, config.Hostname, config.Port) : new GrowlConnector(config.Password); } else { myConnector = new GrowlConnector(); } var application = new Application(config.AppId); // use the defaul icon if no override set if (string.IsNullOrEmpty(config.IconFile)) { config.IconFile = DEFAULT_ICON; } var icon = new SmartLocation(config.IconFile); if (File.Exists(icon.Location)) { application.Icon = icon.Location; } var healthCheck = new NotificationType(config.NotificationId, config.NotificationTitle); myConnector.Register(application, new[] { healthCheck }); }