15 writes to Unit
Microsoft.Net.Http.Headers.Tests (15)
ContentRangeHeaderValueTest.cs (15)
76range.Unit = "myunit"; 79Assert.Throws<ArgumentException>(() => range.Unit = null); 80Assert.Throws<ArgumentException>(() => range.Unit = ""); 81Assert.Throws<FormatException>(() => range.Unit = " x"); 82Assert.Throws<FormatException>(() => range.Unit = "x "); 83Assert.Throws<FormatException>(() => range.Unit = "x y"); 90range.Unit = "myunit"; 107range4.Unit = "BYTES"; 109range5.Unit = "myunit"; 125range4.Unit = "BYTES"; 127range5.Unit = "myunit"; 151new ContentRangeHeaderValue(1234567890123456789, 1234567890123456799) { Unit = "custom" }); 154new ContentRangeHeaderValue(123) { Unit = "custom" }); 182new ContentRangeHeaderValue(1234567890123456789, 1234567890123456799) { Unit = "custom" }); 185new ContentRangeHeaderValue(123) { Unit = "custom" });
10 references to Unit
Microsoft.Net.Http.Headers (4)
ContentRangeHeaderValue.cs (4)
152StringSegment.Equals(Unit, other.Unit, StringComparison.OrdinalIgnoreCase)); 158var result = StringSegmentComparer.OrdinalIgnoreCase.GetHashCode(Unit); 177sb.Append(Unit.AsSpan());
Microsoft.Net.Http.Headers.Tests (6)
ContentRangeHeaderValueTest.cs (6)
21Assert.Equal("bytes", range.Unit.AsSpan()); 42Assert.Equal("bytes", range.Unit.AsSpan()); 66Assert.Equal("bytes", range.Unit.AsSpan()); 77Assert.Equal("myunit", range.Unit.AsSpan()); 159Assert.Equal("bytes", result.Unit.AsSpan()); 190Assert.Equal("bytes", result.Unit.AsSpan());