1 instantiation of UInt16
PresentationFramework (1)
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
11886DefaultConstructor = delegate () { return new System.UInt16(); },
451 references to UInt16
dotnet-svcutil-lib (37)
FrameworkFork\Microsoft.CodeDom\Microsoft\CSharpCodeProvider.cs (2)
1322else if (e.Value is UInt16) 1326Output.Write(((UInt16)e.Value).ToString());
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\XmlBinaryReader.cs (3)
3292map[(int)BinXmlToken.XSD_UNSIGNEDSHORT] = typeof(UInt16); 4415private UInt16 GetUInt16(int pos) 4418return (UInt16)(data[pos] | data[pos + 1] << 8);
FrameworkFork\Microsoft.Xml\Xml\Cache\XPathNode.cs (3)
363Debug.Assert(info != null && idxParent <= UInt16.MaxValue); 441Debug.Assert(pageSibling != null && idxSibling != 0 && idxSibling <= UInt16.MaxValue, "Bad argument"); 460Debug.Assert(pageSimilar != null && idxSimilar != 0 && idxSimilar <= UInt16.MaxValue, "Bad argument");
FrameworkFork\Microsoft.Xml\Xml\Cache\XPathNodeHelper.cs (1)
183Debug.Assert(idxNode <= UInt16.MaxValue);
FrameworkFork\Microsoft.Xml\Xml\schema\GenerateConverter.cs (1)
857if (type == typeof(UInt16)) return "ushort";
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (2)
935if (value < (int)UInt16.MinValue || value > (int)UInt16.MaxValue)
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeExporter.cs (1)
327else if (type == typeof(UInt16))
FrameworkFork\Microsoft.Xml\Xml\Serialization\PrimitiveXmlSerializers.cs (2)
141WriteElementStringRaw(@"unsignedShort", @"", Microsoft.Xml.XmlConvert.ToString((System.UInt16)((System.UInt16)o)));
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (2)
537AddPrimitive(typeof(UInt16), "unsignedShort", "UInt16", TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.XmlEncodingNotRequired); 633AddSoapEncodedPrimitive(typeof(UInt16), "unsignedShort", ns, "UInt16", new XmlQualifiedName("string", XmlSchema.Namespace), TypeFlags.CanBeAttributeValue | TypeFlags.CanBeElementValue | TypeFlags.XmlEncodingNotRequired);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCodeExporter.cs (1)
268type == typeof(UInt16) ||
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCustomFormatter.cs (1)
79return XmlConvert.ToString((UInt16)value);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (3)
359return typeof(UInt16); 423return typeof(UInt16); 771value = default(Nullable<UInt16>);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (1)
310value = XmlConvert.ToString((UInt16)o);
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (5)
761public static string ToString(UInt16 value) 1075public static UInt16 ToUInt16(string s) 1077return UInt16.Parse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo); 1080internal static Exception TryToUInt16(string s, out UInt16 result) 1082if (!UInt16.TryParse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out result))
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\ExtensionQuery.cs (2)
121if (value is UInt16) return (double)(UInt16)value;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\TypeCode.cs (1)
35else if (type == typeof(UInt16))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlReaderDelegator.cs (5)
509internal UInt16 ReadElementContentAsUnsignedShort() 516private UInt16 ToUInt16(int value) 518if (value < UInt16.MinValue || value > UInt16.MaxValue) 522return (UInt16)value;
FrameworkFork\System.ServiceModel\Extensions\ReflectionExtensions.cs (1)
134if (type == typeof(UInt16))
Microsoft.AspNetCore.Components.Server (16)
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\MessagePackWriter.cs (2)
807else if (length <= UInt16.MaxValue) 1014else if (dataLength <= UInt16.MaxValue)
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\SequenceReaderExtensions.cs (2)
145/// Reads an <see cref="UInt16"/> as big endian. 147/// <returns>False if there wasn't enough data for an <see cref="UInt16"/>.</returns>
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\T4\MessagePackReader.Integers.cs (12)
70/// Reads an <see cref="UInt16"/> value from: 77public UInt16 ReadUInt16() 85return checked((UInt16)byteResult); 88return checked((UInt16)sbyteResult); 91return checked((UInt16)ushortResult); 94return checked((UInt16)shortResult); 97return checked((UInt16)uintResult); 100return checked((UInt16)intResult); 103return checked((UInt16)ulongResult); 106return checked((UInt16)longResult); 110return checked((UInt16)unchecked((sbyte)code)); 115return (UInt16)code;
Microsoft.AspNetCore.Mvc.TagHelpers (1)
InputTagHelper.cs (1)
41{ nameof(UInt16), "number" },
Microsoft.AspNetCore.Server.IIS (4)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (4)
324var infoCount = NativeRequestV2->RequestInfoCount; 345var infoCount = NativeRequestV2->RequestInfoCount; 373var infoCount = NativeRequestV2->RequestInfoCount; 756var count = nativeRequest->RequestInfoCount;
Microsoft.AspNetCore.Shared.Tests (4)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (4)
324var infoCount = NativeRequestV2->RequestInfoCount; 345var infoCount = NativeRequestV2->RequestInfoCount; 373var infoCount = NativeRequestV2->RequestInfoCount; 756var count = nativeRequest->RequestInfoCount;
Microsoft.Build (1)
Resources\Constants.cs (1)
354availableStaticMethods.TryAdd("System.UInt16", new Tuple<string, Type>(null, typeof(UInt16)));
Microsoft.Build.Tasks.Core (22)
AssemblyDependency\AssemblyInformation.cs (3)
586var prolog = valueReader.ReadUInt16(); 1040var numberOfSections = sr.ReadUInt16(); 1058var magicNumber = sr.ReadUInt16();
AssemblyDependency\ReferenceTable.cs (3)
2903UInt16 machineType = _readMachineTypeFromPEHeader(dllPath); 2977internal static UInt16 ReadMachineTypeFromPEHeader(string dllPath) 2994UInt16 machineType = NativeMethods.IMAGE_FILE_MACHINE_INVALID;
Delegate.cs (1)
101internal delegate UInt16 ReadMachineTypeFromPEHeader(string dllPath);
GenerateResource.cs (1)
3691ch = (char)UInt16.Parse(
NativeMethods.cs (14)
327public UInt16 usMajorVersion; 328public UInt16 usMinorVersion; 329public UInt16 usBuildNumber; 330public UInt16 usRevisionNumber; 568internal const UInt16 IMAGE_FILE_MACHINE_UNKNOWN = 0x0; // The contents of this field are assumed to be applicable to any machine type 569internal const UInt16 IMAGE_FILE_MACHINE_INVALID = UInt16.MaxValue; // Invalid value for the machine type. 570internal const UInt16 IMAGE_FILE_MACHINE_AMD64 = 0x8664; // x64 571internal const UInt16 IMAGE_FILE_MACHINE_ARM = 0x1c0; // ARM little endian 572internal const UInt16 IMAGE_FILE_MACHINE_ARMV7 = 0x1c4; // ARMv7 (or higher) Thumb mode only 573internal const UInt16 IMAGE_FILE_MACHINE_I386 = 0x14c; // Intel 386 or later processors and compatible processors 574internal const UInt16 IMAGE_FILE_MACHINE_IA64 = 0x200; // Intel Itanium processor family 575internal const UInt16 IMAGE_FILE_MACHINE_ARM64 = 0xAA64; // ARM64 Little-Endian 576internal const UInt16 IMAGE_FILE_MACHINE_R4000 = 0x166; // Used to test a architecture we do not expect to reference
Microsoft.Build.Tasks.UnitTests (1)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (1)
671private static UInt16 ReadMachineTypeFromPEHeader(string dllPath)
Microsoft.CodeAnalysis (88)
Compilation\Compilation.cs (6)
1970writer.Write((UInt16)0xFFFF); 1971writer.Write((UInt16)0); 1972writer.Write((UInt16)0xFFFF); 1973writer.Write((UInt16)0); 1975writer.Write((UInt16)0); //MemoryFlags 1976writer.Write((UInt16)0); //LanguageId
ConstantValue.cs (1)
173public static ConstantValue Create(UInt16 value)
CvtRes.cs (75)
15using WORD = System.UInt16; 31internal WORD MemoryFlags; // state of the resource 32internal WORD LanguageId; // Unicode support for NLS 40internal WORD Ordinal; 50private const WORD RT_DLGINCLUDE = 17; 116if (pAdditional.pstringType.theString == null && (pAdditional.pstringType.Ordinal == (WORD)RT_DLGINCLUDE)) 276var symType = reader.ReadUInt16(); 309internal WORD wPlanes; 310internal WORD wBitCount; 320var reserved = iconReader.ReadUInt16(); 324var type = iconReader.ReadUInt16(); 328var count = iconReader.ReadUInt16(); 374const WORD RT_ICON = 3; 398resWriter.Write((WORD)0xFFFF); 399resWriter.Write((WORD)RT_ICON); 400resWriter.Write((WORD)0xFFFF); 401resWriter.Write((WORD)(i + 1)); //EDMAURER this is not general. Implies you can only append one icon to the resources. 405resWriter.Write((WORD)0x1010); 406resWriter.Write((WORD)0x0000); 438const WORD RT_GROUP_ICON = RT_ICON + 11; 442resWriter.Write((DWORD)(3 * sizeof(WORD) + count * /*sizeof(ICONRESDIR)*/ 14)); 444resWriter.Write((WORD)0xFFFF); 445resWriter.Write((WORD)RT_GROUP_ICON); 446resWriter.Write((WORD)0xFFFF); 447resWriter.Write((WORD)0x7F00); //IDI_APPLICATION 449resWriter.Write((WORD)0x1030); 450resWriter.Write((WORD)0x0000); 455resWriter.Write((WORD)0x0000); 456resWriter.Write((WORD)0x0001); 457resWriter.Write((WORD)count); 465resWriter.Write((WORD)iconDirEntries[i].wPlanes); 466resWriter.Write((WORD)iconDirEntries[i].wBitCount); 468resWriter.Write((WORD)(i + 1)); //ID 537resWriter.Write((WORD)0xFFFF); //identifies type as ordinal. 538resWriter.Write((WORD)RT_VERSION); //type 539resWriter.Write((WORD)0xFFFF); //identifies name as ordinal. 540resWriter.Write((WORD)0x0001); //only ever 1 ver resource (what Dev10 does) 542resWriter.Write((WORD)0x0030); //memory flags (this is what the Dev10 compiler uses) 543resWriter.Write((WORD)0x0000); //languageId 555const WORD RT_MANIFEST = 24; 560resWriter.Write((WORD)0xFFFF); //identifies type as ordinal. 561resWriter.Write((WORD)RT_MANIFEST); //type 562resWriter.Write((WORD)0xFFFF); //identifies name as ordinal. 563resWriter.Write((WORD)((isDll) ? 0x0002 : 0x0001)); //EDMAURER executables are named "1", DLLs "2" 565resWriter.Write((WORD)0x1030); //memory flags 566resWriter.Write((WORD)0x0000); //languageId 674return PadToDword(cb + 3 * sizeof(WORD)) - 3 * sizeof(WORD); 712writer.Write((WORD)cbBlock); 713writer.Write((WORD)(keyValuePair.Value.Length + 1)); //add 1 for nul 714writer.Write((WORD)1); 716writer.Write((WORD)'\0'); 720writer.Write((WORD)'\0'); 756int sizeEXEVERRESOURCE = sizeof(WORD) * 3 * 5 + 2 * sizeof(WORD) + //five headers + two words for CP and lang 807writer.Write((WORD)dataSize); 808writer.Write((WORD)sizeVS_FIXEDFILEINFO); 809writer.Write((WORD)0); 814writer.Write((WORD)(sizeof(WORD) * 2 + 2 * HDRSIZE + KEYBYTES(varFileInfoKey) + KEYBYTES(translationKey))); 815writer.Write((WORD)0); 816writer.Write((WORD)1); 820writer.Write((WORD)(sizeof(WORD) * 2 + HDRSIZE + KEYBYTES(translationKey))); 821writer.Write((WORD)(sizeof(WORD) * 2)); 822writer.Write((WORD)0); 826writer.Write((WORD)0); //langId; MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)) = 0 827writer.Write((WORD)CP_WINUNICODE); //codepage; 1200 = CP_WINUNICODE 829writer.Write((WORD)(2 * HDRSIZE + KEYBYTES(stringFileInfoKey) + KEYBYTES(_langIdAndCodePageKey) + GetStringsSize())); 830writer.Write((WORD)0); 831writer.Write((WORD)1); 836writer.Write((WORD)(HDRSIZE + KEYBYTES(_langIdAndCodePageKey) + GetStringsSize())); 837writer.Write((WORD)0); 838writer.Write((WORD)1);
InternalUtilities\LittleEndianReader.cs (1)
39var result = ReadUInt16LittleEndian(_span);
MetadataReader\PEModule.cs (5)
1337var numNamed = sig.ReadUInt16(); 1382var numNamedArgs = sigReader.ReadUInt16(); 1436var numNamed = sigReader.ReadUInt16(); 1541var numNamedArgs = sigReader.ReadUInt16(); 2172var numNamed = sig.ReadUInt16();
Microsoft.CodeAnalysis.CSharp.Features (1)
Diagnostics\Analyzers\TypeSyntaxSimplifierWalker.cs (1)
29nameof(UInt16),
Microsoft.CodeAnalysis.UnitTests (1)
PEWriter\InstructionOperandTypesTests.cs (1)
35var value = unchecked((ushort)opCode.Value);
Microsoft.CodeAnalysis.Workspaces (1)
Recommendations\AbstractRecommendationServiceRunner.cs (1)
308AddSpecialTypeSymbolAndItsAliases(nameof(UInt16), SpecialType.System_UInt16);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\InternalUtilities\LittleEndianReader.cs (1)
39var result = ReadUInt16LittleEndian(_span);
Microsoft.CodeAnalysis.Workspaces.UnitTests (12)
ObjectSerializationTests.cs (12)
285TestRoundTripValue(UInt16.MaxValue); 326TestRoundTripValue<Int32>(UInt16.MaxValue); 345TestRoundTripValue<Int32>(UInt16.MaxValue); 368TestRoundTripValue<Int64>(UInt16.MinValue); 369TestRoundTripValue<Int64>(UInt16.MaxValue); 394TestRoundTripValue<UInt64>(UInt16.MinValue); 395TestRoundTripValue<UInt64>(UInt16.MaxValue); 420writer.WriteUInt16(UInt16.MaxValue); 444Assert.Equal(UInt16.MaxValue, reader.ReadUInt16()); 474writer.WriteScalarValue(UInt16.MaxValue); 512Assert.Equal(UInt16.MaxValue, (UInt16)reader.ReadScalarValue());
Microsoft.Data.Analysis (14)
DataFrameColumnCollection.cs (1)
495throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(UInt16)));
PrimitiveDataFrameColumnComputations.cs (13)
5630var ret = column.Buffers[0].ReadOnlySpan[0]; 5653var ret = ushort.MinValue; 5694var ret = column.Buffers[0].ReadOnlySpan[0]; 5717var ret = ushort.MaxValue; 5758var ret = (ushort)1; 5781var ret = default(ushort); 5822var ret = (ushort)0; 5845var ret = default(ushort); 5886var value = ushort.MinValue; 5909var value = ushort.MinValue; 5934var value = ushort.MaxValue; 5957var value = ushort.MaxValue; 6026var value = (ushort)0;
Microsoft.DotNet.SignCheckLibrary (25)
Interop\PortableExecutable\ImageDosHeader.cs (20)
16public UInt16 e_magic; 20public UInt16 e_cblp; 24public UInt16 e_cp; 28public UInt16 e_crlc; 32public UInt16 e_cparhdr; 36public UInt16 e_minalloc; 40public UInt16 e_maxalloc; 44public UInt16 e_ss; 48public UInt16 e_sp; 52public UInt16 e_csum; 56public UInt16 e_ip; 60public UInt16 e_cs; 64public UInt16 elfarlc; 68public UInt16 e_ovno; 73public UInt16[] e_res; 77public UInt16 e_oemid; 81public UInt16 e_oeminfo; 86public UInt16[] e_res2; 125e_res = new UInt16[] { reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16() }, 128e_res2 = new UInt16[] { reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16(), reader.ReadUInt16() },
Interop\PortableExecutable\ImageFileHeader.cs (3)
13public UInt16 Machine; 14public UInt16 NumberOfSections; 18public UInt16 SizeOfOptionalHeader;
Interop\PortableExecutable\ImageSectionHeader.cs (2)
37public UInt16 NumberOfRelocations; 40public UInt16 NumberOfLinenumbers;
Microsoft.Extensions.Caching.Hybrid.Tests (8)
PayloadTests.cs (8)
56var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _); 85var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _); 121var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _); 151var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _); 189var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _); 211var result = HybridCachePayload.TryParse(new(bytes), "whatever", TagSet.Empty, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _); 238var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength - 1), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _); 265var result = HybridCachePayload.TryParse(new(oversized, 0, actualLength + 1), key, tags, cache, out var payload, out var remaining, out var flags, out var entropy, out var pendingTags, out _);
Microsoft.Maui.Controls (6)
Interactivity\TriggerBase.cs (2)
79 var triggerIndex = ++bindable._triggerCount; 80 var manualSpecificity = (ushort)(SetterSpecificity.ManualTriggerBaseline + triggerIndex);
SetterSpecificity.cs (2)
57 var manual = (ushort)((_value >> 28) & 0xFFFF); 65 var style = (ushort)((_value >> 44) & 0xFFF);
Xaml\TypeConversionExtensions.cs (2)
184 if (toType == typeof(UInt16)) 185 return UInt16.Parse(str, CultureInfo.InvariantCulture);
Microsoft.Maui.Controls.Build.Tasks (1)
NodeILExtensions.cs (1)
247 yield return Instruction.Create(OpCodes.Ldc_I4, unchecked((int)TryFormat(s => UInt16.Parse(s, CultureInfo.InvariantCulture), node, str)));
Microsoft.Maui.Controls.Xaml (2)
CreateValuesVisitor.cs (2)
359 if (nodeType == typeof(UInt16) && ushort.TryParse(valuestring, NumberStyles.Number, CultureInfo.InvariantCulture, out var uint16val))
Microsoft.ML.Core (2)
Data\DataKind.cs (1)
45/// <summary>2-byte unsigned integer, type of <see cref="System.UInt16"/>.</summary>
Utilities\Stream.cs (1)
341foreach (var v in e)
Microsoft.ML.Data (66)
Data\Conversion.cs (53)
30using U2 = UInt16; 159AddStd<U1, U2>(Convert); 169AddStd<U2, U1>(Convert); 170AddStd<U2, U2>(Convert); 171AddStd<U2, U4>(Convert); 172AddStd<U2, U8>(Convert); 173AddStd<U2, UG>(Convert); 174AddStd<U2, R4>(Convert); 175AddStd<U2, R8>(Convert); 176AddAux<U2, SB>(Convert); 177AddStd<U2, BL>(Convert); 178AddStd<U2, TX>(Convert); 181AddStd<U4, U2>(Convert); 192AddStd<U8, U2>(Convert); 203AddStd<UG, U2>(Convert); 225AddStd<TX, U2>(Convert); 287AddIsDef<U2>(IsDefault); 296AddHasZero<U2>(HasZero); 305AddTryParse<U2>(TryParse); 785private bool IsDefault(in U2 src) => src == 0; 796private bool HasZero(in VBuffer<U2> src) { if (!src.IsDense) return true; var srcValues = src.GetValues(); for (int i = 0; i < srcValues.Length; i++) { if (srcValues[i] == 0) return true; } return false; } 840public void Convert(in U2 src, ref U1 dst) => dst = src <= U1.MaxValue ? (U1)src : (U1)0; 847public void Convert(in U1 src, ref U2 dst) => dst = src; 848public void Convert(in U2 src, ref U2 dst) => dst = src; 849public void Convert(in U4 src, ref U2 dst) => dst = src <= U2.MaxValue ? (U2)src : (U2)0; 850public void Convert(in U8 src, ref U2 dst) => dst = src <= U2.MaxValue ? (U2)src : (U2)0; 851public void Convert(in UG src, ref U2 dst) => dst = src.High == 0 && src.Low <= U2.MaxValue ? (U2)src.Low : (U2)0; 856public void Convert(in U2 src, ref U4 dst) => dst = src; 864public void Convert(in U2 src, ref U8 dst) => dst = src; 872public void Convert(in U2 src, ref UG dst) => dst = new UG(src, 0); 884public void Convert(in U2 src, ref R4 dst) => dst = src; 902public void Convert(in U2 src, ref R8 dst) => dst = src; 920public void Convert(in U2 src, ref SB dst) => ClearDst(ref dst).Append(src); 945public void Convert(in U2 src, ref TX dst) => dst = src.ToString().AsMemory(); 965public void Convert(in U2 src, ref BL dst) => dst = System.Convert.ToBoolean(src); 1000public bool TryParse(in TX src, out U2 dst) 1003if (!TryParse(in src, out res) || res > U2.MaxValue) 1008dst = (U2)res; 1495private U2 ParseU2(in TX span) 1500if (res > U2.MaxValue) 1502return (U2)res; 1657public void Convert(in TX span, ref U2 value)
Data\DataViewTypeManager.cs (1)
29typeof(Int16), typeof(UInt16), typeof(Int32), typeof(UInt32),
DataLoadSave\Binary\UnsafeTypeOps.cs (7)
36_type2ops[typeof(UInt16)] = new UInt16UnsafeTypeOps(); 88private sealed class UInt16UnsafeTypeOps : UnsafeTypeOps<UInt16> 90public override int Size { get { return sizeof(UInt16); } } 91public override unsafe void Apply(ReadOnlySpan<UInt16> array, Action<IntPtr> func) 93fixed (UInt16* pArray = &MemoryMarshal.GetReference(array)) 96public override void Write(UInt16 a, BinaryWriter writer) { writer.Write(a); } 97public override UInt16 Read(BinaryReader reader) { return reader.ReadUInt16(); }
Transforms\Hashing.cs (2)
672foreach (var value in values.DenseValues()) 782foreach (var value in values.DenseValues())
Transforms\ValueMapping.cs (2)
1166CastInputTo<UInt16>(ctx, out node, srcVariableName, opType, labelEncoderOutput, NumberDataViewType.Int64); 1168CastInputTo<UInt16>(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance);
Transforms\ValueToKeyMappingTransformer.cs (1)
869CastInputToString<UInt16>(ctx, out node, out termIds, srcVariableName, iinfo, opType, labelEncoderOutput);
Microsoft.ML.OnnxTransformer (3)
OnnxTypeParser.cs (1)
45scalarType = typeof(System.UInt16);
OnnxUtils.cs (2)
502typeof(UInt16), 518{ typeof(UInt16) , InternalDataKind.U2},
Microsoft.ML.Sweeper (1)
Parameters.cs (1)
611if (paramType == typeof(UInt16)
Microsoft.ML.TensorFlow (4)
TensorflowUtils.cs (4)
462else if (typeof(T) == typeof(UInt16)) 463return new Tensor((UInt16[])(object)data, dims, TF_DataType.TF_UINT16); 500else if (typeof(T) == typeof(UInt16)) 501return new Tensor((UInt16)(object)data, TF_DataType.TF_UINT16);
Microsoft.ML.Transforms (1)
Text\NgramTransform.cs (1)
788(vectorType.RawType == typeof(VBuffer<UInt16>))))
Microsoft.VisualBasic.Core (53)
Microsoft\VisualBasic\CompilerServices\Conversions.vb (25)
100If TypeOf Value Is UInt16 Then 101Return CBool(DirectCast(Value, UInt16)) 244If TypeOf Value Is UInt16 Then 245Return CByte(DirectCast(Value, UInt16)) 391If TypeOf Value Is UInt16 Then 392Return CSByte(DirectCast(Value, UInt16)) 534If TypeOf Value Is UInt16 Then 535Return CShort(DirectCast(Value, UInt16)) 680If TypeOf Value Is UInt16 Then 681Return CUShort(DirectCast(Value, UInt16)) 823If TypeOf Value Is UInt16 Then 824Return CInt(DirectCast(Value, UInt16)) 968If TypeOf Value Is UInt16 Then 969Return CUInt(DirectCast(Value, UInt16)) 1114If TypeOf Value Is UInt16 Then 1115Return CLng(DirectCast(Value, UInt16)) 1261If TypeOf Value Is UInt16 Then 1262Return CULng(DirectCast(Value, UInt16)) 1420If TypeOf Value Is UInt16 Then 1421Return CDec(DirectCast(Value, UInt16)) 1660If TypeOf Value Is UInt16 Then 1661Return CSng(DirectCast(Value, UInt16)) 1805If TypeOf Value Is UInt16 Then 1806Return CDbl(DirectCast(Value, UInt16)) 2386Private Shared Function CastUInt16Enum(ByVal Expression As UInt16, ByVal TargetType As Type) As Object
Microsoft\VisualBasic\CompilerServices\Operators.vb (27)
983If TypeOf Operand Is UInt16 Then 984Return NegateUInt16(DirectCast(Operand, UInt16)) 1083Private Shared Function NegateUInt16(ByVal operand As UInt16) As Object 1219Private Shared Function NotUInt16(ByVal operand As UInt16, ByVal operandType As Type) As Object 1220Dim result As UInt16 = Not operand 1613Private Shared Function AndUInt16(ByVal left As UInt16, ByVal right As UInt16, Optional ByVal enumType As Type = Nothing) As Object 1614Dim result As UInt16 = left And right 1985Private Shared Function OrUInt16(ByVal left As UInt16, ByVal right As UInt16, Optional ByVal enumType As Type = Nothing) As Object 1986Dim result As UInt16 = left Or right 2378Private Shared Function XorUInt16(ByVal left As UInt16, ByVal right As UInt16, Optional ByVal enumType As Type = Nothing) As Object 2379Dim result As UInt16 = left Xor right 2847Private Shared Function AddUInt16(ByVal left As UInt16, ByVal right As UInt16) As Object 2851If result > UInt16.MaxValue Then 3315Private Shared Function SubtractUInt16(ByVal left As UInt16, ByVal right As UInt16) As Object 3319If result < UInt16.MinValue Then 3755Private Shared Function MultiplyUInt16(ByVal left As UInt16, ByVal right As UInt16) As Object 3759If result > UInt16.MaxValue Then 4607Private Shared Function ModUInt16(ByVal left As UInt16, ByVal right As UInt16) As Object 4999Private Shared Function IntDivideUInt16(ByVal left As UInt16, ByVal right As UInt16) As Object
Microsoft\VisualBasic\Strings.vb (1)
552Public Function Len(ByVal Expression As UInt16) As Integer
Microsoft.VisualStudio.LanguageServices (1)
CodeMarkers\ManagedCodeMarkers.cs (1)
58public static extern System.UInt16 FindAtom([MarshalAs(UnmanagedType.LPWStr)] string lpString);
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
1215[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UInt16))]
netstandard (1)
netstandard.cs (1)
2216[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UInt16))]
PresentationBuildTasks (3)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\KnownTypes.cs (1)
5495case KnownElements.UInt16: t = typeof(UInt16); break;
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlInt32CollectionSerializer.cs (1)
148else if ( allPositive && max <= UInt16.MaxValue )
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\TypeConverterHelper.cs (1)
172else if (typeof(UInt16).IsAssignableFrom(type))
PresentationCore (23)
MS\Internal\Ink\InkSerializedFormat\SerializationHelper.cs (2)
234else if (typeof(UInt16) == type) 238else if (typeof(UInt16[]) == type)
MS\Win32\UnsafeNativeMethodsPointer.cs (3)
310internal UInt16 usagePageId; 311internal UInt16 usageId; 337internal UInt16 maxActiveContacts;
src\Microsoft.DotNet.Wpf\src\Common\Graphics\exports.cs (2)
1939command.countX = (UInt16)countX; 1940command.countY = (UInt16)countY;
src\Microsoft.DotNet.Wpf\src\Common\Graphics\Generated\wgx_commands.cs (6)
236[FieldOffset(8)] internal UInt16 countX; 237[FieldOffset(12)] internal UInt16 countY; 400[FieldOffset(16)] internal UInt16 GlyphRunFlags; 404[FieldOffset(64)] internal UInt16 GlyphCount; 405[FieldOffset(68)] internal UInt16 BidiLevel; 406[FieldOffset(72)] internal UInt16 DWriteTextMeasuringMethod;
System\Windows\Media\ColorTransform.cs (3)
139Span<UInt16> channel = stackalloc UInt16[4]; 153channel[i] = (UInt16)(srcValue[i] * (float)0xFFFF);
System\Windows\Media\GlyphRun.cs (7)
1874command.GlyphCount = checked((UInt16)glyphCount); 1875command.BidiLevel = checked((UInt16)_bidiLevel); 1877command.DWriteTextMeasuringMethod = (UInt16)DWriteTypeConverter. 1998private UInt16 ComposeFlags() 2000UInt16 flags = 0; 2003flags |= (UInt16)MilGlyphRun.Sideways; 2006flags |= (UInt16)MilGlyphRun.HasOffsets;
PresentationFramework (32)
MS\Internal\Data\DefaultValueConverter.cs (2)
529typeof(UInt32), typeof(UInt64), typeof(UInt16), typeof(SByte), // non-CLS compliant types 536typeof(UInt32), typeof(UInt64), typeof(UInt16), typeof(SByte), // non-CLS compliant types
MS\Internal\Printing\NativeMethods.cs (5)
85public UInt16 dmSpecVersion; 86public UInt16 dmDriverVersion; 87public UInt16 dmSize; 88public UInt16 dmDriverExtra; 103public UInt16 dmLogPixels;
System\windows\Documents\SelectionWordBreaker.cs (15)
75Span<UInt16> charType3 = stackalloc UInt16[2]; 154private static bool IsIdeographicCharType(UInt16 charType3) 162private static bool IsSameClass(UInt16 preceedingType3, CharClass preceedingClass, 163UInt16 followingType3, CharClass followingClass) 165const UInt16 IdeographicKanaTypes = SafeNativeMethods.C3_HALFWIDTH | SafeNativeMethods.C3_FULLWIDTH | SafeNativeMethods.C3_KATAKANA | SafeNativeMethods.C3_HIRAGANA; 166const UInt16 IdeographicTypes = IdeographicKanaTypes | SafeNativeMethods.C3_IDEOGRAPH; 177UInt16 typeDelta = (UInt16)((preceedingType3 & IdeographicTypes) ^ (followingType3 & IdeographicTypes)); 205UInt16 charType1 = UInt16.MinValue; 230SafeNativeMethods.GetStringTypeEx(0 /* ignored */, SafeNativeMethods.CT_CTYPE1, [ch], new Span<UInt16>(ref charType1)); 262UInt16 charType3 = UInt16.MinValue; 264SafeNativeMethods.GetStringTypeEx(0 /* ignored */, SafeNativeMethods.CT_CTYPE3, [ch], new Span<UInt16>(ref charType3));
System\Windows\Documents\TextFindEngine.cs (6)
106UInt16 startCharType1 = UInt16.MinValue; 107UInt16 endCharType1 = UInt16.MinValue; 110SafeNativeMethods.GetStringTypeEx(0 /* ignored */, SafeNativeMethods.CT_CTYPE1, [findPattern[0]], new Span<UInt16>(ref startCharType1)); 111SafeNativeMethods.GetStringTypeEx(0 /* ignored */, SafeNativeMethods.CT_CTYPE1, [findPattern[findPattern.Length - 1]], new Span<UInt16>(ref endCharType1));
System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
788case 695: t = () => typeof(UInt16); break;
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
11883typeof(System.UInt16),
System\Windows\Markup\KnownTypes.cs (1)
6242case KnownElements.UInt16: t = typeof(System.UInt16); break;
System\Windows\Markup\XamlInt32CollectionSerializer.cs (1)
148else if ( allPositive && max <= UInt16.MaxValue )
Roslyn.Test.PdbUtilities (5)
Reader\Token2SourceLineExporter.cs (5)
256this.ReadUInt16(out var len); 287ReadUInt16(out var b); 288ReadUInt16(out var c); 1302bits.ReadUInt16(out var siz); 1306bits.ReadUInt16(out var rec);
System.Linq.Expressions (3)
System\Linq\Expressions\Interpreter\CallInstruction.Generated.cs (3)
66case TypeCode.UInt16: return FastCreate<UInt16>(target, pi); 110case TypeCode.UInt16: return FastCreate<T0, UInt16>(target, pi); 152case TypeCode.UInt16: return new FuncCallInstruction<T0, T1, UInt16>(target);
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (1)
1964ushort IConvertible.ToUInt16(IFormatProvider? provider) => throw InvalidCast(nameof(UInt16));
System.Reflection.Metadata (2)
System\Reflection\Metadata\IL\MethodBodyBlock.cs (2)
198var tryOffset = memReader.ReadUInt16(); 200var handlerOffset = memReader.ReadUInt16();
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
866[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UInt16))]
UIAutomationTypes (2)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (2)
2070return (UInt16)(0xFFFF & (UInt16) val);