private static Type?GetType(ExportLaunchProfileExtensionValueProviderScope scope) { return(scope switch { ExportLaunchProfileExtensionValueProviderScope.LaunchProfile => typeof(ILaunchProfileExtensionValueProvider), ExportLaunchProfileExtensionValueProviderScope.GlobalSettings => typeof(IGlobalSettingExtensionValueProvider), _ => null });
/// <summary> /// Initializes a new instance of the <see cref="ExportLaunchProfileExtensionValueProviderAttribute"/> /// class for multiple intercepted properties. /// </summary> public ExportLaunchProfileExtensionValueProviderAttribute(string[] propertyNames, ExportLaunchProfileExtensionValueProviderScope scope) : base(GetType(scope)) { PropertyNames = propertyNames; }
/// <summary> /// Initializes a new instance of the <see cref="ExportLaunchProfileExtensionValueProviderAttribute"/> /// class for a single intercepted property. /// </summary> public ExportLaunchProfileExtensionValueProviderAttribute(string propertyName, ExportLaunchProfileExtensionValueProviderScope scope) : this(new[] { propertyName }, scope) { }