MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / ParsePageRangePart

Method ParsePageRangePart

dotnet/src/webdriver/PrintOptions.cs:233–248  ·  view source on GitHub ↗
(string pageRangePart, int defaultValue)

Source from the content-addressed store, hash-verified

231 }
232
233 private static int ParsePageRangePart(string pageRangePart, int defaultValue)
234 {
235 pageRangePart = pageRangePart.Trim();
236
237 if (string.IsNullOrEmpty(pageRangePart))
238 {
239 return defaultValue;
240 }
241
242 if (int.TryParse(pageRangePart, NumberStyles.Integer, CultureInfo.InvariantCulture, out int pageRangePartValue))
243 {
244 return pageRangePartValue;
245 }
246
247 throw new ArgumentException("Parts of a page range must be an empty string or an integer");
248 }
249
250 /// <summary>
251 /// An object representing the page size of the print options.

Callers

nothing calls this directly

Calls 1

TrimMethod · 0.80

Tested by

no test coverage detected