1509 references to As
GenerateDocumentationAndConfigFiles (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150return Unsafe.As<TFromEnum, TToEnum>(ref value);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ModifierExtensions.cs (1)
16return Unsafe.As<Modifiers, DeclarationModifiers>(ref modifiers);
http2cat (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171ref Unsafe.As<char, byte>(
IIS.FunctionalTests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171ref Unsafe.As<char, byte>(
IIS.LongTests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171ref Unsafe.As<char, byte>(
IIS.NewHandler.FunctionalTests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171ref Unsafe.As<char, byte>(
IIS.ShadowCopy.Tests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171ref Unsafe.As<char, byte>(
IISExpress.FunctionalTests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171ref Unsafe.As<char, byte>(
InMemory.FunctionalTests (26)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (26)
263feature = Unsafe.As<IConnectionIdFeature?, TFeature?>(ref _currentIConnectionIdFeature); 267feature = Unsafe.As<IConnectionTransportFeature?, TFeature?>(ref _currentIConnectionTransportFeature); 271feature = Unsafe.As<IConnectionItemsFeature?, TFeature?>(ref _currentIConnectionItemsFeature); 275feature = Unsafe.As<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature); 279feature = Unsafe.As<IMemoryPoolFeature?, TFeature?>(ref _currentIMemoryPoolFeature); 283feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 287feature = Unsafe.As<IConnectionSocketFeature?, TFeature?>(ref _currentIConnectionSocketFeature); 291feature = Unsafe.As<IProtocolErrorCodeFeature?, TFeature?>(ref _currentIProtocolErrorCodeFeature); 295feature = Unsafe.As<IStreamDirectionFeature?, TFeature?>(ref _currentIStreamDirectionFeature); 299feature = Unsafe.As<IStreamIdFeature?, TFeature?>(ref _currentIStreamIdFeature); 303feature = Unsafe.As<IStreamAbortFeature?, TFeature?>(ref _currentIStreamAbortFeature); 307feature = Unsafe.As<IStreamClosedFeature?, TFeature?>(ref _currentIStreamClosedFeature); 311feature = Unsafe.As<IConnectionMetricsTagsFeature?, TFeature?>(ref _currentIConnectionMetricsTagsFeature); 335_currentIConnectionIdFeature = Unsafe.As<TFeature?, IConnectionIdFeature?>(ref feature); 339_currentIConnectionTransportFeature = Unsafe.As<TFeature?, IConnectionTransportFeature?>(ref feature); 343_currentIConnectionItemsFeature = Unsafe.As<TFeature?, IConnectionItemsFeature?>(ref feature); 347_currentIPersistentStateFeature = Unsafe.As<TFeature?, IPersistentStateFeature?>(ref feature); 351_currentIMemoryPoolFeature = Unsafe.As<TFeature?, IMemoryPoolFeature?>(ref feature); 355_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 359_currentIConnectionSocketFeature = Unsafe.As<TFeature?, IConnectionSocketFeature?>(ref feature); 363_currentIProtocolErrorCodeFeature = Unsafe.As<TFeature?, IProtocolErrorCodeFeature?>(ref feature); 367_currentIStreamDirectionFeature = Unsafe.As<TFeature?, IStreamDirectionFeature?>(ref feature); 371_currentIStreamIdFeature = Unsafe.As<TFeature?, IStreamIdFeature?>(ref feature); 375_currentIStreamAbortFeature = Unsafe.As<TFeature?, IStreamAbortFeature?>(ref feature); 379_currentIStreamClosedFeature = Unsafe.As<TFeature?, IStreamClosedFeature?>(ref feature); 383_currentIConnectionMetricsTagsFeature = Unsafe.As<TFeature?, IConnectionMetricsTagsFeature?>(ref feature);
Metrics (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150return Unsafe.As<TFromEnum, TToEnum>(ref value);
Metrics.Legacy (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150return Unsafe.As<TFromEnum, TToEnum>(ref value);
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\Json\EnumConverter.cs (2)
88integer = Unsafe.As<TEnum, int>(ref value); 100value = Unsafe.As<int, TEnum>(ref integer);
Microsoft.AspNetCore.Routing (2)
Matching\ILEmitTrieFactory.cs (2)
546ref var p = ref Unsafe.As<char, byte>(ref MemoryMarshal.GetReference(span)); 745/// <see cref="Unsafe.As{TFrom, TTo}(ref TFrom)"/> - As[char, byte]
Microsoft.AspNetCore.Server.HttpSys (2)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
113ref Unsafe.As<byte, long>(ref MemoryMarshal.GetReference(timingInfo.Span[sizeof(long)..])),
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171ref Unsafe.As<char, byte>(
Microsoft.AspNetCore.Server.IIS (2)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
113ref Unsafe.As<byte, long>(ref MemoryMarshal.GetReference(timingInfo.Span[sizeof(long)..])),
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171ref Unsafe.As<char, byte>(
Microsoft.AspNetCore.Server.Kestrel.Core (71)
Internal\Http\HttpProtocol.Generated.cs (70)
500feature = Unsafe.As<IHttpRequestFeature?, TFeature?>(ref _currentIHttpRequestFeature); 504feature = Unsafe.As<IHttpResponseFeature?, TFeature?>(ref _currentIHttpResponseFeature); 508feature = Unsafe.As<IHttpResponseBodyFeature?, TFeature?>(ref _currentIHttpResponseBodyFeature); 512feature = Unsafe.As<IRouteValuesFeature?, TFeature?>(ref _currentIRouteValuesFeature); 516feature = Unsafe.As<IEndpointFeature?, TFeature?>(ref _currentIEndpointFeature); 520feature = Unsafe.As<IServiceProvidersFeature?, TFeature?>(ref _currentIServiceProvidersFeature); 524feature = Unsafe.As<IHttpActivityFeature?, TFeature?>(ref _currentIHttpActivityFeature); 528feature = Unsafe.As<IHttpMetricsTagsFeature?, TFeature?>(ref _currentIHttpMetricsTagsFeature); 532feature = Unsafe.As<IItemsFeature?, TFeature?>(ref _currentIItemsFeature); 536feature = Unsafe.As<IQueryFeature?, TFeature?>(ref _currentIQueryFeature); 540feature = Unsafe.As<IRequestBodyPipeFeature?, TFeature?>(ref _currentIRequestBodyPipeFeature); 544feature = Unsafe.As<IFormFeature?, TFeature?>(ref _currentIFormFeature); 548feature = Unsafe.As<IHttpAuthenticationFeature?, TFeature?>(ref _currentIHttpAuthenticationFeature); 552feature = Unsafe.As<IHttpRequestIdentifierFeature?, TFeature?>(ref _currentIHttpRequestIdentifierFeature); 556feature = Unsafe.As<IHttpConnectionFeature?, TFeature?>(ref _currentIHttpConnectionFeature); 560feature = Unsafe.As<ISessionFeature?, TFeature?>(ref _currentISessionFeature); 564feature = Unsafe.As<IResponseCookiesFeature?, TFeature?>(ref _currentIResponseCookiesFeature); 568feature = Unsafe.As<IHttpRequestTrailersFeature?, TFeature?>(ref _currentIHttpRequestTrailersFeature); 572feature = Unsafe.As<IHttpResponseTrailersFeature?, TFeature?>(ref _currentIHttpResponseTrailersFeature); 576feature = Unsafe.As<ITlsConnectionFeature?, TFeature?>(ref _currentITlsConnectionFeature); 580feature = Unsafe.As<IHttpExtendedConnectFeature?, TFeature?>(ref _currentIHttpExtendedConnectFeature); 584feature = Unsafe.As<IHttpUpgradeFeature?, TFeature?>(ref _currentIHttpUpgradeFeature); 588feature = Unsafe.As<IHttpWebSocketFeature?, TFeature?>(ref _currentIHttpWebSocketFeature); 592feature = Unsafe.As<IHttpWebTransportFeature?, TFeature?>(ref _currentIHttpWebTransportFeature); 596feature = Unsafe.As<IBadRequestExceptionFeature?, TFeature?>(ref _currentIBadRequestExceptionFeature); 600feature = Unsafe.As<IHttpRequestTimeoutFeature?, TFeature?>(ref _currentIHttpRequestTimeoutFeature); 604feature = Unsafe.As<IHttp2StreamIdFeature?, TFeature?>(ref _currentIHttp2StreamIdFeature); 608feature = Unsafe.As<IHttpRequestLifetimeFeature?, TFeature?>(ref _currentIHttpRequestLifetimeFeature); 612feature = Unsafe.As<IHttpMaxRequestBodySizeFeature?, TFeature?>(ref _currentIHttpMaxRequestBodySizeFeature); 616feature = Unsafe.As<IHttpMinRequestBodyDataRateFeature?, TFeature?>(ref _currentIHttpMinRequestBodyDataRateFeature); 620feature = Unsafe.As<IHttpMinResponseDataRateFeature?, TFeature?>(ref _currentIHttpMinResponseDataRateFeature); 624feature = Unsafe.As<IHttpBodyControlFeature?, TFeature?>(ref _currentIHttpBodyControlFeature); 628feature = Unsafe.As<IHttpRequestBodyDetectionFeature?, TFeature?>(ref _currentIHttpRequestBodyDetectionFeature); 632feature = Unsafe.As<IHttpResetFeature?, TFeature?>(ref _currentIHttpResetFeature); 636feature = Unsafe.As<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature); 660_currentIHttpRequestFeature = Unsafe.As<TFeature?, IHttpRequestFeature?>(ref feature); 664_currentIHttpResponseFeature = Unsafe.As<TFeature?, IHttpResponseFeature?>(ref feature); 668_currentIHttpResponseBodyFeature = Unsafe.As<TFeature?, IHttpResponseBodyFeature?>(ref feature); 672_currentIRouteValuesFeature = Unsafe.As<TFeature?, IRouteValuesFeature?>(ref feature); 676_currentIEndpointFeature = Unsafe.As<TFeature?, IEndpointFeature?>(ref feature); 680_currentIServiceProvidersFeature = Unsafe.As<TFeature?, IServiceProvidersFeature?>(ref feature); 684_currentIHttpActivityFeature = Unsafe.As<TFeature?, IHttpActivityFeature?>(ref feature); 688_currentIHttpMetricsTagsFeature = Unsafe.As<TFeature?, IHttpMetricsTagsFeature?>(ref feature); 692_currentIItemsFeature = Unsafe.As<TFeature?, IItemsFeature?>(ref feature); 696_currentIQueryFeature = Unsafe.As<TFeature?, IQueryFeature?>(ref feature); 700_currentIRequestBodyPipeFeature = Unsafe.As<TFeature?, IRequestBodyPipeFeature?>(ref feature); 704_currentIFormFeature = Unsafe.As<TFeature?, IFormFeature?>(ref feature); 708_currentIHttpAuthenticationFeature = Unsafe.As<TFeature?, IHttpAuthenticationFeature?>(ref feature); 712_currentIHttpRequestIdentifierFeature = Unsafe.As<TFeature?, IHttpRequestIdentifierFeature?>(ref feature); 716_currentIHttpConnectionFeature = Unsafe.As<TFeature?, IHttpConnectionFeature?>(ref feature); 720_currentISessionFeature = Unsafe.As<TFeature?, ISessionFeature?>(ref feature); 724_currentIResponseCookiesFeature = Unsafe.As<TFeature?, IResponseCookiesFeature?>(ref feature); 728_currentIHttpRequestTrailersFeature = Unsafe.As<TFeature?, IHttpRequestTrailersFeature?>(ref feature); 732_currentIHttpResponseTrailersFeature = Unsafe.As<TFeature?, IHttpResponseTrailersFeature?>(ref feature); 736_currentITlsConnectionFeature = Unsafe.As<TFeature?, ITlsConnectionFeature?>(ref feature); 740_currentIHttpExtendedConnectFeature = Unsafe.As<TFeature?, IHttpExtendedConnectFeature?>(ref feature); 744_currentIHttpUpgradeFeature = Unsafe.As<TFeature?, IHttpUpgradeFeature?>(ref feature); 748_currentIHttpWebSocketFeature = Unsafe.As<TFeature?, IHttpWebSocketFeature?>(ref feature); 752_currentIHttpWebTransportFeature = Unsafe.As<TFeature?, IHttpWebTransportFeature?>(ref feature); 756_currentIBadRequestExceptionFeature = Unsafe.As<TFeature?, IBadRequestExceptionFeature?>(ref feature); 760_currentIHttpRequestTimeoutFeature = Unsafe.As<TFeature?, IHttpRequestTimeoutFeature?>(ref feature); 764_currentIHttp2StreamIdFeature = Unsafe.As<TFeature?, IHttp2StreamIdFeature?>(ref feature); 768_currentIHttpRequestLifetimeFeature = Unsafe.As<TFeature?, IHttpRequestLifetimeFeature?>(ref feature); 772_currentIHttpMaxRequestBodySizeFeature = Unsafe.As<TFeature?, IHttpMaxRequestBodySizeFeature?>(ref feature); 776_currentIHttpMinRequestBodyDataRateFeature = Unsafe.As<TFeature?, IHttpMinRequestBodyDataRateFeature?>(ref feature); 780_currentIHttpMinResponseDataRateFeature = Unsafe.As<TFeature?, IHttpMinResponseDataRateFeature?>(ref feature); 784_currentIHttpBodyControlFeature = Unsafe.As<TFeature?, IHttpBodyControlFeature?>(ref feature); 788_currentIHttpRequestBodyDetectionFeature = Unsafe.As<TFeature?, IHttpRequestBodyDetectionFeature?>(ref feature); 792_currentIHttpResetFeature = Unsafe.As<TFeature?, IHttpResetFeature?>(ref feature); 796_currentIPersistentStateFeature = Unsafe.As<TFeature?, IPersistentStateFeature?>(ref feature);
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171ref Unsafe.As<char, byte>(
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (26)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (26)
263feature = Unsafe.As<IConnectionIdFeature?, TFeature?>(ref _currentIConnectionIdFeature); 267feature = Unsafe.As<IConnectionTransportFeature?, TFeature?>(ref _currentIConnectionTransportFeature); 271feature = Unsafe.As<IConnectionItemsFeature?, TFeature?>(ref _currentIConnectionItemsFeature); 275feature = Unsafe.As<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature); 279feature = Unsafe.As<IMemoryPoolFeature?, TFeature?>(ref _currentIMemoryPoolFeature); 283feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 287feature = Unsafe.As<IConnectionSocketFeature?, TFeature?>(ref _currentIConnectionSocketFeature); 291feature = Unsafe.As<IProtocolErrorCodeFeature?, TFeature?>(ref _currentIProtocolErrorCodeFeature); 295feature = Unsafe.As<IStreamDirectionFeature?, TFeature?>(ref _currentIStreamDirectionFeature); 299feature = Unsafe.As<IStreamIdFeature?, TFeature?>(ref _currentIStreamIdFeature); 303feature = Unsafe.As<IStreamAbortFeature?, TFeature?>(ref _currentIStreamAbortFeature); 307feature = Unsafe.As<IStreamClosedFeature?, TFeature?>(ref _currentIStreamClosedFeature); 311feature = Unsafe.As<IConnectionMetricsTagsFeature?, TFeature?>(ref _currentIConnectionMetricsTagsFeature); 335_currentIConnectionIdFeature = Unsafe.As<TFeature?, IConnectionIdFeature?>(ref feature); 339_currentIConnectionTransportFeature = Unsafe.As<TFeature?, IConnectionTransportFeature?>(ref feature); 343_currentIConnectionItemsFeature = Unsafe.As<TFeature?, IConnectionItemsFeature?>(ref feature); 347_currentIPersistentStateFeature = Unsafe.As<TFeature?, IPersistentStateFeature?>(ref feature); 351_currentIMemoryPoolFeature = Unsafe.As<TFeature?, IMemoryPoolFeature?>(ref feature); 355_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 359_currentIConnectionSocketFeature = Unsafe.As<TFeature?, IConnectionSocketFeature?>(ref feature); 363_currentIProtocolErrorCodeFeature = Unsafe.As<TFeature?, IProtocolErrorCodeFeature?>(ref feature); 367_currentIStreamDirectionFeature = Unsafe.As<TFeature?, IStreamDirectionFeature?>(ref feature); 371_currentIStreamIdFeature = Unsafe.As<TFeature?, IStreamIdFeature?>(ref feature); 375_currentIStreamAbortFeature = Unsafe.As<TFeature?, IStreamAbortFeature?>(ref feature); 379_currentIStreamClosedFeature = Unsafe.As<TFeature?, IStreamClosedFeature?>(ref feature); 383_currentIConnectionMetricsTagsFeature = Unsafe.As<TFeature?, IConnectionMetricsTagsFeature?>(ref feature);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (26)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (26)
263feature = Unsafe.As<IConnectionIdFeature?, TFeature?>(ref _currentIConnectionIdFeature); 267feature = Unsafe.As<IConnectionTransportFeature?, TFeature?>(ref _currentIConnectionTransportFeature); 271feature = Unsafe.As<IConnectionItemsFeature?, TFeature?>(ref _currentIConnectionItemsFeature); 275feature = Unsafe.As<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature); 279feature = Unsafe.As<IMemoryPoolFeature?, TFeature?>(ref _currentIMemoryPoolFeature); 283feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 287feature = Unsafe.As<IConnectionSocketFeature?, TFeature?>(ref _currentIConnectionSocketFeature); 291feature = Unsafe.As<IProtocolErrorCodeFeature?, TFeature?>(ref _currentIProtocolErrorCodeFeature); 295feature = Unsafe.As<IStreamDirectionFeature?, TFeature?>(ref _currentIStreamDirectionFeature); 299feature = Unsafe.As<IStreamIdFeature?, TFeature?>(ref _currentIStreamIdFeature); 303feature = Unsafe.As<IStreamAbortFeature?, TFeature?>(ref _currentIStreamAbortFeature); 307feature = Unsafe.As<IStreamClosedFeature?, TFeature?>(ref _currentIStreamClosedFeature); 311feature = Unsafe.As<IConnectionMetricsTagsFeature?, TFeature?>(ref _currentIConnectionMetricsTagsFeature); 335_currentIConnectionIdFeature = Unsafe.As<TFeature?, IConnectionIdFeature?>(ref feature); 339_currentIConnectionTransportFeature = Unsafe.As<TFeature?, IConnectionTransportFeature?>(ref feature); 343_currentIConnectionItemsFeature = Unsafe.As<TFeature?, IConnectionItemsFeature?>(ref feature); 347_currentIPersistentStateFeature = Unsafe.As<TFeature?, IPersistentStateFeature?>(ref feature); 351_currentIMemoryPoolFeature = Unsafe.As<TFeature?, IMemoryPoolFeature?>(ref feature); 355_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 359_currentIConnectionSocketFeature = Unsafe.As<TFeature?, IConnectionSocketFeature?>(ref feature); 363_currentIProtocolErrorCodeFeature = Unsafe.As<TFeature?, IProtocolErrorCodeFeature?>(ref feature); 367_currentIStreamDirectionFeature = Unsafe.As<TFeature?, IStreamDirectionFeature?>(ref feature); 371_currentIStreamIdFeature = Unsafe.As<TFeature?, IStreamIdFeature?>(ref feature); 375_currentIStreamAbortFeature = Unsafe.As<TFeature?, IStreamAbortFeature?>(ref feature); 379_currentIStreamClosedFeature = Unsafe.As<TFeature?, IStreamClosedFeature?>(ref feature); 383_currentIConnectionMetricsTagsFeature = Unsafe.As<TFeature?, IConnectionMetricsTagsFeature?>(ref feature);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (41)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (26)
263feature = Unsafe.As<IConnectionIdFeature?, TFeature?>(ref _currentIConnectionIdFeature); 267feature = Unsafe.As<IConnectionTransportFeature?, TFeature?>(ref _currentIConnectionTransportFeature); 271feature = Unsafe.As<IConnectionItemsFeature?, TFeature?>(ref _currentIConnectionItemsFeature); 275feature = Unsafe.As<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature); 279feature = Unsafe.As<IMemoryPoolFeature?, TFeature?>(ref _currentIMemoryPoolFeature); 283feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 287feature = Unsafe.As<IConnectionSocketFeature?, TFeature?>(ref _currentIConnectionSocketFeature); 291feature = Unsafe.As<IProtocolErrorCodeFeature?, TFeature?>(ref _currentIProtocolErrorCodeFeature); 295feature = Unsafe.As<IStreamDirectionFeature?, TFeature?>(ref _currentIStreamDirectionFeature); 299feature = Unsafe.As<IStreamIdFeature?, TFeature?>(ref _currentIStreamIdFeature); 303feature = Unsafe.As<IStreamAbortFeature?, TFeature?>(ref _currentIStreamAbortFeature); 307feature = Unsafe.As<IStreamClosedFeature?, TFeature?>(ref _currentIStreamClosedFeature); 311feature = Unsafe.As<IConnectionMetricsTagsFeature?, TFeature?>(ref _currentIConnectionMetricsTagsFeature); 335_currentIConnectionIdFeature = Unsafe.As<TFeature?, IConnectionIdFeature?>(ref feature); 339_currentIConnectionTransportFeature = Unsafe.As<TFeature?, IConnectionTransportFeature?>(ref feature); 343_currentIConnectionItemsFeature = Unsafe.As<TFeature?, IConnectionItemsFeature?>(ref feature); 347_currentIPersistentStateFeature = Unsafe.As<TFeature?, IPersistentStateFeature?>(ref feature); 351_currentIMemoryPoolFeature = Unsafe.As<TFeature?, IMemoryPoolFeature?>(ref feature); 355_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 359_currentIConnectionSocketFeature = Unsafe.As<TFeature?, IConnectionSocketFeature?>(ref feature); 363_currentIProtocolErrorCodeFeature = Unsafe.As<TFeature?, IProtocolErrorCodeFeature?>(ref feature); 367_currentIStreamDirectionFeature = Unsafe.As<TFeature?, IStreamDirectionFeature?>(ref feature); 371_currentIStreamIdFeature = Unsafe.As<TFeature?, IStreamIdFeature?>(ref feature); 375_currentIStreamAbortFeature = Unsafe.As<TFeature?, IStreamAbortFeature?>(ref feature); 379_currentIStreamClosedFeature = Unsafe.As<TFeature?, IStreamClosedFeature?>(ref feature); 383_currentIConnectionMetricsTagsFeature = Unsafe.As<TFeature?, IConnectionMetricsTagsFeature?>(ref feature);
src\Servers\Kestrel\shared\TransportMultiplexedConnection.Generated.cs (14)
202feature = Unsafe.As<IConnectionIdFeature?, TFeature?>(ref _currentIConnectionIdFeature); 206feature = Unsafe.As<IConnectionTransportFeature?, TFeature?>(ref _currentIConnectionTransportFeature); 210feature = Unsafe.As<IConnectionItemsFeature?, TFeature?>(ref _currentIConnectionItemsFeature); 214feature = Unsafe.As<IMemoryPoolFeature?, TFeature?>(ref _currentIMemoryPoolFeature); 218feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 222feature = Unsafe.As<IProtocolErrorCodeFeature?, TFeature?>(ref _currentIProtocolErrorCodeFeature); 226feature = Unsafe.As<ITlsConnectionFeature?, TFeature?>(ref _currentITlsConnectionFeature); 245_currentIConnectionIdFeature = Unsafe.As<TFeature?, IConnectionIdFeature?>(ref feature); 249_currentIConnectionTransportFeature = Unsafe.As<TFeature?, IConnectionTransportFeature?>(ref feature); 253_currentIConnectionItemsFeature = Unsafe.As<TFeature?, IConnectionItemsFeature?>(ref feature); 257_currentIMemoryPoolFeature = Unsafe.As<TFeature?, IMemoryPoolFeature?>(ref feature); 261_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 265_currentIProtocolErrorCodeFeature = Unsafe.As<TFeature?, IProtocolErrorCodeFeature?>(ref feature); 269_currentITlsConnectionFeature = Unsafe.As<TFeature?, ITlsConnectionFeature?>(ref feature);
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171ref Unsafe.As<char, byte>(
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (26)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (26)
263feature = Unsafe.As<IConnectionIdFeature?, TFeature?>(ref _currentIConnectionIdFeature); 267feature = Unsafe.As<IConnectionTransportFeature?, TFeature?>(ref _currentIConnectionTransportFeature); 271feature = Unsafe.As<IConnectionItemsFeature?, TFeature?>(ref _currentIConnectionItemsFeature); 275feature = Unsafe.As<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature); 279feature = Unsafe.As<IMemoryPoolFeature?, TFeature?>(ref _currentIMemoryPoolFeature); 283feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 287feature = Unsafe.As<IConnectionSocketFeature?, TFeature?>(ref _currentIConnectionSocketFeature); 291feature = Unsafe.As<IProtocolErrorCodeFeature?, TFeature?>(ref _currentIProtocolErrorCodeFeature); 295feature = Unsafe.As<IStreamDirectionFeature?, TFeature?>(ref _currentIStreamDirectionFeature); 299feature = Unsafe.As<IStreamIdFeature?, TFeature?>(ref _currentIStreamIdFeature); 303feature = Unsafe.As<IStreamAbortFeature?, TFeature?>(ref _currentIStreamAbortFeature); 307feature = Unsafe.As<IStreamClosedFeature?, TFeature?>(ref _currentIStreamClosedFeature); 311feature = Unsafe.As<IConnectionMetricsTagsFeature?, TFeature?>(ref _currentIConnectionMetricsTagsFeature); 335_currentIConnectionIdFeature = Unsafe.As<TFeature?, IConnectionIdFeature?>(ref feature); 339_currentIConnectionTransportFeature = Unsafe.As<TFeature?, IConnectionTransportFeature?>(ref feature); 343_currentIConnectionItemsFeature = Unsafe.As<TFeature?, IConnectionItemsFeature?>(ref feature); 347_currentIPersistentStateFeature = Unsafe.As<TFeature?, IPersistentStateFeature?>(ref feature); 351_currentIMemoryPoolFeature = Unsafe.As<TFeature?, IMemoryPoolFeature?>(ref feature); 355_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 359_currentIConnectionSocketFeature = Unsafe.As<TFeature?, IConnectionSocketFeature?>(ref feature); 363_currentIProtocolErrorCodeFeature = Unsafe.As<TFeature?, IProtocolErrorCodeFeature?>(ref feature); 367_currentIStreamDirectionFeature = Unsafe.As<TFeature?, IStreamDirectionFeature?>(ref feature); 371_currentIStreamIdFeature = Unsafe.As<TFeature?, IStreamIdFeature?>(ref feature); 375_currentIStreamAbortFeature = Unsafe.As<TFeature?, IStreamAbortFeature?>(ref feature); 379_currentIStreamClosedFeature = Unsafe.As<TFeature?, IStreamClosedFeature?>(ref feature); 383_currentIConnectionMetricsTagsFeature = Unsafe.As<TFeature?, IConnectionMetricsTagsFeature?>(ref feature);
Microsoft.AspNetCore.Shared.Tests (2)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
113ref Unsafe.As<byte, long>(ref MemoryMarshal.GetReference(timingInfo.Span[sizeof(long)..])),
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171ref Unsafe.As<char, byte>(
Microsoft.CodeAnalysis.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150return Unsafe.As<TFromEnum, TToEnum>(ref value);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ModifierExtensions.cs (1)
16return Unsafe.As<Modifiers, DeclarationModifiers>(ref modifiers);
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150return Unsafe.As<TFromEnum, TToEnum>(ref value);
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150return Unsafe.As<TFromEnum, TToEnum>(ref value);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ModifierExtensions.cs (1)
16return Unsafe.As<Modifiers, DeclarationModifiers>(ref modifiers);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150return Unsafe.As<TFromEnum, TToEnum>(ref value);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ModifierExtensions.cs (1)
16return Unsafe.As<Modifiers, DeclarationModifiers>(ref modifiers);
Microsoft.CodeAnalysis.CSharp (1)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2048var result = (TypeKind)Volatile.Read(ref Unsafe.As<TypeKind, byte>(ref _lazyKind));
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150return Unsafe.As<TFromEnum, TToEnum>(ref value);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ModifierExtensions.cs (1)
16return Unsafe.As<Modifiers, DeclarationModifiers>(ref modifiers);
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150return Unsafe.As<TFromEnum, TToEnum>(ref value);
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150return Unsafe.As<TFromEnum, TToEnum>(ref value);
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150return Unsafe.As<TFromEnum, TToEnum>(ref value);
Microsoft.Data.Analysis (12)
PrimitiveColumnContainer.cs (1)
558ReadOnlyDataFrameBuffer<bool> boolLocalBuffer = Unsafe.As<ReadOnlyDataFrameBuffer<T>, ReadOnlyDataFrameBuffer<bool>>(ref localBuffer);
PrimitiveDataFrameColumn.cs (9)
1058newColumn._columnContainer.HandleOperation(operation, Unsafe.As<U, T>(ref value)); 1093newColumn._columnContainer.HandleOperation(operation, Unsafe.As<U, T>(ref value)); 1135newColumn._columnContainer.HandleReverseOperation(operation, Unsafe.As<U, T>(ref value)); 1169newColumn._columnContainer.HandleReverseOperation(operation, Unsafe.As<U, T>(ref value)); 1207retColumn._columnContainer.HandleOperation(operation, Unsafe.As<U, bool>(ref value)); 1364return new BooleanDataFrameColumn(Name, (this as PrimitiveDataFrameColumn<bool>)._columnContainer.HandleOperation(operation, Unsafe.As<U, bool>(ref value))); 1374return new BooleanDataFrameColumn(Name, primitiveColumn._columnContainer.HandleOperation(operation, Unsafe.As<U, T>(ref value))); 1386return new BooleanDataFrameColumn(Name, (this as PrimitiveDataFrameColumn<DateTime>)._columnContainer.HandleOperation(operation, Unsafe.As<U, DateTime>(ref value))); 1406return new BooleanDataFrameColumn(Name, primitiveColumn._columnContainer.HandleOperation(operation, Unsafe.As<U, T>(ref value)));
PrimitiveDataFrameColumn.Sort.cs (1)
63ReadOnlyMemory<T> typedBuffer = Unsafe.As<ReadOnlyMemory<byte>, ReadOnlyMemory<T>>(ref buffer);
ReadOnlyDataFrameBuffer.cs (1)
31return Unsafe.As<ReadOnlyMemory<byte>, ReadOnlyMemory<T>>(ref memory);
Microsoft.Maui.Controls.BindingSourceGen (2)
EquatableArray.cs (2)
17 this.array = Unsafe.As<ImmutableArray<T>, T[]?>(ref array); 65 return Unsafe.As<T[]?, ImmutableArray<T>>(ref Unsafe.AsRef(in this.array));
Roslyn.Diagnostics.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150return Unsafe.As<TFromEnum, TToEnum>(ref value);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ModifierExtensions.cs (1)
16return Unsafe.As<Modifiers, DeclarationModifiers>(ref modifiers);
System.DirectoryServices.Protocols (1)
System\DirectoryServices\Protocols\ldap\LdapSessionOptions.cs (1)
118internal ref readonly byte GetPinnableReference() => ref Unsafe.As<SecurityProtocol, byte>(ref _securityProtocol);
System.Drawing.Common (1)
System\Drawing\SystemFonts.cs (1)
268GetFontFromData(Unsafe.As<LOGFONTW, LOGFONT>(ref Unsafe.AsRef(in logFont)));
System.Memory (2)
System\Buffers\ReadOnlySequence.cs (1)
494ReadOnlySequence<char> charSequence = Unsafe.As<ReadOnlySequence<T>, ReadOnlySequence<char>>(ref localThis);
System\Buffers\ReadOnlySequence.Helpers.cs (1)
688return MemoryMarshal.CreateReadOnlySpan(ref Unsafe.As<char, T>(ref MemoryMarshal.GetReference(spanOfChar)), spanOfChar.Length);
System.Net.Quic (2)
System\Net\Quic\Internal\ResettableValueTaskSource.cs (1)
58public bool IsCompleted => (State)Volatile.Read(ref Unsafe.As<State, byte>(ref _state)) == State.Completed;
System\Net\Quic\Internal\ValueTaskSource.cs (1)
41public bool IsCompleted => (State)Volatile.Read(ref Unsafe.As<State, byte>(ref _state)) == State.Completed;
System.Net.Sockets (1)
System\Net\Sockets\SocketAsyncContext.Unix.cs (1)
818QueueState state = (QueueState)Volatile.Read(ref Unsafe.As<QueueState, int>(ref _state));
System.Numerics.Tensors (49)
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IAggregationOperator.cs (24)
2396ref Unsafe.As<byte, T>(ref MemoryMarshal.GetReference(AlignmentByteMask_64x65)), 2403ref Unsafe.As<ushort, T>(ref MemoryMarshal.GetReference(AlignmentUInt16Mask_32x33)), 2410ref Unsafe.As<uint, T>(ref MemoryMarshal.GetReference(AlignmentUInt32Mask_16x17)), 2417ref Unsafe.As<ulong, T>(ref MemoryMarshal.GetReference(AlignmentUInt64Mask_8x9)), 2432ref Unsafe.As<byte, T>(ref MemoryMarshal.GetReference(AlignmentByteMask_64x65)), 2439ref Unsafe.As<ushort, T>(ref MemoryMarshal.GetReference(AlignmentUInt16Mask_32x33)), 2446ref Unsafe.As<uint, T>(ref MemoryMarshal.GetReference(AlignmentUInt32Mask_16x17)), 2453ref Unsafe.As<ulong, T>(ref MemoryMarshal.GetReference(AlignmentUInt64Mask_8x9)), 2468ref Unsafe.As<byte, T>(ref MemoryMarshal.GetReference(AlignmentByteMask_64x65)), 2475ref Unsafe.As<ushort, T>(ref MemoryMarshal.GetReference(AlignmentUInt16Mask_32x33)), 2482ref Unsafe.As<uint, T>(ref MemoryMarshal.GetReference(AlignmentUInt32Mask_16x17)), 2489ref Unsafe.As<ulong, T>(ref MemoryMarshal.GetReference(AlignmentUInt64Mask_8x9)), 2504ref Unsafe.As<byte, T>(ref MemoryMarshal.GetReference(RemainderByteMask_64x65)), 2511ref Unsafe.As<ushort, T>(ref MemoryMarshal.GetReference(RemainderUInt16Mask_32x33)), 2518ref Unsafe.As<uint, T>(ref MemoryMarshal.GetReference(RemainderUInt32Mask_16x17)), 2525ref Unsafe.As<ulong, T>(ref MemoryMarshal.GetReference(RemainderUInt64Mask_8x9)), 2540ref Unsafe.As<byte, T>(ref MemoryMarshal.GetReference(RemainderByteMask_64x65)), 2547ref Unsafe.As<ushort, T>(ref MemoryMarshal.GetReference(RemainderUInt16Mask_32x33)), 2554ref Unsafe.As<uint, T>(ref MemoryMarshal.GetReference(RemainderUInt32Mask_16x17)), 2561ref Unsafe.As<ulong, T>(ref MemoryMarshal.GetReference(RemainderUInt64Mask_8x9)), 2576ref Unsafe.As<byte, T>(ref MemoryMarshal.GetReference(RemainderByteMask_64x65)), 2583ref Unsafe.As<ushort, T>(ref MemoryMarshal.GetReference(RemainderUInt16Mask_32x33)), 2590ref Unsafe.As<uint, T>(ref MemoryMarshal.GetReference(RemainderUInt32Mask_16x17)), 2597ref Unsafe.As<ulong, T>(ref MemoryMarshal.GetReference(RemainderUInt64Mask_8x9)),
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IBooleanUnaryOperator.cs (12)
243(v & Vector512<byte>.One).StoreUnsafe(ref Unsafe.As<bool, byte>(ref destinationRef), (uint)i); 274(v & Vector256<byte>.One).StoreUnsafe(ref Unsafe.As<bool, byte>(ref destinationRef), (uint)i); 305(v & Vector128<byte>.One).StoreUnsafe(ref Unsafe.As<bool, byte>(ref destinationRef), (uint)i); 354(v & Vector512<byte>.One).StoreUnsafe(ref Unsafe.As<bool, byte>(ref destinationRef), (uint)i); 388(v & Vector256<byte>.One).StoreUnsafe(ref Unsafe.As<bool, byte>(ref destinationRef), (uint)i); 422(v & Vector128<byte>.One).StoreUnsafe(ref Unsafe.As<bool, byte>(ref destinationRef), (uint)i); 475(v & Vector512<byte>.One).StoreUnsafe(ref Unsafe.As<bool, byte>(ref destinationRef), (uint)i); 513(v & Vector256<byte>.One).StoreUnsafe(ref Unsafe.As<bool, byte>(ref destinationRef), (uint)i); 551(v & Vector128<byte>.One).StoreUnsafe(ref Unsafe.As<bool, byte>(ref destinationRef), (uint)i); 612(v & Vector512<byte>.One).StoreUnsafe(ref Unsafe.As<bool, byte>(ref destinationRef), (uint)i); 660(v & Vector256<byte>.One).StoreUnsafe(ref Unsafe.As<bool, byte>(ref destinationRef), (uint)i); 708(v & Vector128<byte>.One).StoreUnsafe(ref Unsafe.As<bool, byte>(ref destinationRef), (uint)i);
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (3)
155? ref Unsafe.As<byte, T>(ref MemoryMarshal.GetArrayDataReference(array)) 182? ref Unsafe.Add(ref Unsafe.As<byte, T>(ref MemoryMarshal.GetArrayDataReference(array)), linearOffset) 324ref Unsafe.As<TDerived, T>(ref items._reference),
System\Numerics\Tensors\netcore\TensorPrimitives.CosineSimilarity.cs (6)
203ref short xRef = ref Unsafe.As<Half, short>(ref MemoryMarshal.GetReference(x)); 204ref short yRef = ref Unsafe.As<Half, short>(ref MemoryMarshal.GetReference(y)); 245ref short xRef = ref Unsafe.As<Half, short>(ref MemoryMarshal.GetReference(x)); 246ref short yRef = ref Unsafe.As<Half, short>(ref MemoryMarshal.GetReference(y)); 287ref short xRef = ref Unsafe.As<Half, short>(ref MemoryMarshal.GetReference(x)); 288ref short yRef = ref Unsafe.As<Half, short>(ref MemoryMarshal.GetReference(y));
System\Numerics\Tensors\netcore\TensorPrimitives.HammingDistance.cs (2)
55MemoryMarshal.CreateReadOnlySpan(ref Unsafe.As<T, ushort>(ref MemoryMarshal.GetReference(x)), x.Length), 56MemoryMarshal.CreateReadOnlySpan(ref Unsafe.As<T, ushort>(ref MemoryMarshal.GetReference(y)), y.Length));
System\Numerics\Tensors\netcore\TensorSpan_1.cs (2)
101? ref Unsafe.As<byte, T>(ref MemoryMarshal.GetArrayDataReference(array)) 113? ref Unsafe.Add(ref Unsafe.As<byte, T>(ref MemoryMarshal.GetArrayDataReference(array)), linearOffset)
System.Private.CoreLib (872)
src\libraries\System.Private.CoreLib\src\System\Activator.RuntimeType.cs (2)
152return Unsafe.As<object, T>(ref o); 157rtType.CallDefaultStructConstructor(ref Unsafe.As<T, byte>(ref t));
src\libraries\System.Private.CoreLib\src\System\Array.cs (19)
543ref object? srcData = ref Unsafe.Add(ref Unsafe.As<byte, object?>(ref MemoryMarshal.GetArrayDataReference(sourceArray)), sourceIndex); 589ref object? destData = ref Unsafe.Add(ref Unsafe.As<byte, object?>(ref MemoryMarshal.GetArrayDataReference(destinationArray)), destinationIndex); 611ref object? srcData = ref Unsafe.Add(ref Unsafe.As<byte, object?>(ref MemoryMarshal.GetArrayDataReference(sourceArray)), sourceIndex); 612ref object? destData = ref Unsafe.Add(ref Unsafe.As<byte, object?>(ref MemoryMarshal.GetArrayDataReference(destinationArray)), destinationIndex); 680SpanHelpers.ClearWithReferences(ref Unsafe.As<byte, IntPtr>(ref pStart), totalByteLength / (nuint)sizeof(IntPtr)); 701lowerBound = Unsafe.Add(ref Unsafe.As<byte, int>(ref p), rank); 716SpanHelpers.ClearWithReferences(ref Unsafe.As<byte, IntPtr>(ref ptr), byteLength / (uint)sizeof(IntPtr)); 1344=> UnsafeArrayAsSpan<T>(array, adjustedIndex, length).BinarySearch(Unsafe.As<byte, T>(ref value.GetRawData())); 1852=> UnsafeArrayAsSpan<T>(array, adjustedIndex, length).IndexOf(Unsafe.As<byte, T>(ref value.GetRawData())); 1919ref Unsafe.Add(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetArrayDataReference(array)), startIndex), 1927ref Unsafe.Add(ref Unsafe.As<T, short>(ref MemoryMarshal.GetArrayDataReference(array)), startIndex), 1935ref Unsafe.Add(ref Unsafe.As<T, int>(ref MemoryMarshal.GetArrayDataReference(array)), startIndex), 1943ref Unsafe.Add(ref Unsafe.As<T, long>(ref MemoryMarshal.GetArrayDataReference(array)), startIndex), 2079=> UnsafeArrayAsSpan<T>(array, adjustedIndex, length).LastIndexOf(Unsafe.As<byte, T>(ref value.GetRawData())); 2164ref Unsafe.Add(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex), 2174ref Unsafe.Add(ref Unsafe.As<T, short>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex), 2184ref Unsafe.Add(ref Unsafe.As<T, int>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex), 2194ref Unsafe.Add(ref Unsafe.As<T, long>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex), 3073new Span<T>(ref Unsafe.As<byte, T>(ref MemoryMarshal.GetArrayDataReference(array)), array.Length).Slice(adjustedIndex, length);
src\libraries\System.Private.CoreLib\src\System\Buffer.cs (4)
137ref Unsafe.As<T, byte>(ref destination), 138ref Unsafe.As<T, byte>(ref source), 145ref Unsafe.As<T, byte>(ref destination), 146ref Unsafe.As<T, byte>(ref source),
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Signed.cs (4)
59return TryParseByteX(source, out Unsafe.As<sbyte, byte>(ref value), out bytesConsumed); 111return TryParseUInt16X(source, out Unsafe.As<short, ushort>(ref value), out bytesConsumed); 163return TryParseUInt32X(source, out Unsafe.As<int, uint>(ref value), out bytesConsumed); 215return TryParseUInt64X(source, out Unsafe.As<long, ulong>(ref value), out bytesConsumed);
src\libraries\System.Private.CoreLib\src\System\ByReference.cs (1)
17public static ByReference Create<T>(ref T p) => new ByReference(ref Unsafe.As<T, byte>(ref p));
src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (1)
173ref byte value = ref Unsafe.As<bool, byte>(ref MemoryMarshal.GetArrayDataReference<bool>(values));
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\RandomizedStringEqualityComparer.cs (1)
90ref Unsafe.As<char, byte>(ref MemoryMarshal.GetReference(alternate)),
src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (3)
24private static ref DecCalc AsMutable(ref decimal d) => ref Unsafe.As<decimal, DecCalc>(ref d); 2218int cmp = VarDecCmpSub(in Unsafe.As<DecCalc, decimal>(ref d1), in Unsafe.As<DecCalc, decimal>(ref d2));
src\libraries\System.Private.CoreLib\src\System\Enum.cs (101)
421ushort flagsValue = Unsafe.As<byte, ushort>(ref pFlagsValue); 422return (Unsafe.As<byte, ushort>(ref pThisValue) & flagsValue) == flagsValue; 428uint flagsValue = Unsafe.As<byte, uint>(ref pFlagsValue); 429return (Unsafe.As<byte, uint>(ref pThisValue) & flagsValue) == flagsValue; 435ulong flagsValue = Unsafe.As<byte, ulong>(ref pFlagsValue); 436return (Unsafe.As<byte, ulong>(ref pThisValue) & flagsValue) == flagsValue; 894if (underlyingType == typeof(sbyte)) return TryParseByValueOrName<sbyte, byte>(rt, value, ignoreCase, throwOnFailure, out Unsafe.As<TEnum, sbyte>(ref result)); 895if (underlyingType == typeof(byte)) return TryParseByValueOrName<byte, byte>(rt, value, ignoreCase, throwOnFailure, out Unsafe.As<TEnum, byte>(ref result)); 896if (underlyingType == typeof(short)) return TryParseByValueOrName<short, ushort>(rt, value, ignoreCase, throwOnFailure, out Unsafe.As<TEnum, short>(ref result)); 897if (underlyingType == typeof(ushort)) return TryParseByValueOrName<ushort, ushort>(rt, value, ignoreCase, throwOnFailure, out Unsafe.As<TEnum, ushort>(ref result)); 898if (underlyingType == typeof(int)) return TryParseByValueOrName<int, uint>(rt, value, ignoreCase, throwOnFailure, out Unsafe.As<TEnum, int>(ref result)); 899if (underlyingType == typeof(uint)) return TryParseByValueOrName<uint, uint>(rt, value, ignoreCase, throwOnFailure, out Unsafe.As<TEnum, uint>(ref result)); 900if (underlyingType == typeof(long)) return TryParseByValueOrName<long, ulong>(rt, value, ignoreCase, throwOnFailure, out Unsafe.As<TEnum, long>(ref result)); 901if (underlyingType == typeof(ulong)) return TryParseByValueOrName<ulong, ulong>(rt, value, ignoreCase, throwOnFailure, out Unsafe.As<TEnum, ulong>(ref result)); 903if (underlyingType == typeof(nint)) return TryParseRareTypeByValueOrName<nint, nuint>(rt, value, ignoreCase, throwOnFailure, out Unsafe.As<TEnum, nint>(ref result)); 904if (underlyingType == typeof(nuint)) return TryParseRareTypeByValueOrName<nuint, nuint>(rt, value, ignoreCase, throwOnFailure, out Unsafe.As<TEnum, nuint>(ref result)); 905if (underlyingType == typeof(float)) return TryParseRareTypeByValueOrName<float, float>(rt, value, ignoreCase, throwOnFailure, out Unsafe.As<TEnum, float>(ref result)); 906if (underlyingType == typeof(double)) return TryParseRareTypeByValueOrName<double, double>(rt, value, ignoreCase, throwOnFailure, out Unsafe.As<TEnum, double>(ref result)); 907if (underlyingType == typeof(char)) return TryParseRareTypeByValueOrName<char, char>(rt, value, ignoreCase, throwOnFailure, out Unsafe.As<TEnum, char>(ref result)); 938return TryParseByName(enumType, value, ignoreCase, throwOnFailure, out Unsafe.As<TUnderlying, TStorage>(ref result)); 953return TryParseByName(enumType, value, ignoreCase, throwOnFailure, out Unsafe.As<TUnderlying, TStorage>(ref result)); 996return TryParseByName(enumType, value, ignoreCase, throwOnFailure, out Unsafe.As<TUnderlying, TStorage>(ref result)); 1020return TryParseByName(enumType, value, ignoreCase, throwOnFailure, out Unsafe.As<TUnderlying, TStorage>(ref result)); 1169CorElementType.ELEMENT_TYPE_I1 => Unsafe.As<byte, sbyte>(ref data), 1171CorElementType.ELEMENT_TYPE_I2 => Unsafe.As<byte, short>(ref data), 1172CorElementType.ELEMENT_TYPE_U2 => Unsafe.As<byte, ushort>(ref data), 1173CorElementType.ELEMENT_TYPE_I4 => Unsafe.As<byte, int>(ref data), 1174CorElementType.ELEMENT_TYPE_U4 => Unsafe.As<byte, uint>(ref data), 1175CorElementType.ELEMENT_TYPE_I8 => Unsafe.As<byte, long>(ref data), 1176CorElementType.ELEMENT_TYPE_U8 => Unsafe.As<byte, ulong>(ref data), 1178CorElementType.ELEMENT_TYPE_R4 => Unsafe.As<byte, float>(ref data), 1179CorElementType.ELEMENT_TYPE_R8 => Unsafe.As<byte, double>(ref data), 1180CorElementType.ELEMENT_TYPE_I => Unsafe.As<byte, IntPtr>(ref data), 1181CorElementType.ELEMENT_TYPE_U => Unsafe.As<byte, UIntPtr>(ref data), 1182CorElementType.ELEMENT_TYPE_CHAR => Unsafe.As<byte, char>(ref data), 1183CorElementType.ELEMENT_TYPE_BOOLEAN => Unsafe.As<byte, bool>(ref data), 1213return Unsafe.As<byte, ushort>(ref pThisValue) == Unsafe.As<byte, ushort>(ref pOtherValue); 1217return Unsafe.As<byte, uint>(ref pThisValue) == Unsafe.As<byte, uint>(ref pOtherValue); 1221return Unsafe.As<byte, ulong>(ref pThisValue) == Unsafe.As<byte, ulong>(ref pOtherValue); 1260CorElementType.ELEMENT_TYPE_I1 => Unsafe.As<byte, sbyte>(ref data).GetHashCode(), 1262CorElementType.ELEMENT_TYPE_I2 => Unsafe.As<byte, short>(ref data).GetHashCode(), 1263CorElementType.ELEMENT_TYPE_U2 => Unsafe.As<byte, ushort>(ref data).GetHashCode(), 1264CorElementType.ELEMENT_TYPE_I4 => Unsafe.As<byte, int>(ref data).GetHashCode(), 1265CorElementType.ELEMENT_TYPE_U4 => Unsafe.As<byte, uint>(ref data).GetHashCode(), 1266CorElementType.ELEMENT_TYPE_I8 => Unsafe.As<byte, long>(ref data).GetHashCode(), 1267CorElementType.ELEMENT_TYPE_U8 => Unsafe.As<byte, ulong>(ref data).GetHashCode(), 1269CorElementType.ELEMENT_TYPE_R4 => Unsafe.As<byte, float>(ref data).GetHashCode(), 1270CorElementType.ELEMENT_TYPE_R8 => Unsafe.As<byte, double>(ref data).GetHashCode(), 1271CorElementType.ELEMENT_TYPE_I => Unsafe.As<byte, IntPtr>(ref data).GetHashCode(), 1272CorElementType.ELEMENT_TYPE_U => Unsafe.As<byte, UIntPtr>(ref data).GetHashCode(), 1273CorElementType.ELEMENT_TYPE_CHAR => Unsafe.As<byte, char>(ref data).GetHashCode(), 1274CorElementType.ELEMENT_TYPE_BOOLEAN => Unsafe.As<byte, bool>(ref data).GetHashCode(), 1298return Unsafe.As<byte, sbyte>(ref pThisValue).CompareTo(Unsafe.As<byte, sbyte>(ref pTargetValue)); 1304return Unsafe.As<byte, short>(ref pThisValue).CompareTo(Unsafe.As<byte, short>(ref pTargetValue)); 1307return Unsafe.As<byte, ushort>(ref pThisValue).CompareTo(Unsafe.As<byte, ushort>(ref pTargetValue)); 1310return Unsafe.As<byte, int>(ref pThisValue).CompareTo(Unsafe.As<byte, int>(ref pTargetValue)); 1313return Unsafe.As<byte, uint>(ref pThisValue).CompareTo(Unsafe.As<byte, uint>(ref pTargetValue)); 1316return Unsafe.As<byte, long>(ref pThisValue).CompareTo(Unsafe.As<byte, long>(ref pTargetValue)); 1319return Unsafe.As<byte, ulong>(ref pThisValue).CompareTo(Unsafe.As<byte, ulong>(ref pTargetValue)); 1323return Unsafe.As<byte, float>(ref pThisValue).CompareTo(Unsafe.As<byte, float>(ref pTargetValue)); 1326return Unsafe.As<byte, double>(ref pThisValue).CompareTo(Unsafe.As<byte, double>(ref pTargetValue)); 1470TStorage value = Unsafe.As<byte, TStorage>(ref rawData); 1500TStorage value = Unsafe.As<byte, TStorage>(ref rawData); 1567ushort value = Unsafe.As<byte, ushort>(ref data); 1578uint value = Unsafe.As<byte, uint>(ref data); 1591ulong value = Unsafe.As<byte, ulong>(ref data); 1700CorElementType.ELEMENT_TYPE_I2 => TryFormatPrimitiveDefault<short, ushort>(enumType, Unsafe.As<byte, short>(ref rawData), destination, out charsWritten), 1701CorElementType.ELEMENT_TYPE_U2 => TryFormatPrimitiveDefault<ushort, ushort>(enumType, Unsafe.As<byte, ushort>(ref rawData), destination, out charsWritten), 1702CorElementType.ELEMENT_TYPE_I4 => TryFormatPrimitiveDefault<int, uint>(enumType, Unsafe.As<byte, int>(ref rawData), destination, out charsWritten), 1703CorElementType.ELEMENT_TYPE_U4 => TryFormatPrimitiveDefault<uint, uint>(enumType, Unsafe.As<byte, uint>(ref rawData), destination, out charsWritten), 1704CorElementType.ELEMENT_TYPE_I8 => TryFormatPrimitiveDefault<long, ulong>(enumType, Unsafe.As<byte, long>(ref rawData), destination, out charsWritten), 1705CorElementType.ELEMENT_TYPE_U8 => TryFormatPrimitiveDefault<ulong, ulong>(enumType, Unsafe.As<byte, ulong>(ref rawData), destination, out charsWritten), 1707CorElementType.ELEMENT_TYPE_R4 => TryFormatPrimitiveDefault<float, float>(enumType, Unsafe.As<byte, float>(ref rawData), destination, out charsWritten), 1708CorElementType.ELEMENT_TYPE_R8 => TryFormatPrimitiveDefault<double, double>(enumType, Unsafe.As<byte, double>(ref rawData), destination, out charsWritten), 1709CorElementType.ELEMENT_TYPE_I => TryFormatPrimitiveDefault<nint, nuint>(enumType, Unsafe.As<byte, nint>(ref rawData), destination, out charsWritten), 1710CorElementType.ELEMENT_TYPE_U => TryFormatPrimitiveDefault<nuint, nuint>(enumType, Unsafe.As<byte, nuint>(ref rawData), destination, out charsWritten), 1711CorElementType.ELEMENT_TYPE_CHAR => TryFormatPrimitiveDefault<char, char>(enumType, Unsafe.As<byte, char>(ref rawData), destination, out charsWritten), 1722CorElementType.ELEMENT_TYPE_I2 => TryFormatPrimitiveNonDefault<short, ushort>(enumType, Unsafe.As<byte, short>(ref rawData), destination, out charsWritten, format), 1723CorElementType.ELEMENT_TYPE_U2 => TryFormatPrimitiveNonDefault<ushort, ushort>(enumType, Unsafe.As<byte, ushort>(ref rawData), destination, out charsWritten, format), 1724CorElementType.ELEMENT_TYPE_I4 => TryFormatPrimitiveNonDefault<int, uint>(enumType, Unsafe.As<byte, int>(ref rawData), destination, out charsWritten, format), 1725CorElementType.ELEMENT_TYPE_U4 => TryFormatPrimitiveNonDefault<uint, uint>(enumType, Unsafe.As<byte, uint>(ref rawData), destination, out charsWritten, format), 1726CorElementType.ELEMENT_TYPE_I8 => TryFormatPrimitiveNonDefault<long, ulong>(enumType, Unsafe.As<byte, long>(ref rawData), destination, out charsWritten, format), 1727CorElementType.ELEMENT_TYPE_U8 => TryFormatPrimitiveNonDefault<ulong, ulong>(enumType, Unsafe.As<byte, ulong>(ref rawData), destination, out charsWritten, format), 1729CorElementType.ELEMENT_TYPE_R4 => TryFormatPrimitiveNonDefault<float, float>(enumType, Unsafe.As<byte, float>(ref rawData), destination, out charsWritten, format), 1730CorElementType.ELEMENT_TYPE_R8 => TryFormatPrimitiveNonDefault<double, double>(enumType, Unsafe.As<byte, double>(ref rawData), destination, out charsWritten, format), 1731CorElementType.ELEMENT_TYPE_I => TryFormatPrimitiveNonDefault<nint, nuint>(enumType, Unsafe.As<byte, nint>(ref rawData), destination, out charsWritten, format), 1732CorElementType.ELEMENT_TYPE_U => TryFormatPrimitiveNonDefault<nuint, nuint>(enumType, Unsafe.As<byte, nuint>(ref rawData), destination, out charsWritten, format), 1733CorElementType.ELEMENT_TYPE_CHAR => TryFormatPrimitiveNonDefault<char, char>(enumType, Unsafe.As<byte, char>(ref rawData), destination, out charsWritten, format), 1911return TryFormatNumberAsHex<TStorage>(ref Unsafe.As<TUnderlying, byte>(ref value), destination, out charsWritten);
src\libraries\System.Private.CoreLib\src\System\Globalization\CharUnicodeInfo.cs (4)
287ref short rsStart = ref Unsafe.As<byte, short>(ref MemoryMarshal.GetReference(UppercaseValues)); 306ref ushort rsStart = ref Unsafe.As<byte, ushort>(ref MemoryMarshal.GetReference(UppercaseValues)); 322ref short rsStart = ref Unsafe.As<byte, short>(ref MemoryMarshal.GetReference(LowercaseValues)); 341ref ushort rsStart = ref Unsafe.As<byte, ushort>(ref MemoryMarshal.GetReference(LowercaseValues));
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (8)
96vec1 = TVector.LoadUnsafe(ref Unsafe.As<char, ushort>(ref charA), i); 97vec2 = TVector.LoadUnsafe(ref Unsafe.As<char, ushort>(ref charB), i); 123vec1 = TVector.LoadUnsafe(ref Unsafe.As<char, ushort>(ref charA), i); 124vec2 = TVector.LoadUnsafe(ref Unsafe.As<char, ushort>(ref charB), i); 187valueAu64 = Unsafe.ReadUnaligned<ulong>(ref Unsafe.As<char, byte>(ref Unsafe.AddByteOffset(ref charA, byteOffset))); 188valueBu64 = Unsafe.ReadUnaligned<ulong>(ref Unsafe.As<char, byte>(ref Unsafe.AddByteOffset(ref charB, byteOffset))); 222valueAu32 = Unsafe.ReadUnaligned<uint>(ref Unsafe.As<char, byte>(ref Unsafe.AddByteOffset(ref charA, byteOffset))); 223valueBu32 = Unsafe.ReadUnaligned<uint>(ref Unsafe.As<char, byte>(ref Unsafe.AddByteOffset(ref charB, byteOffset)));
src\libraries\System.Private.CoreLib\src\System\Guid.cs (1)
248return Unsafe.As<GuidResult, Guid>(ref Unsafe.AsRef(in this));
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (9)
246return nint_t.TryParse(s, out Unsafe.As<nint, nint_t>(ref result)); 253return nint_t.TryParse(s, provider, out Unsafe.As<nint, nint_t>(ref result)); 259return nint_t.TryParse(s, style, provider, out Unsafe.As<nint, nint_t>(ref result)); 265return nint_t.TryParse(s, out Unsafe.As<nint, nint_t>(ref result)); 275return nint_t.TryParse(utf8Text, out Unsafe.As<nint, nint_t>(ref result)); 286return nint_t.TryParse(s, provider, out Unsafe.As<nint, nint_t>(ref result)); 292return nint_t.TryParse(s, style, provider, out Unsafe.As<nint, nint_t>(ref result)); 1437return nint_t.TryParse(utf8Text, style, provider, out Unsafe.As<nint, nint_t>(ref result)); 1447return nint_t.TryParse(utf8Text, provider, out Unsafe.As<nint, nint_t>(ref result));
src\libraries\System.Private.CoreLib\src\System\Marvin.OrdinalIgnoreCase.cs (2)
28tempValue = Unsafe.ReadUnaligned<uint>(ref Unsafe.As<char, byte>(ref Unsafe.AddByteOffset(ref data, byteOffset))); 93int hash = ComputeHash32(ref Unsafe.As<char, byte>(ref MemoryMarshal.GetReference(scratch)), (uint)charsWritten * 2, p0, p1);
src\libraries\System.Private.CoreLib\src\System\Memory.cs (1)
287refToReturn = ref Unsafe.As<char, T>(ref ((string)tmpObject).GetRawStringData());
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (174)
335ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 342ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 349ref Unsafe.As<T, int>(ref MemoryMarshal.GetReference(span)), 356ref Unsafe.As<T, long>(ref MemoryMarshal.GetReference(span)), 818ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 825ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 832ref Unsafe.As<T, int>(ref MemoryMarshal.GetReference(span)), 839ref Unsafe.As<T, long>(ref MemoryMarshal.GetReference(span)), 867ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 874ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 881ref Unsafe.As<T, int>(ref MemoryMarshal.GetReference(span)), 888ref Unsafe.As<T, long>(ref MemoryMarshal.GetReference(span)), 945ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 953ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 983ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 991ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 1052ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 1061ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 1093ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 1102ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 1155ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 1165ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 1212ref byte valuesRef = ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(values)); 1215ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 1225ref short valuesRef = ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(values)); 1228ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 1241ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(span)), 1243ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(values)), 1396ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 1403ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 1410ref Unsafe.As<T, int>(ref MemoryMarshal.GetReference(span)), 1417ref Unsafe.As<T, long>(ref MemoryMarshal.GetReference(span)), 1445ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 1452ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 1459ref Unsafe.As<T, int>(ref MemoryMarshal.GetReference(span)), 1466ref Unsafe.As<T, long>(ref MemoryMarshal.GetReference(span)), 1523ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 1531ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 1561ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 1569ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 1630ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 1639ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 1671ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 1680ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 1734ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 1744ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 1792ref byte valuesRef = ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(values)); 1795ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 1805ref short valuesRef = ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(values)); 1808ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 1821ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(span)), 1823ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(values)), 1930ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 1939ref Unsafe.As<T, ushort>(ref MemoryMarshal.GetReference(span)), 1948ref Unsafe.As<T, uint>(ref MemoryMarshal.GetReference(span)), 1957ref Unsafe.As<T, ulong>(ref MemoryMarshal.GetReference(span)), 2001ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 2010ref Unsafe.As<T, ushort>(ref MemoryMarshal.GetReference(span)), 2019ref Unsafe.As<T, uint>(ref MemoryMarshal.GetReference(span)), 2028ref Unsafe.As<T, ulong>(ref MemoryMarshal.GetReference(span)), 2072ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 2081ref Unsafe.As<T, ushort>(ref MemoryMarshal.GetReference(span)), 2090ref Unsafe.As<T, uint>(ref MemoryMarshal.GetReference(span)), 2099ref Unsafe.As<T, ulong>(ref MemoryMarshal.GetReference(span)), 2143ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 2152ref Unsafe.As<T, ushort>(ref MemoryMarshal.GetReference(span)), 2161ref Unsafe.As<T, uint>(ref MemoryMarshal.GetReference(span)), 2170ref Unsafe.As<T, ulong>(ref MemoryMarshal.GetReference(span)), 2216ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 2222ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 2228ref Unsafe.As<T, int>(ref MemoryMarshal.GetReference(span)), 2234ref Unsafe.As<T, long>(ref MemoryMarshal.GetReference(span)), 2257ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 2263ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 2269ref Unsafe.As<T, int>(ref MemoryMarshal.GetReference(span)), 2275ref Unsafe.As<T, long>(ref MemoryMarshal.GetReference(span)), 2325ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 2327ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(value)), 2332ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(span)), 2334ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(value)), 2354ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 2356ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(value)), 2361ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(span)), 2363ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(value)), 2412ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 2419ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 2426ref Unsafe.As<T, int>(ref MemoryMarshal.GetReference(span)), 2433ref Unsafe.As<T, long>(ref MemoryMarshal.GetReference(span)), 2458ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 2465ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 2472ref Unsafe.As<T, int>(ref MemoryMarshal.GetReference(span)), 2479ref Unsafe.As<T, long>(ref MemoryMarshal.GetReference(span)), 2532ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 2534ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(value)), 2540ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(span)), 2542ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(value)), 2564ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 2566ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(value)), 2572ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(span)), 2574ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(value)), 2675ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 2683ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 2710ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 2718ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 2775ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 2784ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 2813ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 2822ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 2879ref byte spanRef = ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)); 2880ref byte valueRef = ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(values)); 2927ref short spanRef = ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)); 2928ref short valueRef = ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(values)); 2959_ => ProbabilisticMap.IndexOfAny(ref Unsafe.As<short, char>(ref spanRef), span.Length, ref Unsafe.As<short, char>(ref valueRef), values.Length), 3095ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 3103ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 3130ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 3138ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 3196ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 3205ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 3234ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 3243ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 3301ref byte spanRef = ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)); 3302ref byte valueRef = ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(values)); 3349ref short spanRef = ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)); 3350ref short valueRef = ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(values)); 3381_ => ProbabilisticMap.LastIndexOfAny(ref Unsafe.As<short, char>(ref spanRef), span.Length, ref Unsafe.As<short, char>(ref valueRef), values.Length), 3456ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 3457ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(other)), 3498ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 3499ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(other)), 3540ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 3542ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(other)), 3547ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(span)), 3549ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(other)), 3596ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 3597ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(value)), 3639ref Unsafe.As<T, byte>(ref Unsafe.Add(ref MemoryMarshal.GetReference(span), (nint)(uint)(spanLength - valueLength) /* force zero-extension */)), 3640ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(value)), 4479ref byte src = ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)); 4491ref ushort src = ref Unsafe.As<T, ushort>(ref MemoryMarshal.GetReference(span)); 4502ref int src = ref Unsafe.As<T, int>(ref MemoryMarshal.GetReference(span)); 4513ref long src = ref Unsafe.As<T, long>(ref MemoryMarshal.GetReference(span)); 4545ref byte src = ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)); 4557ref ushort src = ref Unsafe.As<T, ushort>(ref MemoryMarshal.GetReference(span)); 4568ref int src = ref Unsafe.As<T, int>(ref MemoryMarshal.GetReference(span)); 4579ref long src = ref Unsafe.As<T, long>(ref MemoryMarshal.GetReference(span)); 4659ref Unsafe.As<T, byte>(ref src), 4660ref Unsafe.As<T, byte>(ref dst), 4670ref Unsafe.As<T, ushort>(ref src), 4671ref Unsafe.As<T, ushort>(ref dst), 4680ref Unsafe.As<T, int>(ref src), 4681ref Unsafe.As<T, int>(ref dst), 4690ref Unsafe.As<T, long>(ref src), 4691ref Unsafe.As<T, long>(ref dst), 4745ref Unsafe.As<T, byte>(ref src), 4746ref Unsafe.As<T, byte>(ref dst), 4756ref Unsafe.As<T, ushort>(ref src), 4757ref Unsafe.As<T, ushort>(ref dst), 4766ref Unsafe.As<T, int>(ref src), 4767ref Unsafe.As<T, int>(ref dst), 4776ref Unsafe.As<T, long>(ref src), 4777ref Unsafe.As<T, long>(ref dst), 4942ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 4943ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(other)), 5433ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 5440ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 5447ref Unsafe.As<T, int>(ref MemoryMarshal.GetReference(span)), 5454ref Unsafe.As<T, long>(ref MemoryMarshal.GetReference(span)), 5482ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), 5489ref Unsafe.As<T, short>(ref MemoryMarshal.GetReference(span)), 5496ref Unsafe.As<T, int>(ref MemoryMarshal.GetReference(span)), 5503ref Unsafe.As<T, long>(ref MemoryMarshal.GetReference(span)),
src\libraries\System.Private.CoreLib\src\System\Number.BigInteger.cs (1)
948ref BigInteger rhs = ref Unsafe.As<uint, BigInteger>(ref Unsafe.AsRef(in Pow10BigNumTable[pow10BigNumTableIndex]));
src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix3x2.Impl.cs (3)
20internal ref Impl AsImpl() => ref Unsafe.As<Matrix3x2, Impl>(ref this); 24internal readonly ref readonly Impl AsROImpl() => ref Unsafe.As<Matrix3x2, Impl>(ref Unsafe.AsRef(in this)); 30public ref Matrix3x2 AsM3x2() => ref Unsafe.As<Impl, Matrix3x2>(ref this);
src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix4x4.Impl.cs (3)
23internal ref Impl AsImpl() => ref Unsafe.As<Matrix4x4, Impl>(ref this); 27internal readonly ref readonly Impl AsROImpl() => ref Unsafe.As<Matrix4x4, Impl>(ref Unsafe.AsRef(in this)); 33public ref Matrix4x4 AsM4x4() => ref Unsafe.As<Impl, Matrix4x4>(ref this);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (7)
837return Unsafe.ReadUnaligned<Vector<T>>(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(values))); 1986ref readonly byte address = ref Unsafe.As<T, byte>(ref Unsafe.AsRef(in source)); 2002ref readonly byte address = ref Unsafe.As<T, byte>(ref Unsafe.Add(ref Unsafe.AsRef(in source), (nint)elementOffset)); 3032ref byte address = ref Unsafe.As<T, byte>(ref destination); 3049Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination), source); 3563ref T address = ref Unsafe.As<Vector<T>, T>(ref Unsafe.AsRef(in vector)); 3571ref T address = ref Unsafe.As<Vector<T>, T>(ref Unsafe.AsRef(in vector));
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector_1.cs (7)
61this = Unsafe.ReadUnaligned<Vector<T>>(ref Unsafe.As<T, byte>(ref values[0])); 80this = Unsafe.ReadUnaligned<Vector<T>>(ref Unsafe.As<T, byte>(ref values[index])); 97this = Unsafe.ReadUnaligned<Vector<T>>(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(values))); 636Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination[0]), this); 660Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination[startIndex]), this); 690Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(destination)), this); 812Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(destination)), this);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (7)
411return Unsafe.ReadUnaligned<Vector2>(ref Unsafe.As<float, byte>(ref MemoryMarshal.GetReference(values))); 704ref readonly byte address = ref Unsafe.As<float, byte>(ref Unsafe.AsRef(in source)); 714ref readonly byte address = ref Unsafe.As<float, byte>(ref Unsafe.Add(ref Unsafe.AsRef(in source), (nint)elementOffset)); 974Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref array[0]), this); 1002Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref array[index]), this); 1016Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref MemoryMarshal.GetReference(destination)), this); 1030Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref MemoryMarshal.GetReference(destination)), this);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.Extensions.cs (2)
84ref byte address = ref Unsafe.As<float, byte>(ref destination); 97Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref destination), source);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.cs (7)
446return Unsafe.ReadUnaligned<Vector3>(ref Unsafe.As<float, byte>(ref MemoryMarshal.GetReference(values))); 734ref readonly byte address = ref Unsafe.As<float, byte>(ref Unsafe.AsRef(in source)); 744ref readonly byte address = ref Unsafe.As<float, byte>(ref Unsafe.Add(ref Unsafe.AsRef(in source), (nint)elementOffset)); 984Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref array[0]), this); 1012Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref array[index]), this); 1026Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref MemoryMarshal.GetReference(destination)), this); 1040Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref MemoryMarshal.GetReference(destination)), this);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.Extensions.cs (2)
79ref byte address = ref Unsafe.As<float, byte>(ref destination); 92Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref destination), source);
src\libraries\System.Private.CoreLib\src\System\Numerics\VectorDebugView_1.cs (11)
33Unsafe.WriteUnaligned(ref Unsafe.As<double, byte>(ref items[0]), _value); 43Unsafe.WriteUnaligned(ref Unsafe.As<short, byte>(ref items[0]), _value); 53Unsafe.WriteUnaligned(ref Unsafe.As<int, byte>(ref items[0]), _value); 63Unsafe.WriteUnaligned(ref Unsafe.As<long, byte>(ref items[0]), _value); 73Unsafe.WriteUnaligned(ref Unsafe.As<nint, byte>(ref items[0]), _value); 83Unsafe.WriteUnaligned(ref Unsafe.As<nuint, byte>(ref items[0]), _value); 93Unsafe.WriteUnaligned(ref Unsafe.As<sbyte, byte>(ref items[0]), _value); 103Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref items[0]), _value); 113Unsafe.WriteUnaligned(ref Unsafe.As<ushort, byte>(ref items[0]), _value); 123Unsafe.WriteUnaligned(ref Unsafe.As<uint, byte>(ref items[0]), _value); 133Unsafe.WriteUnaligned(ref Unsafe.As<ulong, byte>(ref items[0]), _value);
src\libraries\System.Private.CoreLib\src\System\ReadOnlyMemory.cs (1)
209refToReturn = ref Unsafe.As<char, T>(ref ((string)tmpObject).GetRawStringData());
src\libraries\System.Private.CoreLib\src\System\ReadOnlySpan.cs (2)
227return new ReadOnlySpan<T>(ref Unsafe.As<TDerived, T>(ref items._reference), items.Length); 358return new string(new ReadOnlySpan<char>(ref Unsafe.As<T, char>(ref _reference), _length));
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (16)
131return Volatile.Read(ref Unsafe.As<byte, object>(ref Unsafe.AddByteOffset(ref obj.GetRawData(), _addressOrOffset))); 148(void*)Unsafe.As<byte, IntPtr>(ref Unsafe.AddByteOffset(ref obj.GetRawData(), _addressOrOffset)), 152return Volatile.Read(ref Unsafe.As<IntPtr, object>(ref *(IntPtr*)_addressOrOffset)); 165ref Unsafe.As<IntPtr, object>(ref *(IntPtr*)_addressOrOffset).GetRawData()); 168return Pointer.Box((void*)Unsafe.As<byte, IntPtr>( 223ref Unsafe.As<byte, object?>(ref Unsafe.AddByteOffset(ref obj.GetRawData(), _addressOrOffset)), 239ref Unsafe.As<byte, short>(ref Unsafe.AddByteOffset(ref obj.GetRawData(), _addressOrOffset)), 240Unsafe.As<byte, short>(ref value!.GetRawData())); 247ref Unsafe.As<byte, int>(ref Unsafe.AddByteOffset(ref obj.GetRawData(), _addressOrOffset)), 248Unsafe.As<byte, int>(ref value!.GetRawData())); 255ref Unsafe.As<byte, long>(ref Unsafe.AddByteOffset(ref obj.GetRawData(), _addressOrOffset)), 256Unsafe.As<byte, long>(ref value!.GetRawData())); 261Volatile.Write(ref Unsafe.As<IntPtr, object?>(ref *(IntPtr*)_addressOrOffset), value); 275Unsafe.As<byte, short>(ref value!.GetRawData())); 282Unsafe.As<byte, int>(ref value!.GetRawData())); 289Unsafe.As<byte, long>(ref value!.GetRawData()));
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokeUtils.cs (55)
138Unsafe.As<byte, ushort>(ref destElement) = srcElement; break; 141Unsafe.As<byte, uint>(ref destElement) = srcElement; break; 144Unsafe.As<byte, ulong>(ref destElement) = srcElement; break; 146Unsafe.As<byte, float>(ref destElement) = srcElement; break; 148Unsafe.As<byte, double>(ref destElement) = srcElement; break; 158Unsafe.As<byte, short>(ref destElement) = Unsafe.As<byte, sbyte>(ref srcElement); break; 160Unsafe.As<byte, int>(ref destElement) = Unsafe.As<byte, sbyte>(ref srcElement); break; 162Unsafe.As<byte, long>(ref destElement) = Unsafe.As<byte, sbyte>(ref srcElement); break; 164Unsafe.As<byte, float>(ref destElement) = Unsafe.As<byte, sbyte>(ref srcElement); break; 166Unsafe.As<byte, double>(ref destElement) = Unsafe.As<byte, sbyte>(ref srcElement); break; 179Unsafe.As<byte, ushort>(ref destElement) = Unsafe.As<byte, ushort>(ref srcElement); break; 182Unsafe.As<byte, uint>(ref destElement) = Unsafe.As<byte, ushort>(ref srcElement); break; 185Unsafe.As<byte, ulong>(ref destElement) = Unsafe.As<byte, ushort>(ref srcElement); break; 187Unsafe.As<byte, float>(ref destElement) = Unsafe.As<byte, ushort>(ref srcElement); break; 189Unsafe.As<byte, double>(ref destElement) = Unsafe.As<byte, ushort>(ref srcElement); break; 199Unsafe.As<byte, int>(ref destElement) = Unsafe.As<byte, short>(ref srcElement); break; 201Unsafe.As<byte, long>(ref destElement) = Unsafe.As<byte, short>(ref srcElement); break; 203Unsafe.As<byte, float>(ref destElement) = Unsafe.As<byte, short>(ref srcElement); break; 205Unsafe.As<byte, double>(ref destElement) = Unsafe.As<byte, short>(ref srcElement); break; 216Unsafe.As<byte, ulong>(ref destElement) = Unsafe.As<byte, uint>(ref srcElement); break; 218Unsafe.As<byte, float>(ref destElement) = Unsafe.As<byte, uint>(ref srcElement); break; 220Unsafe.As<byte, double>(ref destElement) = Unsafe.As<byte, uint>(ref srcElement); break; 230Unsafe.As<byte, long>(ref destElement) = Unsafe.As<byte, int>(ref srcElement); break; 232Unsafe.As<byte, float>(ref destElement) = Unsafe.As<byte, int>(ref srcElement); break; 234Unsafe.As<byte, double>(ref destElement) = Unsafe.As<byte, int>(ref srcElement); break; 244Unsafe.As<byte, float>(ref destElement) = Unsafe.As<byte, ulong>(ref srcElement); break; 246Unsafe.As<byte, double>(ref destElement) = Unsafe.As<byte, ulong>(ref srcElement); break; 256Unsafe.As<byte, float>(ref destElement) = Unsafe.As<byte, long>(ref srcElement); break; 258Unsafe.As<byte, double>(ref destElement) = Unsafe.As<byte, long>(ref srcElement); break; 266Unsafe.As<byte, double>(ref destElement) = Unsafe.As<byte, float>(ref srcElement); break;
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (3)
108ref TaskAwaiter ta = ref Unsafe.As<TAwaiter, TaskAwaiter>(ref awaiter); // relies on TaskAwaiter/TaskAwaiter<T> having the same layout 113ref ConfiguredTaskAwaitable.ConfiguredTaskAwaiter ta = ref Unsafe.As<TAwaiter, ConfiguredTaskAwaitable.ConfiguredTaskAwaiter>(ref awaiter); 343return ref Unsafe.As<object?, ExecutionContext?>(ref m_stateObject);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\CastCache.cs (3)
109return ref Unsafe.As<byte, int>(ref Unsafe.AddByteOffset(ref table.GetRawData(), (nint)sizeof(nint))); 129return ref Unsafe.As<int, uint>(ref Unsafe.Add(ref tableData, 2)); 136return ref Unsafe.Add(ref Unsafe.As<int, CastCacheEntry>(ref tableData), index + 1);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\GenericCache.cs (2)
112return ref Unsafe.As<byte, Entry>(ref Unsafe.As<RawArrayData>(table).Data); 138return ref Unsafe.Add(ref Unsafe.As<byte, Entry>(ref Unsafe.As<RawArrayData>(table).Data), index + 1);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\PoolingAsyncValueTaskMethodBuilderT.cs (1)
370return ref Unsafe.As<object?, StateMachineBox<TStateMachine>?>(ref s_perCoreCache[i].Object);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeHelpers.cs (1)
161=> new ReadOnlySpan<T>(ref Unsafe.As<byte, T>(ref GetSpanDataFrom(fldHandle, typeof(T).TypeHandle, out int length)), length);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\Unsafe.cs (1)
273return ReadUnaligned<TTo>(ref As<TFrom, byte>(ref source));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (2)
450Interlocked.Or(ref Unsafe.As<CreateComInterfaceFlagsEx, int>(ref Flags), setMask); 458Interlocked.And(ref Unsafe.As<CreateComInterfaceFlagsEx, int>(ref Flags), resetMask);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (1)
577return ref Unsafe.As<UnionTypes, T>(ref _typeUnion._unionTypes);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (6)
37ref Unsafe.As<T, byte>(ref GetReference(span)), 60ref Unsafe.As<T, byte>(ref GetReference(span)), 153ref Unsafe.As<TFrom, TTo>(ref span._reference), 208ref Unsafe.As<TFrom, TTo>(ref GetReference(span)), 561return ref Unsafe.As<byte, T>(ref GetReference(span)); 583return ref Unsafe.As<byte, T>(ref GetReference(span));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (6)
698return NativeType.TryParse(s, out Unsafe.As<NFloat, NativeType>(ref result)); 708return NativeType.TryParse(s, out Unsafe.As<NFloat, NativeType>(ref result)); 718return NativeType.TryParse(utf8Text, out Unsafe.As<NFloat, NativeType>(ref result)); 735return NativeType.TryParse(s, style, provider, out Unsafe.As<NFloat, NativeType>(ref result)); 752return NativeType.TryParse(s, style, provider, out Unsafe.As<NFloat, NativeType>(ref result)); 1923return NativeType.TryParse(utf8Text, style, provider, out Unsafe.As<NFloat, NativeType>(ref result));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (16)
762Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination[0]), vector); 789Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination[startIndex]), vector); 806Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(destination)), vector); 990return Unsafe.ReadUnaligned<Vector128<T>>(ref Unsafe.As<T, byte>(ref values[0])); 1011return Unsafe.ReadUnaligned<Vector128<T>>(ref Unsafe.As<T, byte>(ref values[index])); 1028return Unsafe.ReadUnaligned<Vector128<T>>(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(values))); 2362ref readonly byte address = ref Unsafe.As<T, byte>(ref Unsafe.AsRef(in source)); 2378ref readonly byte address = ref Unsafe.As<T, byte>(ref Unsafe.Add(ref Unsafe.AsRef(in source), (nint)elementOffset)); 2385internal static Vector128<ushort> LoadUnsafe(ref char source) => LoadUnsafe(ref Unsafe.As<char, ushort>(ref source)); 2391internal static Vector128<ushort> LoadUnsafe(ref char source, nuint elementOffset) => LoadUnsafe(ref Unsafe.As<char, ushort>(ref source), elementOffset); 3942ref byte address = ref Unsafe.As<T, byte>(ref Unsafe.Add(ref destination, elementOffset)); 3956ref byte address = ref Unsafe.As<T, byte>(ref destination); 3973Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination), source); 4121Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(destination)), vector); 4458ref T address = ref Unsafe.As<Vector128<T>, T>(ref Unsafe.AsRef(in vector)); 4466ref T address = ref Unsafe.As<Vector128<T>, T>(ref Unsafe.AsRef(in vector));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.Numerics.cs (6)
106ref byte address = ref Unsafe.As<Vector<T>, byte>(ref value); 120Unsafe.WriteUnaligned(ref Unsafe.As<Vector128<float>, byte>(ref result), value); 134Unsafe.WriteUnaligned(ref Unsafe.As<Vector128<float>, byte>(ref result), value); 145ref byte address = ref Unsafe.As<Vector128<float>, byte>(ref value); 156ref byte address = ref Unsafe.As<Vector128<float>, byte>(ref value); 179Unsafe.WriteUnaligned(ref Unsafe.As<Vector<T>, byte>(ref result), value);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128DebugView_1.cs (11)
32Unsafe.WriteUnaligned(ref Unsafe.As<double, byte>(ref items[0]), _value); 42Unsafe.WriteUnaligned(ref Unsafe.As<short, byte>(ref items[0]), _value); 52Unsafe.WriteUnaligned(ref Unsafe.As<int, byte>(ref items[0]), _value); 62Unsafe.WriteUnaligned(ref Unsafe.As<long, byte>(ref items[0]), _value); 72Unsafe.WriteUnaligned(ref Unsafe.As<nint, byte>(ref items[0]), _value); 82Unsafe.WriteUnaligned(ref Unsafe.As<nuint, byte>(ref items[0]), _value); 92Unsafe.WriteUnaligned(ref Unsafe.As<sbyte, byte>(ref items[0]), _value); 102Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref items[0]), _value); 112Unsafe.WriteUnaligned(ref Unsafe.As<ushort, byte>(ref items[0]), _value); 122Unsafe.WriteUnaligned(ref Unsafe.As<uint, byte>(ref items[0]), _value); 132Unsafe.WriteUnaligned(ref Unsafe.As<ulong, byte>(ref items[0]), _value);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (19)
369ref byte address = ref Unsafe.As<Vector<T>, byte>(ref value); 375Unsafe.WriteUnaligned(ref Unsafe.As<Vector256<T>, byte>(ref result), value); 393ref byte address = ref Unsafe.As<Vector256<T>, byte>(ref value); 399Unsafe.WriteUnaligned(ref Unsafe.As<Vector<T>, byte>(ref result), value); 769Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination[0]), vector); 796Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination[startIndex]), vector); 813Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(destination)), vector); 997return Unsafe.ReadUnaligned<Vector256<T>>(ref Unsafe.As<T, byte>(ref values[0])); 1018return Unsafe.ReadUnaligned<Vector256<T>>(ref Unsafe.As<T, byte>(ref values[index])); 1035return Unsafe.ReadUnaligned<Vector256<T>>(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(values))); 2446ref readonly byte address = ref Unsafe.As<T, byte>(ref Unsafe.AsRef(in source)); 2462ref readonly byte address = ref Unsafe.As<T, byte>(ref Unsafe.Add(ref Unsafe.AsRef(in source), (nint)elementOffset)); 2469internal static Vector256<ushort> LoadUnsafe(ref char source) => LoadUnsafe(ref Unsafe.As<char, ushort>(ref source)); 2475internal static Vector256<ushort> LoadUnsafe(ref char source, nuint elementOffset) => LoadUnsafe(ref Unsafe.As<char, ushort>(ref source), elementOffset); 3923ref byte address = ref Unsafe.As<T, byte>(ref destination); 3940Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination), source); 4076Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(destination)), vector); 4411ref T address = ref Unsafe.As<Vector256<T>, T>(ref Unsafe.AsRef(in vector)); 4419ref T address = ref Unsafe.As<Vector256<T>, T>(ref Unsafe.AsRef(in vector));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256DebugView_1.cs (11)
32Unsafe.WriteUnaligned(ref Unsafe.As<double, byte>(ref items[0]), _value); 42Unsafe.WriteUnaligned(ref Unsafe.As<short, byte>(ref items[0]), _value); 52Unsafe.WriteUnaligned(ref Unsafe.As<int, byte>(ref items[0]), _value); 62Unsafe.WriteUnaligned(ref Unsafe.As<long, byte>(ref items[0]), _value); 72Unsafe.WriteUnaligned(ref Unsafe.As<nint, byte>(ref items[0]), _value); 82Unsafe.WriteUnaligned(ref Unsafe.As<nuint, byte>(ref items[0]), _value); 92Unsafe.WriteUnaligned(ref Unsafe.As<sbyte, byte>(ref items[0]), _value); 102Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref items[0]), _value); 112Unsafe.WriteUnaligned(ref Unsafe.As<ushort, byte>(ref items[0]), _value); 122Unsafe.WriteUnaligned(ref Unsafe.As<uint, byte>(ref items[0]), _value); 132Unsafe.WriteUnaligned(ref Unsafe.As<ulong, byte>(ref items[0]), _value);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (17)
368Unsafe.WriteUnaligned(ref Unsafe.As<Vector512<T>, byte>(ref result), value); 384ref byte address = ref Unsafe.As<Vector512<T>, byte>(ref value); 681Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination[0]), vector); 707Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination[startIndex]), vector); 723Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(destination)), vector); 899return Unsafe.ReadUnaligned<Vector512<T>>(ref Unsafe.As<T, byte>(ref values[0])); 919return Unsafe.ReadUnaligned<Vector512<T>>(ref Unsafe.As<T, byte>(ref values[index])); 936return Unsafe.ReadUnaligned<Vector512<T>>(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(values))); 2472ref readonly byte address = ref Unsafe.As<T, byte>(ref Unsafe.AsRef(in source)); 2488ref readonly byte address = ref Unsafe.As<T, byte>(ref Unsafe.Add(ref Unsafe.AsRef(in source), (nint)elementOffset)); 2495internal static Vector512<ushort> LoadUnsafe(ref char source) => LoadUnsafe(ref Unsafe.As<char, ushort>(ref source)); 2501internal static Vector512<ushort> LoadUnsafe(ref char source, nuint elementOffset) => LoadUnsafe(ref Unsafe.As<char, ushort>(ref source), elementOffset); 3934ref byte address = ref Unsafe.As<T, byte>(ref destination); 3951Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination), source); 4053Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(destination)), vector); 4388ref T address = ref Unsafe.As<Vector512<T>, T>(ref Unsafe.AsRef(in vector)); 4396ref T address = ref Unsafe.As<Vector512<T>, T>(ref Unsafe.AsRef(in vector));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512DebugView_1.cs (11)
32Unsafe.WriteUnaligned(ref Unsafe.As<double, byte>(ref items[0]), _value); 42Unsafe.WriteUnaligned(ref Unsafe.As<short, byte>(ref items[0]), _value); 52Unsafe.WriteUnaligned(ref Unsafe.As<int, byte>(ref items[0]), _value); 62Unsafe.WriteUnaligned(ref Unsafe.As<long, byte>(ref items[0]), _value); 72Unsafe.WriteUnaligned(ref Unsafe.As<nint, byte>(ref items[0]), _value); 82Unsafe.WriteUnaligned(ref Unsafe.As<nuint, byte>(ref items[0]), _value); 92Unsafe.WriteUnaligned(ref Unsafe.As<sbyte, byte>(ref items[0]), _value); 102Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref items[0]), _value); 112Unsafe.WriteUnaligned(ref Unsafe.As<ushort, byte>(ref items[0]), _value); 122Unsafe.WriteUnaligned(ref Unsafe.As<uint, byte>(ref items[0]), _value); 132Unsafe.WriteUnaligned(ref Unsafe.As<ulong, byte>(ref items[0]), _value);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (13)
719Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination[0]), vector); 746Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination[startIndex]), vector); 763Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(destination)), vector); 970return Unsafe.ReadUnaligned<Vector64<T>>(ref Unsafe.As<T, byte>(ref values[0])); 991return Unsafe.ReadUnaligned<Vector64<T>>(ref Unsafe.As<T, byte>(ref values[index])); 1008return Unsafe.ReadUnaligned<Vector64<T>>(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(values))); 2345ref readonly byte address = ref Unsafe.As<T, byte>(ref Unsafe.AsRef(in source)); 2361ref readonly byte address = ref Unsafe.As<T, byte>(ref Unsafe.Add(ref Unsafe.AsRef(in source), (nint)elementOffset)); 3834ref byte address = ref Unsafe.As<T, byte>(ref destination); 3851Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref destination), source); 4000Unsafe.WriteUnaligned(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(destination)), vector); 4345ref T address = ref Unsafe.As<Vector64<T>, T>(ref Unsafe.AsRef(in vector)); 4353ref T address = ref Unsafe.As<Vector64<T>, T>(ref Unsafe.AsRef(in vector));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64DebugView_1.cs (11)
32Unsafe.WriteUnaligned(ref Unsafe.As<double, byte>(ref items[0]), _value); 42Unsafe.WriteUnaligned(ref Unsafe.As<short, byte>(ref items[0]), _value); 52Unsafe.WriteUnaligned(ref Unsafe.As<int, byte>(ref items[0]), _value); 62Unsafe.WriteUnaligned(ref Unsafe.As<long, byte>(ref items[0]), _value); 72Unsafe.WriteUnaligned(ref Unsafe.As<nint, byte>(ref items[0]), _value); 82Unsafe.WriteUnaligned(ref Unsafe.As<nuint, byte>(ref items[0]), _value); 92Unsafe.WriteUnaligned(ref Unsafe.As<sbyte, byte>(ref items[0]), _value); 102Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref items[0]), _value); 112Unsafe.WriteUnaligned(ref Unsafe.As<ushort, byte>(ref items[0]), _value); 122Unsafe.WriteUnaligned(ref Unsafe.As<uint, byte>(ref items[0]), _value); 132Unsafe.WriteUnaligned(ref Unsafe.As<ulong, byte>(ref items[0]), _value);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any1SearchValues.cs (4)
36SpanHelpers.NonPackedIndexOfValueType<TImpl, SpanHelpers.DontNegate<TImpl>>(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, span.Length); 40SpanHelpers.NonPackedIndexOfValueType<TImpl, SpanHelpers.Negate<TImpl>>(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, span.Length); 44SpanHelpers.LastIndexOfValueType(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, span.Length); 48SpanHelpers.LastIndexOfAnyExceptValueType(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, span.Length);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any2CharPackedIgnoreCaseSearchValues.cs (2)
57ref Unsafe.As<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state); 65ref Unsafe.As<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any2SearchValues.cs (4)
36SpanHelpers.NonPackedIndexOfAnyValueType<TImpl, SpanHelpers.DontNegate<TImpl>>(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, span.Length); 40SpanHelpers.NonPackedIndexOfAnyValueType<TImpl, SpanHelpers.Negate<TImpl>>(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, span.Length); 44SpanHelpers.LastIndexOfAnyValueType(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, span.Length); 48SpanHelpers.LastIndexOfAnyExceptValueType(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, span.Length);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any3SearchValues.cs (4)
36SpanHelpers.NonPackedIndexOfAnyValueType<TImpl, SpanHelpers.DontNegate<TImpl>>(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, span.Length); 40SpanHelpers.NonPackedIndexOfAnyValueType<TImpl, SpanHelpers.Negate<TImpl>>(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, span.Length); 44SpanHelpers.LastIndexOfAnyValueType(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, span.Length); 48SpanHelpers.LastIndexOfAnyExceptValueType(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, span.Length);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any4SearchValues.cs (4)
39SpanHelpers.IndexOfAnyValueType(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, _e3, span.Length); 43SpanHelpers.IndexOfAnyExceptValueType(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, _e3, span.Length); 47SpanHelpers.LastIndexOfAnyValueType(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, _e3, span.Length); 51SpanHelpers.LastIndexOfAnyExceptValueType(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, _e3, span.Length);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any5SearchValues.cs (4)
40SpanHelpers.IndexOfAnyValueType(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, _e3, _e4, span.Length); 44SpanHelpers.IndexOfAnyExceptValueType(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, _e3, _e4, span.Length); 48SpanHelpers.LastIndexOfAnyValueType(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, _e3, _e4, span.Length); 52SpanHelpers.LastIndexOfAnyExceptValueType(ref Unsafe.As<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, _e3, _e4, span.Length);
src\libraries\System.Private.CoreLib\src\System\SearchValues\AsciiCharSearchValues.cs (6)
50ref Unsafe.As<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state); 58ref Unsafe.As<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state); 66ref Unsafe.As<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state); 74ref Unsafe.As<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state); 82ref Unsafe.As<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state); 90ref Unsafe.As<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state);
src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (4)
193TryIndexOfAny<DontNegate>(ref Unsafe.As<char, short>(ref searchSpace), searchSpaceLength, asciiValues, out index); 197TryIndexOfAny<Negate>(ref Unsafe.As<char, short>(ref searchSpace), searchSpaceLength, asciiValues, out index); 201TryLastIndexOfAny<DontNegate>(ref Unsafe.As<char, short>(ref searchSpace), searchSpaceLength, asciiValues, out index); 205TryLastIndexOfAny<Negate>(ref Unsafe.As<char, short>(ref searchSpace), searchSpaceLength, asciiValues, out index);
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (9)
85Unsafe.Add(ref Unsafe.As<uint, byte>(ref charMap), value & VectorizedIndexMask) |= (byte)(1u << (value >> VectorizedIndexShift)); 96? (Unsafe.Add(ref Unsafe.As<uint, byte>(ref charMap), value & VectorizedIndexMask) & (1u << (value >> VectorizedIndexShift))) != 0 108ref Unsafe.As<char, short>(ref MemoryMarshal.GetReference(values)), 428Vector256<byte> charMap256 = Vector256.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map)); 513Vector128<byte> charMapLower = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map)); 514Vector128<byte> charMapUpper = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map), (nuint)Vector128<byte>.Count); 603Vector256<byte> charMap256 = Vector256.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map)); 690Vector128<byte> charMapLower = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map)); 691Vector128<byte> charMapUpper = Vector128.LoadUnsafe(ref Unsafe.As<ProbabilisticMap, byte>(ref state.Map), (nuint)Vector128<byte>.Count);
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMapState.cs (1)
98ref Unsafe.As<ProbabilisticMap, uint>(ref Map),
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticWithAsciiCharSearchValues.cs (6)
60ref Unsafe.As<char, short>(ref MemoryMarshal.GetReference(span)), 70ref Unsafe.As<char, short>(ref MemoryMarshal.GetReference(span)), 109ref Unsafe.As<char, short>(ref MemoryMarshal.GetReference(span)), 159ref Unsafe.As<char, short>(ref MemoryMarshal.GetReference(span)), 169ref Unsafe.As<char, short>(ref MemoryMarshal.GetReference(span)), 198ref Unsafe.As<char, short>(ref MemoryMarshal.GetReference(span)),
src\libraries\System.Private.CoreLib\src\System\SearchValues\RangeCharSearchValues.cs (2)
45ref Unsafe.As<char, ushort>(ref MemoryMarshal.GetReference(span)), 55ref Unsafe.As<char, ushort>(ref MemoryMarshal.GetReference(span)),
src\libraries\System.Private.CoreLib\src\System\SearchValues\SearchValues.T.cs (1)
59"\"" + new string(Unsafe.As<T[], char[]>(ref values)) + "\"" :
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasick.cs (2)
100ref Unsafe.As<char, short>(ref Unsafe.Add(ref MemoryMarshal.GetReference(span), i)), 209ref Unsafe.As<char, short>(ref Unsafe.Add(ref MemoryMarshal.GetReference(span), i)),
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\StringSearchValuesHelper.cs (7)
76ref Unsafe.As<char, byte>(ref matchStart), 266ref byte matchByteStart = ref Unsafe.As<char, byte>(ref matchStart); 275ref byte matchByteStart = ref Unsafe.As<char, byte>(ref matchStart); 334ref byte matchByteStart = ref Unsafe.As<char, byte>(ref matchStart); 344ref byte matchByteStart = ref Unsafe.As<char, byte>(ref matchStart); 426ref byte matchByteStart = ref Unsafe.As<char, byte>(ref matchStart); 435ref byte matchByteStart = ref Unsafe.As<char, byte>(ref matchStart);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesThreeChars.cs (12)
259Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16()); 260Vector128<ushort> cmpCh3 = Vector128.Equals(ch3, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16()); 272Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16() & caseConversion); 273Vector128<ushort> cmpCh3 = Vector128.Equals(ch3, Vector128.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16() & caseConversion); 287Vector256<ushort> cmpCh2 = Vector256.Equals(ch2, Vector256.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16()); 288Vector256<ushort> cmpCh3 = Vector256.Equals(ch3, Vector256.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16()); 296Vector256<ushort> cmpCh2 = Vector256.Equals(ch2, Vector256.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16() & caseConversion); 297Vector256<ushort> cmpCh3 = Vector256.Equals(ch3, Vector256.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16() & caseConversion); 310Vector512<ushort> cmpCh2 = Vector512.Equals(ch2, Vector512.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16()); 311Vector512<ushort> cmpCh3 = Vector512.Equals(ch3, Vector512.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16()); 319Vector512<ushort> cmpCh2 = Vector512.Equals(ch2, Vector512.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16() & caseConversion); 320Vector512<ushort> cmpCh3 = Vector512.Equals(ch3, Vector512.LoadUnsafe(ref Unsafe.As<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16() & caseConversion);
src\libraries\System.Private.CoreLib\src\System\Span.cs (3)
298SpanHelpers.ClearWithReferences(ref Unsafe.As<T, IntPtr>(ref _reference), (uint)_length * (nuint)(sizeof(T) / sizeof(nuint))); 302SpanHelpers.ClearWithoutReferences(ref Unsafe.As<T, byte>(ref _reference), (uint)_length * (nuint)sizeof(T)); 382return new string(new ReadOnlySpan<char>(ref Unsafe.As<T, char>(ref _reference), _length));
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (30)
37ref byte valueTail = ref Unsafe.As<char, byte>(ref Unsafe.Add(ref value, 1)); 56ref Unsafe.As<char, byte>(ref Unsafe.Add(ref searchSpace, offset + 1)), 122ref Unsafe.As<char, byte>(ref Unsafe.Add(ref searchSpace, offset + charPos)), 123ref Unsafe.As<char, byte>(ref value), (nuint)(uint)valueLength * 2)) 187ref Unsafe.As<char, byte>(ref Unsafe.Add(ref searchSpace, offset + charPos)), 188ref Unsafe.As<char, byte>(ref value), (nuint)(uint)valueLength * 2)) 249ref Unsafe.As<char, byte>(ref Unsafe.Add(ref searchSpace, offset + charPos)), 250ref Unsafe.As<char, byte>(ref value), (nuint)(uint)valueLength * 2)) 274return LastIndexOfValueType(ref Unsafe.As<char, short>(ref searchSpace), (short)value, searchSpaceLength); // for single-char values use plain LastIndexOf 284ref byte valueTail = ref Unsafe.As<char, byte>(ref Unsafe.Add(ref value, 1)); 294int relativeIndex = LastIndexOfValueType(ref Unsafe.As<char, short>(ref searchSpace), (short)valueHead, remainingSearchSpaceLength); 300ref Unsafe.As<char, byte>(ref Unsafe.Add(ref searchSpace, relativeIndex + 1)), 346ref Unsafe.As<char, byte>(ref Unsafe.Add(ref searchSpace, offset + charPos)), 347ref Unsafe.As<char, byte>(ref value), (nuint)(uint)valueLength * 2)) 396ref Unsafe.As<char, byte>(ref Unsafe.Add(ref searchSpace, offset + charPos)), 397ref Unsafe.As<char, byte>(ref value), (nuint)(uint)valueLength * 2)) 446ref Unsafe.As<char, byte>(ref Unsafe.Add(ref searchSpace, offset + charPos)), 447ref Unsafe.As<char, byte>(ref value), (nuint)(uint)valueLength * 2)) 485if (Unsafe.ReadUnaligned<Vector<ushort>>(ref Unsafe.As<char, byte>(ref Unsafe.Add(ref first, (nint)i))) != 486Unsafe.ReadUnaligned<Vector<ushort>>(ref Unsafe.As<char, byte>(ref Unsafe.Add(ref second, (nint)i)))) 497if (Unsafe.ReadUnaligned<nuint>(ref Unsafe.As<char, byte>(ref Unsafe.Add(ref first, (nint)i))) != 498Unsafe.ReadUnaligned<nuint>(ref Unsafe.As<char, byte>(ref Unsafe.Add(ref second, (nint)i)))) 509if (Unsafe.ReadUnaligned<int>(ref Unsafe.As<char, byte>(ref Unsafe.Add(ref first, (nint)i))) == 510Unsafe.ReadUnaligned<int>(ref Unsafe.As<char, byte>(ref Unsafe.Add(ref second, (nint)i)))) 899ref ushort first = ref Unsafe.As<char, ushort>(ref Unsafe.Add(ref buf, offset)); 900ref ushort last = ref Unsafe.As<char, ushort>(ref Unsafe.Add(ref buf, lastOffset)); 938ref byte first = ref Unsafe.As<char, byte>(ref Unsafe.Add(ref buf, offset)); 939ref byte last = ref Unsafe.As<char, byte>(ref Unsafe.Add(ref buf, lastOffset)); 977ref ushort first = ref Unsafe.As<char, ushort>(ref Unsafe.Add(ref buf, offset)); 978ref ushort last = ref Unsafe.As<char, ushort>(ref Unsafe.Add(ref buf, lastOffset));
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.cs (4)
307Reverse(ref Unsafe.As<T, byte>(ref elements), length); 312Reverse(ref Unsafe.As<T, char>(ref elements), length); 317Reverse(ref Unsafe.As<T, int>(ref elements), length); 322Reverse(ref Unsafe.As<T, long>(ref elements), length);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Packed.cs (12)
34IndexOf<SpanHelpers.DontNegate<short>, NopTransform>(ref Unsafe.As<char, short>(ref searchSpace), (short)value, length); 39IndexOf<SpanHelpers.Negate<short>, NopTransform>(ref Unsafe.As<char, short>(ref searchSpace), (short)value, length); 44IndexOfAny<SpanHelpers.DontNegate<short>, NopTransform>(ref Unsafe.As<char, short>(ref searchSpace), (short)value0, (short)value1, length); 49IndexOfAny<SpanHelpers.Negate<short>, NopTransform>(ref Unsafe.As<char, short>(ref searchSpace), (short)value0, (short)value1, length); 54IndexOfAny<SpanHelpers.DontNegate<short>>(ref Unsafe.As<char, short>(ref searchSpace), (short)value0, (short)value1, (short)value2, length); 59IndexOfAny<SpanHelpers.Negate<short>>(ref Unsafe.As<char, short>(ref searchSpace), (short)value0, (short)value1, (short)value2, length); 67return IndexOf<SpanHelpers.DontNegate<short>, Or20Transform>(ref Unsafe.As<char, short>(ref searchSpace), (short)value, length); 76return IndexOf<SpanHelpers.Negate<short>, Or20Transform>(ref Unsafe.As<char, short>(ref searchSpace), (short)value, length); 86return IndexOfAny<SpanHelpers.DontNegate<short>, Or20Transform>(ref Unsafe.As<char, short>(ref searchSpace), (short)value0, (short)value1, length); 96return IndexOfAny<SpanHelpers.Negate<short>, Or20Transform>(ref Unsafe.As<char, short>(ref searchSpace), (short)value0, (short)value1, length); 102IndexOfAnyInRange<SpanHelpers.DontNegate<short>>(ref Unsafe.As<char, short>(ref searchSpace), (short)lowInclusive, (short)rangeInclusive, length); 107IndexOfAnyInRange<SpanHelpers.Negate<short>>(ref Unsafe.As<char, short>(ref searchSpace), (short)lowInclusive, (short)rangeInclusive, length);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (16)
108ref byte refDataAsBytes = ref Unsafe.As<T, byte>(ref refData); 1466return PackedSpanHelpers.Contains(ref Unsafe.As<T, short>(ref searchSpace), Unsafe.BitCast<T, short>(value), length); 1624=> IndexOfValueType(ref Unsafe.As<char, short>(ref searchSpace), (short)value, length); 1628=> LastIndexOfValueType(ref Unsafe.As<char, short>(ref searchSpace), (short)value, length); 1632NonPackedIndexOfValueType<short, DontNegate<short>>(ref Unsafe.As<char, short>(ref searchSpace), (short)value, length); 1650? PackedSpanHelpers.IndexOf(ref Unsafe.As<TValue, char>(ref searchSpace), Unsafe.BitCast<TValue, char>(value), length) 1651: PackedSpanHelpers.IndexOfAnyExcept(ref Unsafe.As<TValue, char>(ref searchSpace), Unsafe.BitCast<TValue, char>(value), length); 1843=> IndexOfAnyValueType(ref Unsafe.As<char, short>(ref searchSpace), (short)value0, (short)value1, length); 1847=> LastIndexOfAnyValueType(ref Unsafe.As<char, short>(ref searchSpace), (short)value0, (short)value1, length); 1877? PackedSpanHelpers.IndexOfAnyIgnoreCase(ref Unsafe.As<TValue, char>(ref searchSpace), lowerCase, length) 1878: PackedSpanHelpers.IndexOfAnyExceptIgnoreCase(ref Unsafe.As<TValue, char>(ref searchSpace), lowerCase, length); 1883? PackedSpanHelpers.IndexOfAny(ref Unsafe.As<TValue, char>(ref searchSpace), char0, char1, length) 1884: PackedSpanHelpers.IndexOfAnyExcept(ref Unsafe.As<TValue, char>(ref searchSpace), char0, char1, length); 2125? PackedSpanHelpers.IndexOfAny(ref Unsafe.As<TValue, char>(ref searchSpace), Unsafe.BitCast<TValue, char>(value0), Unsafe.BitCast<TValue, char>(value1), Unsafe.BitCast<TValue, char>(value2), length) 2126: PackedSpanHelpers.IndexOfAnyExcept(ref Unsafe.As<TValue, char>(ref searchSpace), Unsafe.BitCast<TValue, char>(value0), Unsafe.BitCast<TValue, char>(value1), Unsafe.BitCast<TValue, char>(value2), length); 3871ref char charSearchSpace = ref Unsafe.As<T, char>(ref searchSpace);
src\libraries\System.Private.CoreLib\src\System\String.Comparison.cs (2)
689return Marvin.ComputeHash32(ref Unsafe.As<char, byte>(ref _firstChar), (uint)_stringLength * 2 /* in bytes, not chars */, (uint)seed, (uint)(seed >> 32)); 710return Marvin.ComputeHash32(ref Unsafe.As<char, byte>(ref MemoryMarshal.GetReference(value)), (uint)value.Length * 2 /* in bytes, not chars */, (uint)seed, (uint)(seed >> 32));
src\libraries\System.Private.CoreLib\src\System\String.cs (2)
528internal ref byte GetRawStringDataAsUInt8() => ref Unsafe.As<char, byte>(ref _firstChar); 529internal ref ushort GetRawStringDataAsUInt16() => ref Unsafe.As<char, ushort>(ref _firstChar);
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
2075ref uint charMap = ref Unsafe.As<ProbabilisticMap, uint>(ref map);
src\libraries\System.Private.CoreLib\src\System\String.Searching.cs (3)
39=> SpanHelpers.ContainsValueType(ref Unsafe.As<char, short>(ref _firstChar), (short)value, Length); 446=> SpanHelpers.LastIndexOfValueType(ref Unsafe.As<char, short>(ref _firstChar), (short)value, Length); 471int result = SpanHelpers.LastIndexOfValueType(ref Unsafe.As<char, short>(ref Unsafe.Add(ref _firstChar, startSearchAt)), (short)value, count);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.cs (7)
32IsValidCore(ref Unsafe.As<char, ushort>(ref MemoryMarshal.GetReference(value)), value.Length); 62Unsafe.ReadUnaligned<uint>(ref Unsafe.As<T, byte>(ref searchSpace)) | 63Unsafe.ReadUnaligned<uint>(ref Unsafe.As<T, byte>(ref Unsafe.Add(ref searchSpace, length - sizeof(uint))))); 90Unsafe.ReadUnaligned<ulong>(ref Unsafe.As<T, byte>(ref Unsafe.Add(ref searchSpace, i))) | 91Unsafe.ReadUnaligned<ulong>(ref Unsafe.As<T, byte>(ref Unsafe.Add(ref searchSpace, i + elementsPerUlong))))) 102Unsafe.ReadUnaligned<ulong>(ref Unsafe.As<T, byte>(ref Unsafe.Add(ref searchSpace, i))) | 103Unsafe.ReadUnaligned<ulong>(ref Unsafe.Subtract(ref Unsafe.As<T, byte>(ref Unsafe.Add(ref searchSpace, length)), sizeof(ulong))));
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Equality.cs (8)
31&& Equals<byte, ushort, WideningLoader>(ref MemoryMarshal.GetReference(left), ref Unsafe.As<char, ushort>(ref MemoryMarshal.GetReference(right)), (uint)right.Length); 40&& Equals<ushort, ushort, PlainLoader<ushort>>(ref Unsafe.As<char, ushort>(ref MemoryMarshal.GetReference(left)), ref Unsafe.As<char, ushort>(ref MemoryMarshal.GetReference(right)), (uint)right.Length); 182&& EqualsIgnoreCase<byte, ushort, WideningLoader>(ref MemoryMarshal.GetReference(left), ref Unsafe.As<char, ushort>(ref MemoryMarshal.GetReference(right)), (uint)right.Length); 191&& EqualsIgnoreCase<ushort, ushort, PlainLoader<ushort>>(ref Unsafe.As<char, ushort>(ref MemoryMarshal.GetReference(left)), ref Unsafe.As<char, ushort>(ref MemoryMarshal.GetReference(right)), (uint)right.Length); 194EqualsIgnoreCase<ushort, ushort, PlainLoader<ushort>>(ref Unsafe.As<char, ushort>(ref left), ref Unsafe.As<char, ushort>(ref right), length);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (2)
2285Unsafe.WriteUnaligned(ref Unsafe.As<char, byte>(ref outputBuffer), vecWide.ToScalar()); 2291Unsafe.WriteUnaligned(ref Unsafe.As<char, byte>(ref outputBuffer), vecWide.ToScalar());
src\libraries\System.Private.CoreLib\src\System\Threading\Interlocked.cs (44)
42(uint)Add(ref Unsafe.As<uint, int>(ref location), -1); 51(ulong)Add(ref Unsafe.As<ulong, long>(ref location), -1); 64(sbyte)Exchange(ref Unsafe.As<sbyte, byte>(ref location1), (byte)value); 74(short)Exchange(ref Unsafe.As<short, ushort>(ref location1), (ushort)value); 162(uint)Exchange(ref Unsafe.As<uint, int>(ref location1), (int)value); 173(ulong)Exchange(ref Unsafe.As<ulong, long>(ref location1), (long)value); 182=> Unsafe.BitCast<int, float>(Exchange(ref Unsafe.As<float, int>(ref location1), Unsafe.BitCast<float, int>(value))); 191=> Unsafe.BitCast<long, double>(Exchange(ref Unsafe.As<double, long>(ref location1), Unsafe.BitCast<double, long>(value))); 203return (nint)Exchange(ref Unsafe.As<nint, long>(ref location1), (long)value); 220return (nuint)Exchange(ref Unsafe.As<nuint, long>(ref location1), (long)value); 244object? result = Exchange(ref Unsafe.As<T, object?>(ref location1), value); 245return Unsafe.As<object?, T>(ref result); 259ref Unsafe.As<T, byte>(ref location1), 267ref Unsafe.As<T, ushort>(ref location1), 275ref Unsafe.As<T, int>(ref location1), 282ref Unsafe.As<T, long>(ref location1), 298(sbyte)CompareExchange(ref Unsafe.As<sbyte, byte>(ref location1), (byte)value, (byte)comparand); 309(short)CompareExchange(ref Unsafe.As<short, ushort>(ref location1), (ushort)value, (ushort)comparand); 406(uint)CompareExchange(ref Unsafe.As<uint, int>(ref location1), (int)value, (int)comparand); 418(ulong)CompareExchange(ref Unsafe.As<ulong, long>(ref location1), (long)value, (long)comparand); 428=> Unsafe.BitCast<int, float>(CompareExchange(ref Unsafe.As<float, int>(ref location1), Unsafe.BitCast<float, int>(value), Unsafe.BitCast<float, int>(comparand))); 438=> Unsafe.BitCast<long, double>(CompareExchange(ref Unsafe.As<double, long>(ref location1), Unsafe.BitCast<double, long>(value), Unsafe.BitCast<double, long>(comparand))); 451return (nint)CompareExchange(ref Unsafe.As<nint, long>(ref location1), (long)value, (long)comparand); 469return (nuint)CompareExchange(ref Unsafe.As<nuint, long>(ref location1), (long)value, (long)comparand); 494object? result = CompareExchange(ref Unsafe.As<T, object?>(ref location1), value, comparand); 495return Unsafe.As<object?, T>(ref result); 509ref Unsafe.As<T, byte>(ref location1), 518ref Unsafe.As<T, ushort>(ref location1), 527ref Unsafe.As<T, int>(ref location1), 535ref Unsafe.As<T, long>(ref location1), 550(uint)Add(ref Unsafe.As<uint, int>(ref location1), (int)value); 560(ulong)Add(ref Unsafe.As<ulong, long>(ref location1), (long)value); 604(uint)And(ref Unsafe.As<uint, int>(ref location1), (int)value); 636(ulong)And(ref Unsafe.As<ulong, long>(ref location1), (long)value); 671ref Unsafe.As<T, byte>(ref location1), 689ref Unsafe.As<T, ushort>(ref location1), 704ref Unsafe.As<T, int>(ref location1), 711ref Unsafe.As<T, long>(ref location1), 747(uint)Or(ref Unsafe.As<uint, int>(ref location1), (int)value); 779(ulong)Or(ref Unsafe.As<ulong, long>(ref location1), (long)value); 814ref Unsafe.As<T, byte>(ref location1), 832ref Unsafe.As<T, ushort>(ref location1), 847ref Unsafe.As<T, int>(ref location1), 854ref Unsafe.As<T, long>(ref location1),
src\libraries\System.Private.CoreLib\src\System\Threading\Volatile.cs (28)
22Unsafe.As<bool, VolatileBoolean>(ref Unsafe.AsRef(in location)).Value; 27Unsafe.As<bool, VolatileBoolean>(ref location).Value = value; 36Unsafe.As<byte, VolatileByte>(ref Unsafe.AsRef(in location)).Value; 41Unsafe.As<byte, VolatileByte>(ref location).Value = value; 49long result = Read(ref Unsafe.As<double, long>(ref Unsafe.AsRef(in location))); 56Write(ref Unsafe.As<double, long>(ref location), BitConverter.DoubleToInt64Bits(value)); 65Unsafe.As<short, VolatileInt16>(ref Unsafe.AsRef(in location)).Value; 70Unsafe.As<short, VolatileInt16>(ref location).Value = value; 79Unsafe.As<int, VolatileInt32>(ref Unsafe.AsRef(in location)).Value; 84Unsafe.As<int, VolatileInt32>(ref location).Value = value; 92(long)Unsafe.As<long, VolatileIntPtr>(ref Unsafe.AsRef(in location)).Value; 102Unsafe.As<long, VolatileIntPtr>(ref location).Value = (nint)value; 115Unsafe.As<nint, VolatileIntPtr>(ref Unsafe.AsRef(in location)).Value; 120Unsafe.As<nint, VolatileIntPtr>(ref location).Value = value; 130Unsafe.As<sbyte, VolatileSByte>(ref Unsafe.AsRef(in location)).Value; 136Unsafe.As<sbyte, VolatileSByte>(ref location).Value = value; 145Unsafe.As<float, VolatileSingle>(ref Unsafe.AsRef(in location)).Value; 150Unsafe.As<float, VolatileSingle>(ref location).Value = value; 160Unsafe.As<ushort, VolatileUInt16>(ref Unsafe.AsRef(in location)).Value; 166Unsafe.As<ushort, VolatileUInt16>(ref location).Value = value; 176Unsafe.As<uint, VolatileUInt32>(ref Unsafe.AsRef(in location)).Value; 182Unsafe.As<uint, VolatileUInt32>(ref location).Value = value; 190(ulong)Read(ref Unsafe.As<ulong, long>(ref Unsafe.AsRef(in location))); 196Write(ref Unsafe.As<ulong, long>(ref location), (long)value); 206Unsafe.As<nuint, VolatileUIntPtr>(ref Unsafe.AsRef(in location)).Value; 212Unsafe.As<nuint, VolatileUIntPtr>(ref location).Value = value; 222Unsafe.As<T>(Unsafe.As<T, VolatileObject>(ref Unsafe.AsRef(in location)).Value)!; 227Unsafe.As<T, VolatileObject>(ref location).Value = value;
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (9)
242return nuint_t.TryParse(s, out Unsafe.As<nuint, nuint_t>(ref result)); 253return nuint_t.TryParse(s, provider, out Unsafe.As<nuint, nuint_t>(ref result)); 259return nuint_t.TryParse(s, style, provider, out Unsafe.As<nuint, nuint_t>(ref result)); 265return nuint_t.TryParse(s, out Unsafe.As<nuint, nuint_t>(ref result)); 275return nuint_t.TryParse(utf8Text, out Unsafe.As<nuint, nuint_t>(ref result)); 282return nuint_t.TryParse(s, provider, out Unsafe.As<nuint, nuint_t>(ref result)); 288return nuint_t.TryParse(s, style, provider, out Unsafe.As<nuint, nuint_t>(ref result)); 1230return nuint_t.TryParse(utf8Text, style, provider, out Unsafe.As<nuint, nuint_t>(ref result)); 1240return nuint_t.TryParse(utf8Text, provider, out Unsafe.As<nuint, nuint_t>(ref result));
src\System\Array.CoreCLR.cs (4)
173ref object elementRef = ref Unsafe.As<byte, object>(ref arrayDataRef); 211SpanHelpers.ClearWithReferences(ref Unsafe.As<byte, nint>(ref offsetDataRef), elementSize / (nuint)sizeof(IntPtr)); 221Unsafe.Add(ref Unsafe.As<byte, object?>(ref arrayDataRef), (nuint)flattenedIndex) = null; 230Unsafe.Add(ref Unsafe.As<byte, object?>(ref arrayDataRef), (nuint)flattenedIndex) = value;
src\System\Enum.CoreCLR.cs (1)
129=> ref Unsafe.As<RuntimeType.IGenericCacheEntry?, EnumInfo<TStorage>?>(ref compositeEntry._enumInfo);
src\System\GC.CoreCLR.cs (1)
886ref GCConfigurationContext context = ref Unsafe.As<byte, GCConfigurationContext>(ref *(byte*)configurationContext);
src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (5)
126return Unsafe.As<byte, object>(ref Unsafe.Add(ref data, DataOffset + contIndex * PointerSize)); 134Unsafe.As<byte, Exception>(ref Unsafe.Add(ref data, DataOffset + contIndex * PointerSize)) = ex; 259Unsafe.As<byte, object?>(ref Unsafe.Add(ref RuntimeHelpers.GetRawData(newContinuation), keepAliveOffset)) = loaderAllocator; 272Unsafe.As<byte, object?>(ref Unsafe.Add(ref RuntimeHelpers.GetRawData(newContinuation), keepAliveOffset)) = GCHandle.FromIntPtr(loaderAllocatorHandle).Target; 615private ref byte GetResultStorage() => ref Unsafe.As<T?, byte>(ref m_result);
src\System\Runtime\CompilerServices\CastHelpers.cs (2)
639SpanHelpers.ClearWithReferences(ref Unsafe.As<byte, IntPtr>(ref destPtr), typeMT->GetNumInstanceFieldBytesIfContainsGCPointers() / (nuint)sizeof(IntPtr)); 650Unsafe.As<byte, bool>(ref destPtr) = true;
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (9)
69new ReadOnlySpan<ushort>(ref Unsafe.As<byte, ushort>(ref src), array.Length), 70new Span<ushort>(ref Unsafe.As<byte, ushort>(ref dst), array.Length)); 74new ReadOnlySpan<uint>(ref Unsafe.As<byte, uint>(ref src), array.Length), 75new Span<uint>(ref Unsafe.As<byte, uint>(ref dst), array.Length)); 79new ReadOnlySpan<ulong>(ref Unsafe.As<byte, ulong>(ref src), array.Length), 80new Span<ulong>(ref Unsafe.As<byte, ulong>(ref dst), array.Length)); 423return ref Unsafe.As<byte, int>(ref Unsafe.As<RawArrayData>(array).Data); 1154return ref Unsafe.Subtract(ref Unsafe.As<MethodTableAuxiliaryData, DynamicStaticsInfo>(ref this), 1); 1162return ref Unsafe.Subtract(ref Unsafe.As<MethodTableAuxiliaryData, ThreadStaticsInfo>(ref this), 1);
src\System\Runtime\CompilerServices\StaticsHelpers.cs (2)
108return Unsafe.As<IntPtr, object[]>(ref _nonCollectibleTlsArrayData_private); 289object boxedObject = Unsafe.As<byte, object>(ref Unsafe.Add(ref pArgs->staticBaseHelper(pArgs->arg0), pArgs->offset));
src\System\RuntimeType.BoxCache.cs (1)
72return Unsafe.As<byte, object>(ref data);
src\System\TypedReference.CoreCLR.cs (1)
53result = Unsafe.As<byte, object>(ref value._value);
src\System\ValueType.cs (3)
126hashCode.Add(Unsafe.As<byte, object>(ref Unsafe.AddByteOffset(ref rawData, fieldOffset)).GetHashCode()); 130hashCode.Add(Unsafe.As<byte, double>(ref Unsafe.AddByteOffset(ref rawData, fieldOffset)).GetHashCode()); 134hashCode.Add(Unsafe.As<byte, float>(ref Unsafe.AddByteOffset(ref rawData, fieldOffset)).GetHashCode());
System.Private.Windows.Core (115)
System\IO\BinaryReaderExtensions.cs (1)
43return Unsafe.As<long, DateTime>(ref data);
System\IO\BinaryWriterExtensions.cs (1)
23long dateData = Unsafe.As<DateTime, long>(ref value);
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
91Unsafe.As<DateTime, ulong>(ref value)).Write(writer);
System\Private\Windows\Ole\Composition.NativeToRuntimeAdapter.cs (7)
30fixed (Com.FORMATETC* nativeFormat = &Unsafe.As<FORMATETC, Com.FORMATETC>(ref pFormatetc)) 68HRESULT result = nativeDataObject.Value->GetCanonicalFormatEtc(Unsafe.As<FORMATETC, Com.FORMATETC>(ref formatIn), out Com.FORMATETC nativeFormat); 69formatOut = Unsafe.As<Com.FORMATETC, FORMATETC>(ref nativeFormat); 75Com.FORMATETC nativeFormat = Unsafe.As<FORMATETC, Com.FORMATETC>(ref format); 85Com.FORMATETC nativeFormat = Unsafe.As<FORMATETC, Com.FORMATETC>(ref format); 96return nativeDataObject.Value->QueryGetData(Unsafe.As<FORMATETC, Com.FORMATETC>(ref format)); 102Com.FORMATETC nativeFormat = Unsafe.As<FORMATETC, Com.FORMATETC>(ref formatIn);
System\Private\Windows\Ole\FormatEnumerator.cs (1)
116rgelt[i] = Unsafe.As<ComTypes.FORMATETC, FORMATETC>(ref elt[i]);
System\SpanReader.cs (2)
146value = Unsafe.ReadUnaligned<TValue>(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(_unread))); 180value = MemoryMarshal.CreateReadOnlySpan(ref Unsafe.As<T, TValue>(ref MemoryMarshal.GetReference(_unread)), count);
System\Value.cs (59)
604return new(Unsafe.As<T, bool>(ref Unsafe.AsRef(in value))); 606return new(Unsafe.As<T, byte>(ref Unsafe.AsRef(in value))); 608return new(Unsafe.As<T, sbyte>(ref Unsafe.AsRef(in value))); 610return new(Unsafe.As<T, char>(ref Unsafe.AsRef(in value))); 612return new(Unsafe.As<T, short>(ref Unsafe.AsRef(in value))); 614return new(Unsafe.As<T, int>(ref Unsafe.AsRef(in value))); 616return new(Unsafe.As<T, long>(ref Unsafe.AsRef(in value))); 618return new(Unsafe.As<T, ushort>(ref Unsafe.AsRef(in value))); 620return new(Unsafe.As<T, uint>(ref Unsafe.AsRef(in value))); 622return new(Unsafe.As<T, ulong>(ref Unsafe.AsRef(in value))); 624return new(Unsafe.As<T, float>(ref Unsafe.AsRef(in value))); 626return new(Unsafe.As<T, double>(ref Unsafe.AsRef(in value))); 628return new(Unsafe.As<T, DateTime>(ref Unsafe.AsRef(in value))); 630return new(Unsafe.As<T, DateTimeOffset>(ref Unsafe.AsRef(in value))); 632return new(Unsafe.As<T, Color>(ref Unsafe.AsRef(in value))); 635return new(Unsafe.As<T, bool?>(ref Unsafe.AsRef(in value))); 637return new(Unsafe.As<T, byte?>(ref Unsafe.AsRef(in value))); 639return new(Unsafe.As<T, sbyte?>(ref Unsafe.AsRef(in value))); 641return new(Unsafe.As<T, char?>(ref Unsafe.AsRef(in value))); 643return new(Unsafe.As<T, short?>(ref Unsafe.AsRef(in value))); 645return new(Unsafe.As<T, int?>(ref Unsafe.AsRef(in value))); 647return new(Unsafe.As<T, long?>(ref Unsafe.AsRef(in value))); 649return new(Unsafe.As<T, ushort?>(ref Unsafe.AsRef(in value))); 651return new(Unsafe.As<T, uint?>(ref Unsafe.AsRef(in value))); 653return new(Unsafe.As<T, ulong?>(ref Unsafe.AsRef(in value))); 655return new(Unsafe.As<T, float?>(ref Unsafe.AsRef(in value))); 657return new(Unsafe.As<T, double?>(ref Unsafe.AsRef(in value))); 659return new(Unsafe.As<T, DateTime?>(ref Unsafe.AsRef(in value))); 661return new(Unsafe.As<T, DateTimeOffset?>(ref Unsafe.AsRef(in value))); 664return new(Unsafe.As<T, ArraySegment<byte>>(ref Unsafe.AsRef(in value))); 666return new(Unsafe.As<T, ArraySegment<char>>(ref Unsafe.AsRef(in value))); 671return new Value(StraightCastFlag<T>.Instance, Unsafe.As<T, ulong>(ref value)); 716value = Unsafe.As<Union, T>(ref Unsafe.AsRef(in _union)); 722value = Unsafe.As<Color, T>(ref Unsafe.AsRef(in color)); 727value = Unsafe.As<DateTime, T>(ref Unsafe.AsRef(in _union.DateTime)); 733value = Unsafe.As<DateTimeOffset, T>(ref Unsafe.AsRef(in dto)); 739value = Unsafe.As<DateTimeOffset, T>(ref Unsafe.AsRef(in dto)); 784value = Unsafe.As<ArraySegment<byte>, T>(ref segment); 800value = Unsafe.As<ArraySegment<char>, T>(ref segment); 811value = Unsafe.As<int?, T>(ref Unsafe.AsRef(in @int)); 817value = Unsafe.As<long?, T>(ref Unsafe.AsRef(in @long)); 823value = Unsafe.As<bool?, T>(ref Unsafe.AsRef(in @bool)); 829value = Unsafe.As<float?, T>(ref Unsafe.AsRef(in single)); 835value = Unsafe.As<double?, T>(ref Unsafe.AsRef(in @double)); 841value = Unsafe.As<uint?, T>(ref Unsafe.AsRef(in @uint)); 847value = Unsafe.As<ulong?, T>(ref Unsafe.AsRef(in @ulong)); 853value = Unsafe.As<char?, T>(ref Unsafe.AsRef(in @char)); 859value = Unsafe.As<short?, T>(ref Unsafe.AsRef(in @short)); 865value = Unsafe.As<ushort?, T>(ref Unsafe.AsRef(in @ushort)); 871value = Unsafe.As<byte?, T>(ref Unsafe.AsRef(in @byte)); 877value = Unsafe.As<sbyte?, T>(ref Unsafe.AsRef(in @sbyte)); 883value = Unsafe.As<Color?, T>(ref Unsafe.AsRef(in color)); 889value = Unsafe.As<DateTime?, T>(ref Unsafe.AsRef(in dateTime)); 895value = Unsafe.As<DateTimeOffset?, T>(ref Unsafe.AsRef(in dto)); 901value = Unsafe.As<DateTimeOffset?, T>(ref Unsafe.AsRef(in dto)); 920value = Unsafe.As<NullableTemplate<byte>, T>(ref Unsafe.AsRef(in byteTemplate)); 925value = Unsafe.As<NullableTemplate<ushort>, T>(ref Unsafe.AsRef(in ushortTemplate)); 930value = Unsafe.As<NullableTemplate<uint>, T>(ref Unsafe.AsRef(in uintTemplate)); 935value = Unsafe.As<NullableTemplate<ulong>, T>(ref Unsafe.AsRef(in ulongTemplate));
System\Value.PackedColor.cs (1)
35CastColor castColor = Unsafe.As<Color, CastColor>(ref Unsafe.AsRef(in color));
System\Value.StraightCastFlag.cs (1)
16public override T To(in Value value) => Unsafe.As<Union, T>(ref Unsafe.AsRef(in value._union));
Windows.Win32.IAdviseSink.g.cs (1)
264 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IBindCtx.g.cs (1)
479 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IDataObject.g.cs (1)
531 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IDataObjectAsyncCapability.g.cs (1)
317 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IDispatch.g.cs (1)
219 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IDispatchEx.g.cs (1)
429 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IDragSourceHelper.g.cs (1)
202 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IDragSourceHelper2.g.cs (1)
211 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IDropSource.g.cs (1)
173 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IDropSourceNotify.g.cs (1)
165 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IDropTarget.g.cs (1)
291 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IDropTargetHelper.g.cs (1)
333 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IEnumFORMATETC.g.cs (1)
249 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IEnumMoniker.g.cs (1)
239 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IEnumSTATDATA.g.cs (1)
249 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IEnumSTATSTG.g.cs (1)
259 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IEnumString.g.cs (1)
246 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IEnumUnknown.g.cs (1)
236 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IGlobalInterfaceTable.g.cs (1)
239 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IMoniker.g.cs (1)
940 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IPersist.g.cs (1)
144 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IPersistStream.g.cs (1)
294 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IPicture.g.cs (1)
733 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IPictureDisp.g.cs (1)
166 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IRecordInfo.g.cs (1)
792 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IRunningObjectTable.g.cs (1)
397 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ISequentialStream.g.cs (1)
179 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IServiceProvider.g.cs (1)
147 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IStorage.g.cs (1)
860 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IStream.g.cs (1)
518 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ITypeComp.g.cs (1)
196 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ITypeInfo.g.cs (1)
992 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ITypeLib.g.cs (1)
546 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IUnknown.g.cs (1)
119 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows\Win32\Foundation\HandleRef.cs (2)
57return new(handle.Wrapper, Unsafe.As<THandle, nint>(ref local)); 68return new(handle.Wrapper, Unsafe.As<nint, THandle>(ref local));
Windows\Win32\Graphics\Gdi\ARGB.cs (1)
58ref Unsafe.As<uint, ARGB>(ref MemoryMarshal.GetReference(argbColors)),
Windows\Win32\Graphics\Gdi\ArgbBuffer.cs (1)
38ref Unsafe.As<ARGB, uint>(ref _bufferScope.GetPinnableReference());
Windows\Win32\Graphics\Gdi\HDC.cs (1)
24return Unsafe.As<XFORM, Matrix3x2>(ref matrix);
Windows\Win32\System\Com\IComCallableWrapper.cs (1)
25return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
Windows\Win32\System\Com\IID.cs (1)
18return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
System.Private.Windows.Core.TestUtilities (3)
XUnit\InvalidEnumDataAttribute.cs (3)
32currentValue = Unsafe.As<ulong, TEnum>(ref currentFlagValue); 52currentValue = Unsafe.As<ulong, TEnum>(ref minValue); 62currentValue = Unsafe.As<ulong, TEnum>(ref maxValue);
System.Private.Windows.GdiPlus (4)
Windows\Win32\Graphics\GdiPlus\Rect.cs (2)
11public static implicit operator Rectangle(Rect rect) => Unsafe.As<Rect, Rectangle>(ref rect); 12public static implicit operator Rect(Rectangle rectangle) => Unsafe.As<Rectangle, Rect>(ref rectangle);
Windows\Win32\Graphics\GdiPlus\RectF.cs (2)
11public static implicit operator RectangleF(RectF rect) => Unsafe.As<RectF, RectangleF>(ref rect); 12public static implicit operator RectF(RectangleF rectangle) => Unsafe.As<RectangleF, RectF>(ref rectangle);
System.ServiceModel.NetTcp (2)
System\ServiceModel\Channels\TcpChannelFactory.cs (2)
74return Unsafe.As<TimeSpan, T>(ref temp); 91return Unsafe.As<int, T>(ref temp);
System.ServiceModel.UnixDomainSocket (2)
System\ServiceModel\Channels\UnixDomainSocketChannelFactory.cs (2)
87return Unsafe.As<TimeSpan, T>(ref temp); 104return Unsafe.As<int, T>(ref temp);
System.Text.RegularExpressions.Generator (1)
Stubs.cs (1)
93uint oldValue = (uint)Interlocked.CompareExchange(ref Unsafe.As<uint, int>(ref location1), (int)newValue, (int)current);
System.Threading.Tasks.Parallel (2)
System\Threading\Tasks\ParallelLoopState.cs (2)
362return Unsafe.BitCast<int, TInt>(Volatile.Read(ref Unsafe.As<TInt, int>(ref _lowestBreakIteration))); 366return Unsafe.BitCast<long, TInt>(Volatile.Read(ref Unsafe.As<TInt, long>(ref _lowestBreakIteration)));
System.Windows.Forms (3)
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (1)
425UpdateFont(ref Unsafe.As<LOGFONTW, LOGFONT>(ref logFont));
System\Windows\Forms\PropertyStore.cs (2)
203AddOrUpdate(key, Unsafe.As<T, Padding>(ref value)); 207AddOrUpdate(key, Unsafe.As<T, Rectangle>(ref value));
System.Windows.Forms.Primitives (179)
Microsoft\Office\IMsoComponent.cs (1)
118return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
Microsoft\Office\IMsoComponentManager.cs (1)
30return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
Microsoft\VisualStudio\Shell\ICategorizeProperties.cs (1)
28return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
Microsoft\VisualStudio\Shell\IProvidePropertyBuilder.cs (1)
28return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
Microsoft\VisualStudio\Shell\IVSMDPerPropertyBrowsing.cs (1)
29return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
Microsoft\VisualStudio\Shell\IVsPerPropertyBrowsing.cs (1)
28return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
System\Drawing\FontExtensions.cs (2)
14return Unsafe.As<LOGFONT, LOGFONTW>(ref logFont); 20return Unsafe.As<LOGFONT, LOGFONTW>(ref logFont);
System\EnumExtensions.cs (8)
26Unsafe.As<T, byte>(ref value) |= *(byte*)&flags; 30Unsafe.As<T, byte>(ref value) &= (byte)~*(byte*)&flags; 37Unsafe.As<T, ushort>(ref value) |= *(ushort*)&flags; 41Unsafe.As<T, ushort>(ref value) &= (ushort)~*(ushort*)&flags; 48Unsafe.As<T, uint>(ref value) |= *(uint*)&flags; 52Unsafe.As<T, uint>(ref value) &= ~*(uint*)&flags; 59Unsafe.As<T, ulong>(ref value) |= *(ulong*)&flags; 63Unsafe.As<T, ulong>(ref value) &= ~*(ulong*)&flags;
System\Windows\Forms\IExtender.cs (1)
99return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IAccessible.g.cs (1)
1248 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IAccessibleEx.g.cs (1)
271 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IAdviseSinkEx.g.cs (1)
270 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IAutoComplete.g.cs (1)
198 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IAutoComplete2.g.cs (1)
251 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IBindHost.g.cs (1)
205 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IBinding.g.cs (1)
292 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IBindStatusCallback.g.cs (1)
381 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IClassFactory.g.cs (1)
186 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IClassFactory2.g.cs (1)
309 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IConnectionPoint.g.cs (1)
303 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IConnectionPointContainer.g.cs (1)
185 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IEnumConnectionPoints.g.cs (1)
246 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IEnumConnections.g.cs (1)
250 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IEnumIDList.g.cs (1)
259 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IEnumOleUndoUnits.g.cs (1)
251 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IEnumOLEVERB.g.cs (1)
249 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IEnumShellItems.g.cs (1)
259 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IEnumVARIANT.g.cs (1)
256 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IErrorInfo.g.cs (1)
279 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IErrorLog.g.cs (1)
142 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IExpandCollapseProvider.g.cs (1)
206 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IFileDialog.g.cs (1)
1124 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IFileDialogCustomize.g.cs (1)
1373 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IFileDialogEvents.g.cs (1)
406 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IFileOpenDialog.g.cs (1)
947 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IFileOperationProgressSink.g.cs (1)
913 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IFileSaveDialog.g.cs (1)
1082 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IFont.g.cs (1)
979 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IFontDisp.g.cs (1)
163 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IGetOleObject.g.cs (1)
150 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IGetVBAObject.g.cs (1)
150 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IGridItemProvider.g.cs (1)
298 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IGridProvider.g.cs (1)
232 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLCurrentStyle.g.cs (1)
3252 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLDataTransfer.g.cs (1)
386 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLDocument.g.cs (1)
190 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLDocument2.g.cs (1)
3532 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLDocument3.g.cs (1)
1428 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLDocument4.g.cs (1)
623 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLDOMNode.g.cs (1)
786 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLElement.g.cs (1)
2840 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLElement2.g.cs (1)
3246 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLElement3.g.cs (1)
1526 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLElementCollection.g.cs (1)
354 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLEventObj.g.cs (1)
994 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLFiltersCollection.g.cs (1)
270 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLFormElement.g.cs (1)
904 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLFrameBase.g.cs (1)
720 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLFramesCollection2.g.cs (1)
241 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLImageElementFactory.g.cs (1)
192 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLImgElement.g.cs (1)
1680 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLLocation.g.cs (1)
770 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLMimeTypesCollection.g.cs (1)
196 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLOpsProfile.g.cs (1)
426 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLOptionElement.g.cs (1)
506 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLOptionElementFactory.g.cs (1)
192 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLPluginsCollection.g.cs (1)
224 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLRect.g.cs (1)
410 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLRectCollection.g.cs (1)
270 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLRenderStyle.g.cs (1)
720 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLRuleStyle.g.cs (1)
5182 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLScreen.g.cs (1)
490 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLSelectionObject.g.cs (1)
282 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLStyle.g.cs (1)
5702 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLStyleSheet.g.cs (1)
826 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLStyleSheetRule.g.cs (1)
292 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLStyleSheetRulesCollection.g.cs (1)
226 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLStyleSheetsCollection.g.cs (1)
270 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLWindow2.g.cs (1)
2363 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLWindow3.g.cs (1)
619 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IHTMLWindow4.g.cs (1)
230 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IInvokeProvider.g.cs (1)
138 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ILegacyIAccessibleProvider.g.cs (1)
612 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ILockBytes.g.cs (1)
388 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IMessageFilter.g.cs (1)
222 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IModalWindow.g.cs (1)
138 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IMultipleViewProvider.g.cs (1)
263 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleAdviseHolder.g.cs (1)
320 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleClientSite.g.cs (1)
316 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleCommandTarget.g.cs (1)
207 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleContainer.g.cs (1)
206 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleControl.g.cs (1)
264 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleControlSite.g.cs (1)
367 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleInPlaceActiveObject.g.cs (1)
362 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleInPlaceFrame.g.cs (1)
576 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleInPlaceObject.g.cs (1)
325 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleInPlaceObjectWindowless.g.cs (1)
377 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleInPlaceSite.g.cs (1)
569 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleInPlaceUIWindow.g.cs (1)
360 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleObject.g.cs (1)
986 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleParentUndoUnit.g.cs (1)
404 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleUndoManager.g.cs (1)
551 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleUndoUnit.g.cs (1)
250 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOleWindow.g.cs (1)
186 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOmHistory.g.cs (1)
308 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IOmNavigator.g.cs (1)
830 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IParseDisplayName.g.cs (1)
148 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IPerPropertyBrowsing.g.cs (1)
287 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IPersistPropertyBag.g.cs (1)
238 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IPersistStorage.g.cs (1)
362 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IPersistStreamInit.g.cs (1)
324 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IPropertyBag.g.cs (1)
195 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IPropertyDescriptionList.g.cs (1)
203 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IPropertyNotifySink.g.cs (1)
169 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IPropertyStore.g.cs (1)
318 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IProvideClassInfo.g.cs (1)
136 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IProvideClassInfo2.g.cs (1)
170 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IProvideMultipleClassInfo.g.cs (1)
266 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IQuickActivate.g.cs (1)
238 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IRangeValueProvider.g.cs (1)
389 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IRawElementProviderFragment.g.cs (1)
350 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IRawElementProviderFragmentRoot.g.cs (1)
185 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IRawElementProviderHwndOverride.g.cs (1)
142 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IRawElementProviderSimple.g.cs (1)
273 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IRichEditOle.g.cs (1)
818 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IRichEditOleCallback.g.cs (1)
612 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IScrollItemProvider.g.cs (1)
134 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IScrollProvider.g.cs (1)
403 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ISelectionItemProvider.g.cs (1)
277 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ISelectionProvider.g.cs (1)
221 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IShellFolder.g.cs (1)
745 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IShellItem.g.cs (1)
361 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IShellItemArray.g.cs (1)
469 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IShellItemFilter.g.cs (1)
187 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ISimpleFrameSite.g.cs (1)
201 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ISpecifyPropertyPages.g.cs (1)
146 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ISupportErrorInfo.g.cs (1)
148 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ITableItemProvider.g.cs (1)
172 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ITableProvider.g.cs (1)
214 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ITextDocument.g.cs (1)
1023 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ITextFont.g.cs (1)
2575 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ITextPara.g.cs (1)
2285 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ITextProvider.g.cs (1)
333 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ITextProvider2.g.cs (1)
379 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ITextRange.g.cs (1)
2706 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ITextRangeProvider.g.cs (1)
812 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ITextSelection.g.cs (1)
2446 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.ITextStoryRanges.g.cs (1)
298 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IToggleProvider.g.cs (1)
177 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IUIAutomation.g.cs (1)
2455 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IUIAutomationCacheRequest.g.cs (1)
408 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IUIAutomationCondition.g.cs (1)
98 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IUIAutomationElement.g.cs (1)
3265 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IUIAutomationElementArray.g.cs (1)
177 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IUIAutomationEventHandler.g.cs (1)
143 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IUIAutomationFocusChangedEventHandler.g.cs (1)
139 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IUIAutomationPropertyChangedEventHandler.g.cs (1)
147 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IUIAutomationProxyFactory.g.cs (1)
183 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IUIAutomationProxyFactoryEntry.g.cs (1)
568 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IUIAutomationProxyFactoryMapping.g.cs (1)
448 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IUIAutomationStructureChangedEventHandler.g.cs (1)
143 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IUIAutomationTreeWalker.g.cs (1)
659 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IValueProvider.g.cs (1)
226 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IVBFormat.g.cs (1)
161 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IVBGetControl.g.cs (1)
140 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IViewObject.g.cs (1)
376 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IViewObject2.g.cs (1)
343 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IWebBrowser.g.cs (1)
943 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IWebBrowser2.g.cs (1)
2237 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.IWebBrowserApp.g.cs (1)
1584 return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
Windows.Win32.VariableLengthInlineArray.g.cs (1)
28 internal ref T e0 => ref Unsafe.As<TBlittable, T>(ref this._e0);
System.Windows.Forms.Primitives.Tests (1)
Windows\Win32\System\Com\ComScopeTests.cs (1)
63return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
System.Windows.Forms.Tests (1)
System\Windows\Forms\DragDropHelperTests.cs (1)
107Assert.Equal(expectedIsInDragLoopFormat, DragDropHelper.IsInDragLoopFormat(Unsafe.As<FORMATETC, Com.FORMATETC>(ref formatEtc)));
Test.Utilities (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150return Unsafe.As<TFromEnum, TToEnum>(ref value);
Text.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150return Unsafe.As<TFromEnum, TToEnum>(ref value);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ModifierExtensions.cs (1)
16return Unsafe.As<Modifiers, DeclarationModifiers>(ref modifiers);