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

GetService() public method

public GetService ( string service ) : Service
service string
return Service
        public Service GetService(string service)
        {
            return Services.FirstOrDefault(s => String.Equals(s.Name, service, StringComparison.OrdinalIgnoreCase));
        }

Usage Example

Ejemplo n.º 1
0
        public Service GetService(int datacenter, string name)
        {
            Datacenter dc = this[datacenter];

            if (dc == null)
            {
                throw new KeyNotFoundException(String.Format(
                                                   CultureInfo.CurrentCulture,
                                                   Strings.DeploymentEnvironment_UnknownDatacenter,
                                                   datacenter));
            }
            return(dc.GetService(name));
        }
All Usage Examples Of NuGet.Services.Operations.Model.Datacenter::GetService