public override Task <KafkaService> Locate(string serviceName) { string longName; if (string.IsNullOrWhiteSpace(serviceName)) { longName = serviceName = "_kafka"; } else { longName = $"{serviceName.ToLowerInvariant()}._kafka"; } // get name of service to resolve ServiceDnsName name = new ServiceDnsName { Domain = ServiceDomain, ServiceName = serviceName, Protocol = "kafka", DnsName = string.IsNullOrEmpty(ServiceDomain) ? serviceName.ToLowerInvariant() : $"{longName}._tcp.{ServiceDomain}" }; return(Locate(name, _ => ServiceLookup.SrvTxt(name, KafkaServiceFactory))); }
public void Setup() { helper = new Mock <IHelper>(); service = new ServiceLookup(); service.LoadCalculatorPanelAsset(); calculatorPanel = new TestStandardCalculatorPanel( service.KeyChecker, service.NumberFormatter, service.ExpressionFormatter, new StandardCalculator( service.InputBuffer, service.Operators, service.UnitConverter, service.OperatorConverter, service.ExpressionBuilder, service.ExpressionParser, service.Evaluator, service.MemoryStorage ) ); }
public Task <DatabaseService> Locate(string serviceName, string protocol) { if (string.IsNullOrWhiteSpace(serviceName)) { throw new ArgumentNullException(nameof(serviceName)); } if (string.IsNullOrWhiteSpace(protocol)) { throw new ArgumentNullException(nameof(protocol)); } // lower-invariant protocol protocol = protocol.ToLowerInvariant(); // get name of service to resolve ServiceDnsName name = new ServiceDnsName { Domain = ServiceDomain, ServiceName = serviceName, Protocol = protocol, DnsName = string.IsNullOrEmpty(ServiceDomain) ? serviceName.ToLowerInvariant() : $"{serviceName.ToLowerInvariant()}._{protocol}._tcp.{ServiceDomain}" }; // locate and return return(Locate(name, _ => ServiceLookup.SrvTxt(name, DbServiceFactory))); }
public void Setup() { service = new ServiceLookup(); service.LoadCalculatorPanelAsset(); calculatorPanel = new TestScientificCalculatorPanel( service.KeyChecker, service.NumberFormatter, service.ExpressionFormatter, service.EngineeringFormatter, new ScientificCalculator( service.InputBuffer, service.Operators, service.UnitConverter, service.OperatorConverter, service.ExpressionBuilder, service.ExpressionParser, service.Evaluator, service.MemoryStorage ) ); }
private IEnumerable <UspsDeliveryOption> GetDeliveryOptions(int serviceCode, IShipment package) { IList <UspsDeliveryOption> options; if (!ServiceLookup.TryGetValue(serviceCode, out options)) { return(null); } return(options); }
public void Setup() { button = new Button(); service = new ServiceLookup(); service.LoadConverterPanelAsset(); converterPanel = new TestConverterPanel( service.InputBuffer, service.KeyChecker, service.NumberFormatter, new AngleConverter(), new ConverterDisplay(), new string[] { "Degrees", "Radians", "Gradians" } ); }
public Task <DatabaseService> Locate(DatabaseProtocol protocol) { // lower-invariant protocol & service name string protocolName = protocol.ToString().ToLowerInvariant(); string serviceName = $"_{protocolName}"; // get name of service to resolve ServiceDnsName name = new ServiceDnsName { Domain = ServiceDomain, ServiceName = serviceName, Protocol = protocolName, DnsName = string.IsNullOrEmpty(ServiceDomain) ? serviceName.ToLowerInvariant() : $"{serviceName.ToLowerInvariant()}._tcp.{ServiceDomain}" }; // locate and return return(Locate(name, _ => ServiceLookup.SrvTxt(name, DbServiceFactory))); }
public override Task <WebApiService> Locate(string serviceName) { if (string.IsNullOrWhiteSpace(serviceName)) { throw new ArgumentNullException(nameof(serviceName)); } // get name of service to resolve ServiceDnsName name = new ServiceDnsName { Domain = ServiceDomain, ServiceName = serviceName, Protocol = "http", DnsName = string.IsNullOrEmpty(ServiceDomain) ? serviceName.ToLowerInvariant() : $"{serviceName.ToLowerInvariant()}._http._tcp.{ServiceDomain}" }; return(Locate(name, _ => ServiceLookup.SrvTxt(name, WebApiServiceFactory))); }
public Task <GenericService> Locate(string serviceName, IpProtocol protocol) { if (string.IsNullOrWhiteSpace(serviceName)) { throw new ArgumentNullException(nameof(serviceName)); } // get name of service to resolve string sProtocol = protocol.ToString().ToLowerInvariant(); ServiceDnsName name = new ServiceDnsName { Domain = ServiceDomain, ServiceName = serviceName, Protocol = sProtocol, DnsName = string.IsNullOrEmpty(ServiceDomain) ? serviceName.ToLowerInvariant() : $"{serviceName.ToLowerInvariant()}._{sProtocol}.{ServiceDomain}" }; return(Locate(name, _ => ServiceLookup.SrvTxt(name, MyServiceFactory))); }
internal override SrvLookup <GrpcService> LocateFunction(string dnsName) => ServiceLookup.SrvTxt(Name, Factory);
internal virtual SrvLookup <GrpcService> LocateFunction(string dnsName) => ServiceLookup.Srv(Name, Factory);
public static void RegisterOpenAuth() { OpenAuth.AuthenticationClients.Add("Linked In", () => ServiceLookup.GetLinkedInService()); }