static DiscoveryType GetDiscoveryType(MicrosoftDiscoveryType discoveryType) { return(discoveryType switch { MicrosoftDiscoveryType.DeveloperConsole => DiscoveryType.DeveloperConsole, MicrosoftDiscoveryType.VisualStudioSetup => DiscoveryType.VisualStudioSetup, _ => throw new ArgumentException() });
/// <summary> /// Returns the <paramref name="value"/> in terms of a <see cref="DiscoveryType"/>. /// </summary> /// <param name="value"></param> /// <returns></returns> /// <see cref="Microsoft.Build.Locator.DiscoveryType"/> /// <see cref="DiscoveryType"/> public static DiscoveryType FromDiscoveryType(this Microsoft.Build.Locator.DiscoveryType value) => (DiscoveryType)(int)value;