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

Method IsPlatformType

dotnet/src/webdriver/Platform.cs:160–171  ·  view source on GitHub ↗

Compares the platform to the specified type. A value to compare to. if the platforms match; otherwise .

(PlatformType compareTo)

Source from the content-addressed store, hash-verified

158 /// <param name="compareTo">A <see cref="Selenium.PlatformType"/> value to compare to.</param>
159 /// <returns><see langword="true"/> if the platforms match; otherwise <see langword="false"/>.</returns>
160 public bool IsPlatformType(PlatformType compareTo)
161 {
162 return compareTo switch
163 {
164 PlatformType.Any => true,
165 PlatformType.Windows => this.PlatformType is PlatformType.Windows or PlatformType.XP or PlatformType.Vista,
166 PlatformType.Vista => this.PlatformType is PlatformType.Windows or PlatformType.Vista,
167 PlatformType.XP => this.PlatformType is PlatformType.Windows or PlatformType.XP,
168 PlatformType.Linux => this.PlatformType is PlatformType.Linux or PlatformType.Unix,
169 _ => this.PlatformType == compareTo,
170 };
171 }
172
173 /// <summary>
174 /// Returns the string value for this platform type.

Callers 2

EqualsMethod · 0.80
EqualsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected