/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (FromAddress != null) { hashCode = hashCode * 59 + FromAddress.GetHashCode(); } if (HostPrefix != null) { hashCode = hashCode * 59 + HostPrefix.GetHashCode(); } if (NotifyOnabort != null) { hashCode = hashCode * 59 + NotifyOnabort.GetHashCode(); } if (NotifyOncomplete != null) { hashCode = hashCode * 59 + NotifyOncomplete.GetHashCode(); } if (NotifyOncontainercomplete != null) { hashCode = hashCode * 59 + NotifyOncontainercomplete.GetHashCode(); } if (NotifyUseronly != null) { hashCode = hashCode * 59 + NotifyUseronly.GetHashCode(); } return(hashCode); } }
public AsyncCallbackService(AsyncCallbackRepository repo, AppConf conf) : base(repo, conf) { HostPrefix = new HostPrefix { HostName = Machine.Current.DnsName, Port = RandomNumber.Between(49152, 65535) }; AsyncCallbackRepository = repo; _pendingRequests = new ConcurrentDictionary <string, Action <AsyncExecutionResponse> >(); }
public static void StartTrooServer(ConsoleLogger logger, IRepository repo) { BamConf conf = BamConf.Load(DefaultConfiguration.GetAppSetting(contentRootConfigKey).Or(defaultContentRoot)); trooServer = new TrooServer(conf, logger, repo) { HostPrefixes = new HashSet <HostPrefix>(HostPrefix.FromDefaultConfiguration()), MonitorDirectories = DefaultConfiguration.GetAppSetting("MonitorDirectories").DelimitSplit(",", ";") }; trooServer.Start(); }
public static void StartGlooServer(ConsoleLogger logger) { BamConf conf = BamConf.Load(DefaultConfiguration.GetAppSetting(contentRootConfigKey).Or(defaultContentRoot)); glooServer = new GlooServer(conf, logger, GetArgument("verbose", "Log responses to the console?").IsAffirmative()) { HostPrefixes = new HashSet <HostPrefix>(HostPrefix.FromDefaultConfiguration("localhost", 9100)), MonitorDirectories = DefaultConfiguration.GetAppSetting("MonitorDirectories").DelimitSplit(",", ";") }; glooServer.Start(); }
public override void Start() { HostPrefix[] copy = new HostPrefix[HostPrefixes.Count]; HostPrefixes.CopyTo(copy); ServiceSubdomains.Each(sub => { copy.Each(hp => { HostPrefixes.Add(hp.FromServiceSubdomain(sub)); }); }); base.Start(); }
public static HostPrefix[] GetConfiguredHostPrefixes() { int port = int.Parse(DefaultConfiguration.GetAppSetting("Port", "80")); bool ssl = DefaultConfiguration.GetAppSetting("Ssl").IsAffirmative(); List <HostPrefix> results = new List <HostPrefix>(); foreach (string hostName in DefaultConfiguration.GetAppSetting("HostNames").Or("localhost").DelimitSplit(",", true)) { HostPrefix hostPrefix = new HostPrefix() { HostName = hostName, Port = port, Ssl = ssl }; results.Add(hostPrefix); } return(results.ToArray()); }
/// <summary> /// Returns true if ComDayCqWorkflowImplEmailEMailNotificationServiceProperties instances are equal /// </summary> /// <param name="other">Instance of ComDayCqWorkflowImplEmailEMailNotificationServiceProperties to be compared</param> /// <returns>Boolean</returns> public bool Equals(ComDayCqWorkflowImplEmailEMailNotificationServiceProperties other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( FromAddress == other.FromAddress || FromAddress != null && FromAddress.Equals(other.FromAddress) ) && ( HostPrefix == other.HostPrefix || HostPrefix != null && HostPrefix.Equals(other.HostPrefix) ) && ( NotifyOnabort == other.NotifyOnabort || NotifyOnabort != null && NotifyOnabort.Equals(other.NotifyOnabort) ) && ( NotifyOncomplete == other.NotifyOncomplete || NotifyOncomplete != null && NotifyOncomplete.Equals(other.NotifyOncomplete) ) && ( NotifyOncontainercomplete == other.NotifyOncontainercomplete || NotifyOncontainercomplete != null && NotifyOncontainercomplete.Equals(other.NotifyOncontainercomplete) ) && ( NotifyUseronly == other.NotifyUseronly || NotifyUseronly != null && NotifyUseronly.Equals(other.NotifyUseronly) )); }
public static void StartVyooServer(ConsoleLogger logger) { DataSettings.Current.SetDefaultDatabaseFor <Session>(out Database userDb); userDb.TryEnsureSchema <Session>(); DataSettings.Current.SetDefaultDatabaseFor <SecureSession>(out Database sessionDb); sessionDb.TryEnsureSchema <SecureSession>(); BamConf conf = BamConf.Load(DefaultConfiguration.GetAppSetting(contentRootConfigKey).Or(defaultRoot)); AppConf[] appConfigs = conf.AppConfigs; List <HostPrefix> hostPrefixes = new List <HostPrefix>(HostPrefix.FromDefaultConfiguration("localhost", 7400)); string hostAppMapsFilePath = Path.Combine(conf.ContentRoot, "apps", hostAppMapsFileName); if (File.Exists(hostAppMapsFilePath)) { HostAppMap[] hostAppMaps = HostAppMap.Load(hostAppMapsFilePath); if (Arguments.Contains("apps")) { string[] appNamesToServe = Arguments["apps"].DelimitSplit(",", ";"); appConfigs = conf.AppConfigs.Where(ac => ac.Name.In(appNamesToServe)).ToArray(); hostPrefixes.AddRange(hostAppMaps.Where(ham => ham.AppName.In(appNamesToServe)).Select(ham => new HostPrefix { HostName = ham.Host, Port = 80 }).ToArray()); } else { hostPrefixes.AddRange(HostPrefix.FromHostAppMaps(hostAppMaps)); } } vyooServer = new VyooServer(appConfigs, logger, GetArgument("verbose", "Log responses to the console?").IsAffirmative()) { HostPrefixes = new HashSet <HostPrefix>(hostPrefixes), MonitorDirectories = DefaultConfiguration.GetAppSetting("MonitorDirectories").DelimitSplit(",", ";") }; vyooServer.Start(); }
public static ServiceProxyServer Serve <T>(this T service, HostPrefix hostPrefix, ILogger logger = null, BamConf conf = null) where T : ProxyableService { return(service.Serve <T>(logger, hostPrefix.HostName, hostPrefix.Port, hostPrefix.Ssl, conf)); }