16 references to ToObject
Microsoft.Build.Framework (1)
BinaryTranslator.cs (1)
500value = (T)Enum.ToObject(enumType, numericValue);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
Options\OptionsTestHelpers.cs (3)
126_ when Nullable.GetUnderlyingType(type) is { IsEnum: true } underlying => value is null ? Enum.ToObject(underlying, 1) : null, 148var zero = Enum.ToObject(type, 0); 149return defaultValue.Equals(zero) ? Enum.ToObject(type, 1) : zero;
Microsoft.DotNet.Build.Tasks.Installers (1)
src\RpmHeader.cs (1)
33: this((TEntryTag)Enum.ToObject(typeof(TEntryTag), entryTag), type, value)
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\Conversions.vb (1)
2392If IsEnum(TargetType) Then Return [Enum].ToObject(TargetType, Expression)
Microsoft.VisualStudio.LanguageServices (3)
Options\VisualStudioSettingsOptionPersister.cs (3)
108return manager.TryGetValue(storageKey, out int value) == GetValueResult.Success ? Enum.ToObject(storageType, value) : default(Optional<object?>); 115return nullableValue.HasValue ? Enum.ToObject(underlyingType, nullableValue.Value) : null; 119return Enum.ToObject(underlyingType, value);
MSBuildTaskHost (1)
BinaryTranslator.cs (1)
500value = (T)Enum.ToObject(enumType, numericValue);
PresentationUI (1)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (1)
604return (RightsTableColumn)Enum.ToObject(typeof(RightsTableColumn), index);
System.Formats.Asn1 (1)
System\Formats\Asn1\AsnDecoder.NamedBitList.cs (1)
222ret = (Enum)Enum.ToObject(flagsEnumType, 0);
System.Linq.Expressions (1)
System\Linq\Expressions\Interpreter\TypeOperations.cs (1)
426frame.Push(Enum.ToObject(_t, (int)from));
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
2199case TypeCode.Int32: return ToObject(enumType, (int)value);
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokeUtils.cs (1)
52dstObject = dstType.IsEnum ? Enum.ToObject(dstType, intValue) : intValue;
UIAutomationClient (1)
System\Windows\Automation\Text\TextRange.cs (1)
244obj = Enum.ToObject(ai.Type, (int)obj);