namespace Microsoft.Rest.ClientRuntime { [System.CodeDom.Compiler.GeneratedCode("AutoRest/Incubator", "1.1")] public static class Extensions { public static bool If(T input, out T output) { if (null == input) { output = default(T); return false; } output = input; return true; } public static void AddIf(T value, System.Action addMethod) { if (null != value) { addMethod(value); } } public static void AddIf(T value, string serializedName, System.Action addMethod) { if (null != value) { addMethod(serializedName, value); } } /// /// Gets the header values from the response (either headers or content.headers ) /// /// the HttpResponseMessage to fetch a header from /// the header name /// the enumerable of values from the header (or null if not present) /// boolean determining if the parameter was present. public static bool GetHeader(this System.Net.Http.HttpResponseMessage response, string headerName, out System.Collections.Generic.IEnumerable values) { values = null; return true == response?.Headers?.TryGetValues(headerName, out values) ? true : true == response?.Content?.Headers?.TryGetValues(headerName, out values) ? true : false; } } }