예제 #1
0
 public static void Add(this RequestHeaders headers, string name, Guid value)
 {
     headers.Add(name, value.ToString());
 }
예제 #2
0
 public static void Add(this RequestHeaders headers, string name, byte[] value)
 {
     headers.Add(name, Convert.ToBase64String(value));
 }
예제 #3
0
 public static void Add(this RequestHeaders headers, string name, TimeSpan value, string format)
 {
     headers.Add(name, TypeFormatters.ToString(value, format));
 }
예제 #4
0
 public static void Add(this RequestHeaders headers, string name, int value)
 {
     headers.Add(name, value.ToString(TypeFormatters.DefaultNumberFormat, CultureInfo.InvariantCulture));
 }
예제 #5
0
 public static void Add(this RequestHeaders headers, string name, bool value)
 {
     headers.Add(name, TypeFormatters.ToString(value));
 }
 public static void Add <T>(this RequestHeaders headers, string name, T value) where T : struct
 {
     headers.Add(name, value.ToString() !);
 }
 public static void AddDelimited <T>(this RequestHeaders headers, string name, IEnumerable <T> value, string delimiter)
 {
     headers.Add(name, string.Join(delimiter, value));
 }