1517 references to Enum
aspire (6)
Aspire.Dashboard (17)
Aspire.Dashboard.Components.Tests (1)
Aspire.Dashboard.Tests (3)
Aspire.EndToEnd.Tests (4)
Aspire.Hosting (6)
Aspire.Hosting.Azure.Tests (2)
Aspire.Hosting.CodeGeneration.Go (1)
Aspire.Hosting.CodeGeneration.Java (1)
Aspire.Hosting.CodeGeneration.Python (1)
Aspire.Hosting.CodeGeneration.Rust (2)
Aspire.Hosting.DevTunnels (1)
Aspire.Hosting.GitHub.Models (3)
Aspire.Hosting.Maui (3)
Aspire.Hosting.OpenAI (3)
Aspire.Hosting.RemoteHost (4)
Aspire.Hosting.RemoteHost.Tests (1)
Aspire.Hosting.Testing.Tests (2)
Aspire.Hosting.Tests (1)
Aspire.Hosting.Yarp (2)
Binding.Http.IntegrationTests (9)
BasicHttpBindingTests.4.0.0.cs (6)
37serviceProxy = factory.CreateChannel(new EndpointAddress(Endpoints.HttpBaseAddress_Basic + Enum.GetName(typeof(WSMessageEncoding), messageEncoding)));
76factory = new ChannelFactory<IWcfService>(customBinding, new EndpointAddress(Endpoints.HttpBaseAddress_Basic + Enum.GetName(typeof(WSMessageEncoding), messageEncoding)));
112factory = new ChannelFactory<IWcfService>(binding, new EndpointAddress(Endpoints.HttpBaseAddress_Basic + Enum.GetName(typeof(WSMessageEncoding), messageEncoding)));
158factory = new ChannelFactory<IWcfService>(binding, new EndpointAddress(Endpoints.HttpBaseAddress_Basic + Enum.GetName(typeof(WSMessageEncoding), messageEncoding)));
214factory = new ChannelFactory<IWcfService>(binding, new EndpointAddress(Endpoints.HttpBaseAddress_Basic + Enum.GetName(typeof(WSMessageEncoding), messageEncoding)));
254factory = new ChannelFactory<IWcfService>(binding, new EndpointAddress(Endpoints.HttpBaseAddress_Basic + Enum.GetName(typeof(WSMessageEncoding), messageEncoding)));
Binding.WS.FederationHttp.IntegrationTests (2)
CodeStyleConfigFileGenerator (5)
ConfigurationSchemaGenerator (1)
ConfigurationSchemaGenerator.Tests (1)
crossgen2 (3)
Crossgen2RootCommand.cs (3)
318Console.WriteLine(String.Format(SR.SwitchWithDefaultHelp, "--type-validation", String.Join("', '", Enum.GetNames<TypeValidationRule>()), nameof(TypeValidationRule.Automatic)));
323Console.WriteLine(String.Format(SR.LayoutOptionExtraHelp, "--method-layout", String.Join("', '", Enum.GetNames<MethodLayoutAlgorithm>())));
325Console.WriteLine(String.Format(SR.LayoutOptionExtraHelp, "--file-layout", String.Join("', '", Enum.GetNames<FileLayoutAlgorithm>())));
CSharpSyntaxGenerator (8)
datacollector (1)
datacollector.arm64 (1)
dotnet (3)
dotnet-dev-certs (1)
dotnet-svcutil-lib (31)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SecurityAttributeGenerationHelper.cs (1)
43else if (value is Enum)
Extensibility.WebSockets.IntegrationTests (10)
WebSocketTests.4.1.0.cs (10)
48endpointAddress = Endpoints.WebSocketHttpDuplexStreamed_Address + Enum.GetName(typeof(NetHttpMessageEncoding), messageEncoding);
142endpointAddress = new EndpointAddress(Endpoints.WebSocketHttpDuplexBuffered_Address + Enum.GetName(typeof(NetHttpMessageEncoding), messageEncoding));
214endpointAddress = new EndpointAddress(Endpoints.WebSocketHttpDuplexBuffered_Address + Enum.GetName(typeof(NetHttpMessageEncoding), messageEncoding));
289endpointAddress = Endpoints.WebSocketHttpsDuplexStreamed_Address + Enum.GetName(typeof(NetHttpMessageEncoding), messageEncoding);
387endpointAddress = new EndpointAddress(Endpoints.WebSocketHttpsDuplexBuffered_Address + Enum.GetName(typeof(NetHttpMessageEncoding), messageEncoding));
451endpointAddress = new EndpointAddress(Endpoints.WebSocketHttpRequestReplyStreamed_Address + Enum.GetName(typeof(NetHttpMessageEncoding), messageEncoding));
520endpointAddress = new EndpointAddress(Endpoints.WebSocketHttpRequestReplyBuffered_Address + Enum.GetName(typeof(NetHttpMessageEncoding), messageEncoding));
578endpointAddress = new EndpointAddress(Endpoints.WebSocketHttpRequestReplyBuffered_Address + Enum.GetName(typeof(NetHttpMessageEncoding), messageEncoding));
638endpointAddress = new EndpointAddress(Endpoints.WebSocketHttpsRequestReplyBuffered_Address + Enum.GetName(typeof(NetHttpMessageEncoding), messageEncoding));
698endpointAddress = new EndpointAddress(Endpoints.WebSocketHttpsRequestReplyBuffered_Address + Enum.GetName(typeof(NetHttpMessageEncoding), messageEncoding));
GenerateDocumentationAndConfigFiles (35)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (9)
104public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>() where T : struct, Enum
112public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map) where T : struct, Enum
119public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum
127public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(IEnumerable<(string name, T value)> entries, IEnumerable<(string name, T value)> alternativeEntries) where T : struct, Enum
136public static EditorConfigValueSerializer<T?> CreateSerializerForNullableEnum<T>() where T : struct, Enum
158private static bool TryParseEnum<T>(string str, out T result) where T : struct, Enum
173return Enum.TryParse(str, ignoreCase: true, out result);
209where TFromEnum : struct, Enum
210where TToEnum : struct, Enum
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
119symbol.Name == nameof(Enum.HasFlag) &&
ILAssembler (3)
ilc (1)
ILCompiler.Compiler (6)
ILCompiler.MetadataTransform (3)
ILCompiler.ReadyToRun (5)
illink (5)
ILLink.RoslynAnalyzer (3)
Microsoft.Analyzers.Local (4)
Microsoft.Analyzers.Local.Tests (2)
Microsoft.AspNetCore.App.Analyzers (1)
Microsoft.AspNetCore.AsyncState (2)
Microsoft.AspNetCore.Components (6)
BindConverter.cs (6)
1604private static bool ConvertToEnum<T>(object? obj, CultureInfo? _, out T value) where T : struct, Enum
1613if (!Enum.TryParse<T>(text, out var converted))
1619if (!Enum.IsDefined(typeof(T), converted))
1629private static bool ConvertToNullableEnum<T>(object? obj, CultureInfo? _, out T? value) where T : struct, Enum
1638if (!Enum.TryParse<T>(text, out var converted))
1644if (!Enum.IsDefined(typeof(T), converted))
Microsoft.AspNetCore.Components.Endpoints (4)
Microsoft.AspNetCore.Connections.Abstractions (1)
Microsoft.AspNetCore.DataProtection (2)
Microsoft.AspNetCore.Diagnostics.HealthChecks (1)
Microsoft.AspNetCore.HeaderParsing (2)
Microsoft.AspNetCore.Http.Abstractions (1)
Microsoft.AspNetCore.Http.Extensions (7)
Microsoft.AspNetCore.Mvc.Abstractions (10)
Microsoft.AspNetCore.Mvc.Core (10)
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (19)
Microsoft.AspNetCore.Razor.Utilities.Shared (5)
Microsoft.AspNetCore.Rewrite (1)
Microsoft.AspNetCore.Server.Kestrel.Core (6)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Microsoft.AspNetCore.Testing (2)
Microsoft.Build (10)
Microsoft.Build.Framework (11)
Microsoft.Build.Tasks.CodeAnalysis (4)
Microsoft.Build.Tasks.Core (19)
Microsoft.Build.Utilities.Core (4)
Microsoft.CodeAnalysis (11)
Microsoft.CodeAnalysis.Analyzers (37)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (9)
104public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>() where T : struct, Enum
112public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map) where T : struct, Enum
119public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum
127public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(IEnumerable<(string name, T value)> entries, IEnumerable<(string name, T value)> alternativeEntries) where T : struct, Enum
136public static EditorConfigValueSerializer<T?> CreateSerializerForNullableEnum<T>() where T : struct, Enum
158private static bool TryParseEnum<T>(string str, out T result) where T : struct, Enum
173return Enum.TryParse(str, ignoreCase: true, out result);
209where TFromEnum : struct, Enum
210where TToEnum : struct, Enum
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
119symbol.Name == nameof(Enum.HasFlag) &&
Microsoft.CodeAnalysis.AnalyzerUtilities (35)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (9)
104public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>() where T : struct, Enum
112public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map) where T : struct, Enum
119public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum
127public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(IEnumerable<(string name, T value)> entries, IEnumerable<(string name, T value)> alternativeEntries) where T : struct, Enum
136public static EditorConfigValueSerializer<T?> CreateSerializerForNullableEnum<T>() where T : struct, Enum
158private static bool TryParseEnum<T>(string str, out T result) where T : struct, Enum
173return Enum.TryParse(str, ignoreCase: true, out result);
209where TFromEnum : struct, Enum
210where TToEnum : struct, Enum
Microsoft.CodeAnalysis.CodeStyle (34)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (9)
104public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>() where T : struct, Enum
112public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map) where T : struct, Enum
119public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum
127public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(IEnumerable<(string name, T value)> entries, IEnumerable<(string name, T value)> alternativeEntries) where T : struct, Enum
136public static EditorConfigValueSerializer<T?> CreateSerializerForNullableEnum<T>() where T : struct, Enum
158private static bool TryParseEnum<T>(string str, out T result) where T : struct, Enum
173return Enum.TryParse(str, ignoreCase: true, out result);
209where TFromEnum : struct, Enum
210where TToEnum : struct, Enum
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
119symbol.Name == nameof(Enum.HasFlag) &&
Microsoft.CodeAnalysis.CSharp (9)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.Features (1)
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.Extensions.Package (5)
Microsoft.CodeAnalysis.Features (18)
Microsoft.CodeAnalysis.Razor.Compiler (1)
Microsoft.CodeAnalysis.Rebuild (3)
Microsoft.CodeAnalysis.ResxSourceGenerator (33)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (9)
104public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>() where T : struct, Enum
112public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map) where T : struct, Enum
119public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum
127public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(IEnumerable<(string name, T value)> entries, IEnumerable<(string name, T value)> alternativeEntries) where T : struct, Enum
136public static EditorConfigValueSerializer<T?> CreateSerializerForNullableEnum<T>() where T : struct, Enum
158private static bool TryParseEnum<T>(string str, out T result) where T : struct, Enum
173return Enum.TryParse(str, ignoreCase: true, out result);
209where TFromEnum : struct, Enum
210where TToEnum : struct, Enum
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.Workspaces (39)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (9)
104public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>() where T : struct, Enum
112public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map) where T : struct, Enum
119public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum
127public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(IEnumerable<(string name, T value)> entries, IEnumerable<(string name, T value)> alternativeEntries) where T : struct, Enum
136public static EditorConfigValueSerializer<T?> CreateSerializerForNullableEnum<T>() where T : struct, Enum
158private static bool TryParseEnum<T>(string str, out T result) where T : struct, Enum
173return Enum.TryParse(str, ignoreCase: true, out result);
209where TFromEnum : struct, Enum
210where TToEnum : struct, Enum
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
119symbol.Name == nameof(Enum.HasFlag) &&
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (4)
Microsoft.CSharp (9)
Microsoft.Deployment.DotNet.Releases (2)
Microsoft.Diagnostics.DataContractReader.Contracts (3)
Microsoft.DotNet.Arcade.Sdk (1)
Microsoft.DotNet.Build.Manifest (2)
Microsoft.DotNet.Build.Tasks.Feed (2)
Microsoft.DotNet.Build.Tasks.Installers (4)
Microsoft.DotNet.Build.Tasks.Packaging (2)
Microsoft.DotNet.HotReload.Utils.Generator (1)
Microsoft.DotNet.HotReload.Watch (1)
Microsoft.DotNet.TemplateLocator (3)
Microsoft.Extensions.AI (3)
Microsoft.Extensions.AI.Abstractions (4)
Microsoft.Extensions.AI.Abstractions.Tests (2)
Microsoft.Extensions.AI.Evaluation (2)
Microsoft.Extensions.AI.Evaluation.Console (2)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (1)
Microsoft.Extensions.AI.Evaluation.NLP (2)
Microsoft.Extensions.AI.Evaluation.Quality (2)
Microsoft.Extensions.AI.Evaluation.Reporting (3)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (3)
Microsoft.Extensions.AI.Evaluation.Safety (3)
Microsoft.Extensions.AI.Integration.Tests (2)
Microsoft.Extensions.AI.OpenAI (2)
Microsoft.Extensions.AI.Tests (1)
Microsoft.Extensions.AmbientMetadata.Application (2)
Microsoft.Extensions.AmbientMetadata.Build (2)
Microsoft.Extensions.AsyncState (2)
Microsoft.Extensions.Caching.Hybrid (2)
Microsoft.Extensions.Compliance.Abstractions (2)
Microsoft.Extensions.Compliance.Redaction (3)
Microsoft.Extensions.Compliance.Testing (3)
Microsoft.Extensions.Configuration.Binder (2)
Microsoft.Extensions.DataIngestion (2)
Microsoft.Extensions.DataIngestion.Abstractions (2)
Microsoft.Extensions.DataIngestion.Markdig (2)
Microsoft.Extensions.DataIngestion.MarkItDown (2)
Microsoft.Extensions.DependencyInjection (1)
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Microsoft.Extensions.DependencyInjection.AutoActivation (2)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (4)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (2)
Microsoft.Extensions.Diagnostics.Probes (2)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Microsoft.Extensions.Diagnostics.Testing (2)
Microsoft.Extensions.Hosting.Testing (2)
Microsoft.Extensions.Http (2)
Microsoft.Extensions.Http.Resilience (2)
Microsoft.Extensions.Logging.Configuration (1)
Microsoft.Extensions.Logging.Console (2)
Microsoft.Extensions.ObjectPool.DependencyInjection (2)
Microsoft.Extensions.Options.Contextual (2)
Microsoft.Extensions.Primitives (2)
Microsoft.Extensions.Resilience (2)
Microsoft.Extensions.ServiceDiscovery (2)
Microsoft.Extensions.ServiceDiscovery.Abstractions (2)
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Microsoft.Extensions.ServiceDiscovery.Yarp (2)
Microsoft.Extensions.Telemetry (2)
Microsoft.Extensions.Telemetry.Abstractions (2)
Microsoft.Extensions.TimeProvider.Testing (2)
Microsoft.Interop.ComInterfaceGenerator (1)
Microsoft.Interop.JavaScript.JSImportGenerator (3)
Microsoft.Interop.LibraryImportGenerator (4)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
Microsoft.Interop.SourceGeneration (1)
Microsoft.Maui (6)
Converters\FlexEnumsConverters.cs (6)
24 if (Enum.TryParse(strValue, true, out FlexJustify justify))
63 if (Enum.TryParse(strValue, true, out FlexDirection aligncontent))
98 if (Enum.TryParse(strValue, true, out FlexAlignContent aligncontent))
137 if (Enum.TryParse(strValue, true, out FlexAlignItems alignitems))
172 if (Enum.TryParse(strValue, true, out FlexAlignSelf alignself))
207 if (Enum.TryParse(strValue, true, out FlexWrap wrap))
Microsoft.Maui.Controls (14)
Microsoft.Maui.Controls.Build.Tasks (3)
Microsoft.Maui.Controls.DesignTools (2)
Microsoft.Maui.Graphics (2)
Microsoft.ML.AutoML (10)
Microsoft.ML.AutoML.Tests (7)
Microsoft.ML.CodeGenerator (3)
Microsoft.ML.Core (4)
Microsoft.ML.Core.Tests (1)
Microsoft.ML.Data (22)
Microsoft.ML.Ensemble (9)
Microsoft.ML.EntryPoints (1)
Microsoft.ML.FastTree (9)
Microsoft.ML.ImageAnalytics (4)
Microsoft.ML.InternalCodeAnalyzer (2)
Microsoft.ML.SearchSpace (5)
Microsoft.ML.Tests (1)
Microsoft.ML.TimeSeries (16)
SequentialAnomalyDetectionTransformBase.cs (9)
173Host.CheckUserArg(Enum.IsDefined(typeof(MartingaleType), martingale), nameof(ArgumentsBase.Martingale), "Value is undefined.");
174Host.CheckUserArg(Enum.IsDefined(typeof(AnomalySide), anomalySide), nameof(ArgumentsBase.Side), "Value is undefined.");
175Host.CheckUserArg(Enum.IsDefined(typeof(AlertingScore), alertingScore), nameof(ArgumentsBase.AlertOn), "Value is undefined.");
211Host.CheckDecode(Enum.IsDefined(typeof(MartingaleType), temp));
215Host.CheckDecode(Enum.IsDefined(typeof(AlertingScore), temp));
222Host.CheckDecode(Enum.IsDefined(typeof(AnomalySide), temp));
240Host.Assert(Enum.IsDefined(typeof(MartingaleType), Martingale));
241Host.Assert(Enum.IsDefined(typeof(AlertingScore), ThresholdScore));
244Host.Assert(Enum.IsDefined(typeof(AnomalySide), Side));
Microsoft.ML.Transforms (17)
Microsoft.NET.Build.Containers (5)
Tasks\CreateNewImage.cs (4)
153if (Enum.TryParse<KnownImageFormats>(ImageFormat, out var imageFormat))
164Log.LogErrorWithCodeFromResources(nameof(Strings.InvalidContainerImageFormat), ImageFormat, string.Join(",", Enum.GetValues<KnownImageFormats>()));
171if (Enum.TryParse<KnownImageFormats>(ImageFormat, out var imageFormat))
182Log.LogErrorWithCodeFromResources(nameof(Strings.InvalidContainerImageFormat), ImageFormat, string.Join(",", Enum.GetValues<KnownImageFormats>()));
Microsoft.NET.Build.Tasks (8)
Microsoft.NET.HostModel (3)
Microsoft.NET.Sdk.Publish.Tasks (14)
Microsoft.NET.Sdk.Razor.Tasks (2)
Microsoft.NET.Sdk.WorkloadManifestReader (3)
Microsoft.Private.Windows.Core (6)
Microsoft.TemplateEngine.Cli (4)
Microsoft.TemplateEngine.Core (1)
Microsoft.TemplateEngine.Edge (1)
Microsoft.TemplateEngine.Utils (1)
Microsoft.TemplateSearch.Common (1)
Microsoft.TestPlatform.CommunicationUtilities (2)
Microsoft.TestPlatform.CoreUtilities (3)
Microsoft.TestPlatform.Extensions.BlameDataCollector (9)
Microsoft.TestPlatform.TestHostRuntimeProvider (1)
Microsoft.TestPlatform.Utilities (6)
Microsoft.VisualBasic.Core (14)
Microsoft.VisualStudio.TestPlatform.Common (1)
Microsoft.VisualStudio.TestPlatform.ObjectModel (6)
Microsoft.Win32.Registry (2)
MSBuild (2)
mscorlib (1)
netstandard (1)
NuGet.Build.Tasks (8)
NuGet.Build.Tasks.Pack (4)
NuGet.CommandLine.XPlat (9)
NuGet.Commands (8)
NuGet.Common (4)
NuGet.Configuration (7)
NuGet.LibraryModel (3)
NuGet.Packaging (12)
NuGet.ProjectModel (9)
NuGet.Protocol (25)
PresentationBuildTasks (2)
PresentationCore (10)
PresentationFramework (15)
PresentationUI (5)
ReachFramework (36)
Roslyn.Diagnostics.Analyzers (34)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer.cs (9)
104public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>() where T : struct, Enum
112public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map) where T : struct, Enum
119public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(BidirectionalMap<string, T> map, ImmutableDictionary<string, T> alternative) where T : struct, Enum
127public static EditorConfigValueSerializer<T> CreateSerializerForEnum<T>(IEnumerable<(string name, T value)> entries, IEnumerable<(string name, T value)> alternativeEntries) where T : struct, Enum
136public static EditorConfigValueSerializer<T?> CreateSerializerForNullableEnum<T>() where T : struct, Enum
158private static bool TryParseEnum<T>(string str, out T result) where T : struct, Enum
173return Enum.TryParse(str, ignoreCase: true, out result);
209where TFromEnum : struct, Enum
210where TToEnum : struct, Enum
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
119symbol.Name == nameof(Enum.HasFlag) &&
rzc (2)
Security.TransportSecurity.IntegrationTests (1)
Shared (3)
System.CommandLine (2)
System.ComponentModel.Annotations (6)
System.ComponentModel.Composition (1)
System.ComponentModel.TypeConverter (36)
System\ComponentModel\EnumConverter.cs (31)
15/// Provides a type converter to convert <see cref='System.Enum'/> objects to and
26if (!type.IsEnum && !type.Equals(typeof(Enum)))
44if (sourceType == typeof(string) || sourceType == typeof(Enum[]))
57if (destinationType == typeof(Enum[]) || destinationType == typeof(InstanceDescriptor))
88bool isUnderlyingTypeUInt64 = Enum.GetUnderlyingType(EnumType) == typeof(ulong);
92convertedValue |= GetEnumValue(isUnderlyingTypeUInt64, Enum.Parse(EnumType, strValue.AsSpan(v), true), culture);
94return Enum.ToObject(EnumType, convertedValue);
98return Enum.Parse(EnumType, strValue, true);
106else if (value is Enum[])
108bool isUnderlyingTypeUInt64 = Enum.GetUnderlyingType(EnumType) == typeof(ulong);
110foreach (Enum e in (Enum[])value)
114return Enum.ToObject(EnumType, finalValue);
130if (!EnumType.IsDefined(typeof(FlagsAttribute), false) && !Enum.IsDefined(EnumType, value))
135return Enum.Format(EnumType, value, "G");
149Type underlyingType = Enum.GetUnderlyingType(EnumType);
154MethodInfo? method = typeof(Enum).GetMethod("ToObject", new Type[] { typeof(Type), underlyingType });
174if (destinationType == typeof(Enum[]) && value != null)
178bool isUnderlyingTypeUInt64 = Enum.GetUnderlyingType(EnumType) == typeof(ulong);
179List<Enum> flagValues = new List<Enum>();
181Array objValues = Enum.GetValuesAsUnderlyingType(EnumType);
197flagValues.Add((Enum)Enum.ToObject(EnumType, ul));
212flagValues.Add((Enum)Enum.ToObject(EnumType, longValue));
219return new Enum[] { (Enum)Enum.ToObject(EnumType, value) };
283value = Enum.Parse(EnumType, field.Name);
330public override bool IsValid(ITypeDescriptorContext? context, object? value) => Enum.IsDefined(EnumType, value!);
System.Configuration.ConfigurationManager (5)
System.Data.Common (6)
System.Data.OleDb (3)
System.Diagnostics.EventLog (2)
System.Diagnostics.PerformanceCounter (3)
System.Diagnostics.Process (2)
System.Diagnostics.TraceSource (2)
System.Drawing.Common (2)
System.Formats.Asn1 (34)
System.IO.Compression.ZipFile (1)
System.IO.FileSystem.Watcher (1)
System.IO.Packaging (1)
System.Linq.Expressions (17)
System\Linq\Expressions\Interpreter\TypeOperations.cs (11)
399frame.Push(from == null ? null : Enum.ToObject(_t, from));
426frame.Push(Enum.ToObject(_t, (int)from));
429frame.Push(Enum.ToObject(_t, (long)from));
432frame.Push(Enum.ToObject(_t, (uint)from));
435frame.Push(Enum.ToObject(_t, (ulong)from));
438frame.Push(Enum.ToObject(_t, (byte)from));
441frame.Push(Enum.ToObject(_t, (sbyte)from));
444frame.Push(Enum.ToObject(_t, (short)from));
447frame.Push(Enum.ToObject(_t, (ushort)from));
451frame.Push(Enum.ToObject(_t, (char)from));
457frame.Push(Enum.ToObject(_t, (bool)from));
System.Management (1)
System.Net.Http (1)
System.Net.Security (1)
System.Net.WebSockets (1)
System.Private.CoreLib (84)
System.Private.DataContractSerialization (13)
System.Private.Reflection.Execution (1)
System.Private.TypeLoader (3)
System.Private.Windows.Core.TestUtilities (6)
System.Private.Xml (27)
System.Reflection.Emit (1)
System.Reflection.Metadata (4)
System.Resources.Extensions (1)
System.Resources.Writer (1)
System.Runtime (1)
System.ServiceModel.Federation (1)
System.ServiceModel.NetFramingBase (1)
System.ServiceModel.NetTcp (1)
System.ServiceModel.Primitives (2)
System.ServiceModel.UnixDomainSocket (1)
System.ServiceProcess.ServiceController (1)
System.Text.Encodings.Web (1)
System.Text.Json (11)
System.Text.Json.SourceGeneration (1)
System.Text.RegularExpressions (6)
System.Windows.Forms (26)
System.Windows.Forms.Analyzers.CSharp (3)
System.Windows.Forms.Design (10)
System.Windows.Forms.Primitives (2)
System.Xaml (1)
testhost (1)
testhost.arm64 (1)
testhost.x86 (1)
TestProject.AppHost (2)
TestProject.IntegrationServiceA (2)
UIAutomationClient (1)
UIAutomationClientSideProviders (2)
vstest.console (9)
vstest.console.arm64 (9)