NuGet.Services.Operations.Model.Datacenter.GetServiceUri C# (CSharp) Method

GetServiceUri() public method

public GetServiceUri ( string service ) : Uri
service string
return System.Uri
        public Uri GetServiceUri(string service)
        {
            Service svc = GetService(service);
            if (svc == null)
            {
                return null;
            }
            return svc.Uri;
        }

Usage Example

Ejemplo n.º 1
0
        public Uri GetServiceUri(int datacenter, string service)
        {
            Datacenter dc = this[datacenter];

            if (dc == null)
            {
                throw new KeyNotFoundException(String.Format(
                                                   CultureInfo.CurrentCulture,
                                                   Strings.DeploymentEnvironment_UnknownDatacenter,
                                                   datacenter));
            }
            return(dc.GetServiceUri(service));
        }