Skip to content

Commit 2e5af38

Browse files
committed
Update PnPDevice.cs
1 parent 394fe76 commit 2e5af38

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/PnP/PnPDevice.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ protected unsafe PnPDevice(string instanceId, DeviceLocationFlags flags)
109109
/// </summary>
110110
/// <remarks>
111111
/// This method removes and re-enumerates (adds) the device note, which might cause unintended side effects. If
112-
/// this is the behaviour you seek, consider using <see cref="RemoveAndSetup" /> instead. This method remains here for
112+
/// this is the behavior you seek, consider using <see cref="RemoveAndSetup" /> instead. This method remains here for
113113
/// backwards compatibility.
114114
/// </remarks>
115115
[Obsolete("This method can cause unintended side-effects, see remarks for details.")]
@@ -172,6 +172,7 @@ public unsafe void Remove()
172172
/// <param name="excludeIfMatches">Returns false if the given predicate is true.</param>
173173
/// <returns>True if this device originates from an emulator, false otherwise.</returns>
174174
/// <example>
175+
/// <code>
175176
/// bool isVirtualDevice = pnpDevice.IsVirtual(pDevice =&gt;
176177
/// {
177178
/// List&lt;string&gt;? hardwareIds = pDevice.GetProperty&lt;string[]&gt;
@@ -187,8 +188,9 @@ public unsafe void Remove()
187188
/// };
188189
/// return hardwareIds.Any(id =&gt; excludedIds.Contains(id.ToUpperInvariant()));
189190
/// });
191+
/// </code>
190192
/// </example>
191-
public bool IsVirtual(Func<IPnPDevice, bool>? excludeIfMatches = default)
193+
public bool IsVirtual(Func<IPnPDevice, bool>? excludeIfMatches = null)
192194
{
193195
IPnPDevice device = this;
194196

0 commit comments

Comments
 (0)