Disco.Services.DeviceDetailExtensions.GetDetail C# (CSharp) Метод

GetDetail() приватный статический Метод

private static GetDetail ( this details, string Scope, string Key ) : string
details this
Scope string
Key string
Результат string
        private static string GetDetail(this IEnumerable<DeviceDetail> details, string Scope, string Key)
        {
            if (details == null)
                throw new ArgumentNullException("details");
            if (string.IsNullOrEmpty(Scope))
                throw new ArgumentNullException("Scope");
            if (string.IsNullOrEmpty(Key))
                throw new ArgumentNullException("Key");

            var detail = details.Where(d => d.Key == Key).FirstOrDefault();

            if (detail == null)
                return null;
            else
                return detail.Value;
        }