1509 references to As
GenerateDocumentationAndConfigFiles (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150
return Unsafe.
As
<TFromEnum, TToEnum>(ref value);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ModifierExtensions.cs (1)
16
return Unsafe.
As
<Modifiers, DeclarationModifiers>(ref modifiers);
http2cat (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171
ref Unsafe.
As
<char, byte>(
IIS.FunctionalTests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171
ref Unsafe.
As
<char, byte>(
IIS.LongTests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171
ref Unsafe.
As
<char, byte>(
IIS.NewHandler.FunctionalTests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171
ref Unsafe.
As
<char, byte>(
IIS.ShadowCopy.Tests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171
ref Unsafe.
As
<char, byte>(
IISExpress.FunctionalTests (1)
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171
ref Unsafe.
As
<char, byte>(
InMemory.FunctionalTests (26)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (26)
263
feature = Unsafe.
As
<IConnectionIdFeature?, TFeature?>(ref _currentIConnectionIdFeature);
267
feature = Unsafe.
As
<IConnectionTransportFeature?, TFeature?>(ref _currentIConnectionTransportFeature);
271
feature = Unsafe.
As
<IConnectionItemsFeature?, TFeature?>(ref _currentIConnectionItemsFeature);
275
feature = Unsafe.
As
<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature);
279
feature = Unsafe.
As
<IMemoryPoolFeature?, TFeature?>(ref _currentIMemoryPoolFeature);
283
feature = Unsafe.
As
<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature);
287
feature = Unsafe.
As
<IConnectionSocketFeature?, TFeature?>(ref _currentIConnectionSocketFeature);
291
feature = Unsafe.
As
<IProtocolErrorCodeFeature?, TFeature?>(ref _currentIProtocolErrorCodeFeature);
295
feature = Unsafe.
As
<IStreamDirectionFeature?, TFeature?>(ref _currentIStreamDirectionFeature);
299
feature = Unsafe.
As
<IStreamIdFeature?, TFeature?>(ref _currentIStreamIdFeature);
303
feature = Unsafe.
As
<IStreamAbortFeature?, TFeature?>(ref _currentIStreamAbortFeature);
307
feature = Unsafe.
As
<IStreamClosedFeature?, TFeature?>(ref _currentIStreamClosedFeature);
311
feature = 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)
150
return Unsafe.
As
<TFromEnum, TToEnum>(ref value);
Metrics.Legacy (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150
return Unsafe.
As
<TFromEnum, TToEnum>(ref value);
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\Json\EnumConverter.cs (2)
88
integer = Unsafe.
As
<TEnum, int>(ref value);
100
value = Unsafe.
As
<int, TEnum>(ref integer);
Microsoft.AspNetCore.Routing (2)
Matching\ILEmitTrieFactory.cs (2)
546
ref 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)
113
ref Unsafe.
As
<byte, long>(ref MemoryMarshal.GetReference(timingInfo.Span[sizeof(long)..])),
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171
ref Unsafe.
As
<char, byte>(
Microsoft.AspNetCore.Server.IIS (2)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
113
ref Unsafe.
As
<byte, long>(ref MemoryMarshal.GetReference(timingInfo.Span[sizeof(long)..])),
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171
ref Unsafe.
As
<char, byte>(
Microsoft.AspNetCore.Server.Kestrel.Core (71)
Internal\Http\HttpProtocol.Generated.cs (70)
500
feature = Unsafe.
As
<IHttpRequestFeature?, TFeature?>(ref _currentIHttpRequestFeature);
504
feature = Unsafe.
As
<IHttpResponseFeature?, TFeature?>(ref _currentIHttpResponseFeature);
508
feature = Unsafe.
As
<IHttpResponseBodyFeature?, TFeature?>(ref _currentIHttpResponseBodyFeature);
512
feature = Unsafe.
As
<IRouteValuesFeature?, TFeature?>(ref _currentIRouteValuesFeature);
516
feature = Unsafe.
As
<IEndpointFeature?, TFeature?>(ref _currentIEndpointFeature);
520
feature = Unsafe.
As
<IServiceProvidersFeature?, TFeature?>(ref _currentIServiceProvidersFeature);
524
feature = Unsafe.
As
<IHttpActivityFeature?, TFeature?>(ref _currentIHttpActivityFeature);
528
feature = Unsafe.
As
<IHttpMetricsTagsFeature?, TFeature?>(ref _currentIHttpMetricsTagsFeature);
532
feature = Unsafe.
As
<IItemsFeature?, TFeature?>(ref _currentIItemsFeature);
536
feature = Unsafe.
As
<IQueryFeature?, TFeature?>(ref _currentIQueryFeature);
540
feature = Unsafe.
As
<IRequestBodyPipeFeature?, TFeature?>(ref _currentIRequestBodyPipeFeature);
544
feature = Unsafe.
As
<IFormFeature?, TFeature?>(ref _currentIFormFeature);
548
feature = Unsafe.
As
<IHttpAuthenticationFeature?, TFeature?>(ref _currentIHttpAuthenticationFeature);
552
feature = Unsafe.
As
<IHttpRequestIdentifierFeature?, TFeature?>(ref _currentIHttpRequestIdentifierFeature);
556
feature = Unsafe.
As
<IHttpConnectionFeature?, TFeature?>(ref _currentIHttpConnectionFeature);
560
feature = Unsafe.
As
<ISessionFeature?, TFeature?>(ref _currentISessionFeature);
564
feature = Unsafe.
As
<IResponseCookiesFeature?, TFeature?>(ref _currentIResponseCookiesFeature);
568
feature = Unsafe.
As
<IHttpRequestTrailersFeature?, TFeature?>(ref _currentIHttpRequestTrailersFeature);
572
feature = Unsafe.
As
<IHttpResponseTrailersFeature?, TFeature?>(ref _currentIHttpResponseTrailersFeature);
576
feature = Unsafe.
As
<ITlsConnectionFeature?, TFeature?>(ref _currentITlsConnectionFeature);
580
feature = Unsafe.
As
<IHttpExtendedConnectFeature?, TFeature?>(ref _currentIHttpExtendedConnectFeature);
584
feature = Unsafe.
As
<IHttpUpgradeFeature?, TFeature?>(ref _currentIHttpUpgradeFeature);
588
feature = Unsafe.
As
<IHttpWebSocketFeature?, TFeature?>(ref _currentIHttpWebSocketFeature);
592
feature = Unsafe.
As
<IHttpWebTransportFeature?, TFeature?>(ref _currentIHttpWebTransportFeature);
596
feature = Unsafe.
As
<IBadRequestExceptionFeature?, TFeature?>(ref _currentIBadRequestExceptionFeature);
600
feature = Unsafe.
As
<IHttpRequestTimeoutFeature?, TFeature?>(ref _currentIHttpRequestTimeoutFeature);
604
feature = Unsafe.
As
<IHttp2StreamIdFeature?, TFeature?>(ref _currentIHttp2StreamIdFeature);
608
feature = Unsafe.
As
<IHttpRequestLifetimeFeature?, TFeature?>(ref _currentIHttpRequestLifetimeFeature);
612
feature = Unsafe.
As
<IHttpMaxRequestBodySizeFeature?, TFeature?>(ref _currentIHttpMaxRequestBodySizeFeature);
616
feature = Unsafe.
As
<IHttpMinRequestBodyDataRateFeature?, TFeature?>(ref _currentIHttpMinRequestBodyDataRateFeature);
620
feature = Unsafe.
As
<IHttpMinResponseDataRateFeature?, TFeature?>(ref _currentIHttpMinResponseDataRateFeature);
624
feature = Unsafe.
As
<IHttpBodyControlFeature?, TFeature?>(ref _currentIHttpBodyControlFeature);
628
feature = Unsafe.
As
<IHttpRequestBodyDetectionFeature?, TFeature?>(ref _currentIHttpRequestBodyDetectionFeature);
632
feature = Unsafe.
As
<IHttpResetFeature?, TFeature?>(ref _currentIHttpResetFeature);
636
feature = 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)
171
ref Unsafe.
As
<char, byte>(
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (26)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (26)
263
feature = Unsafe.
As
<IConnectionIdFeature?, TFeature?>(ref _currentIConnectionIdFeature);
267
feature = Unsafe.
As
<IConnectionTransportFeature?, TFeature?>(ref _currentIConnectionTransportFeature);
271
feature = Unsafe.
As
<IConnectionItemsFeature?, TFeature?>(ref _currentIConnectionItemsFeature);
275
feature = Unsafe.
As
<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature);
279
feature = Unsafe.
As
<IMemoryPoolFeature?, TFeature?>(ref _currentIMemoryPoolFeature);
283
feature = Unsafe.
As
<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature);
287
feature = Unsafe.
As
<IConnectionSocketFeature?, TFeature?>(ref _currentIConnectionSocketFeature);
291
feature = Unsafe.
As
<IProtocolErrorCodeFeature?, TFeature?>(ref _currentIProtocolErrorCodeFeature);
295
feature = Unsafe.
As
<IStreamDirectionFeature?, TFeature?>(ref _currentIStreamDirectionFeature);
299
feature = Unsafe.
As
<IStreamIdFeature?, TFeature?>(ref _currentIStreamIdFeature);
303
feature = Unsafe.
As
<IStreamAbortFeature?, TFeature?>(ref _currentIStreamAbortFeature);
307
feature = Unsafe.
As
<IStreamClosedFeature?, TFeature?>(ref _currentIStreamClosedFeature);
311
feature = 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)
263
feature = Unsafe.
As
<IConnectionIdFeature?, TFeature?>(ref _currentIConnectionIdFeature);
267
feature = Unsafe.
As
<IConnectionTransportFeature?, TFeature?>(ref _currentIConnectionTransportFeature);
271
feature = Unsafe.
As
<IConnectionItemsFeature?, TFeature?>(ref _currentIConnectionItemsFeature);
275
feature = Unsafe.
As
<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature);
279
feature = Unsafe.
As
<IMemoryPoolFeature?, TFeature?>(ref _currentIMemoryPoolFeature);
283
feature = Unsafe.
As
<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature);
287
feature = Unsafe.
As
<IConnectionSocketFeature?, TFeature?>(ref _currentIConnectionSocketFeature);
291
feature = Unsafe.
As
<IProtocolErrorCodeFeature?, TFeature?>(ref _currentIProtocolErrorCodeFeature);
295
feature = Unsafe.
As
<IStreamDirectionFeature?, TFeature?>(ref _currentIStreamDirectionFeature);
299
feature = Unsafe.
As
<IStreamIdFeature?, TFeature?>(ref _currentIStreamIdFeature);
303
feature = Unsafe.
As
<IStreamAbortFeature?, TFeature?>(ref _currentIStreamAbortFeature);
307
feature = Unsafe.
As
<IStreamClosedFeature?, TFeature?>(ref _currentIStreamClosedFeature);
311
feature = 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)
263
feature = Unsafe.
As
<IConnectionIdFeature?, TFeature?>(ref _currentIConnectionIdFeature);
267
feature = Unsafe.
As
<IConnectionTransportFeature?, TFeature?>(ref _currentIConnectionTransportFeature);
271
feature = Unsafe.
As
<IConnectionItemsFeature?, TFeature?>(ref _currentIConnectionItemsFeature);
275
feature = Unsafe.
As
<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature);
279
feature = Unsafe.
As
<IMemoryPoolFeature?, TFeature?>(ref _currentIMemoryPoolFeature);
283
feature = Unsafe.
As
<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature);
287
feature = Unsafe.
As
<IConnectionSocketFeature?, TFeature?>(ref _currentIConnectionSocketFeature);
291
feature = Unsafe.
As
<IProtocolErrorCodeFeature?, TFeature?>(ref _currentIProtocolErrorCodeFeature);
295
feature = Unsafe.
As
<IStreamDirectionFeature?, TFeature?>(ref _currentIStreamDirectionFeature);
299
feature = Unsafe.
As
<IStreamIdFeature?, TFeature?>(ref _currentIStreamIdFeature);
303
feature = Unsafe.
As
<IStreamAbortFeature?, TFeature?>(ref _currentIStreamAbortFeature);
307
feature = Unsafe.
As
<IStreamClosedFeature?, TFeature?>(ref _currentIStreamClosedFeature);
311
feature = 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)
202
feature = Unsafe.
As
<IConnectionIdFeature?, TFeature?>(ref _currentIConnectionIdFeature);
206
feature = Unsafe.
As
<IConnectionTransportFeature?, TFeature?>(ref _currentIConnectionTransportFeature);
210
feature = Unsafe.
As
<IConnectionItemsFeature?, TFeature?>(ref _currentIConnectionItemsFeature);
214
feature = Unsafe.
As
<IMemoryPoolFeature?, TFeature?>(ref _currentIMemoryPoolFeature);
218
feature = Unsafe.
As
<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature);
222
feature = Unsafe.
As
<IProtocolErrorCodeFeature?, TFeature?>(ref _currentIProtocolErrorCodeFeature);
226
feature = 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)
171
ref Unsafe.
As
<char, byte>(
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (26)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (26)
263
feature = Unsafe.
As
<IConnectionIdFeature?, TFeature?>(ref _currentIConnectionIdFeature);
267
feature = Unsafe.
As
<IConnectionTransportFeature?, TFeature?>(ref _currentIConnectionTransportFeature);
271
feature = Unsafe.
As
<IConnectionItemsFeature?, TFeature?>(ref _currentIConnectionItemsFeature);
275
feature = Unsafe.
As
<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature);
279
feature = Unsafe.
As
<IMemoryPoolFeature?, TFeature?>(ref _currentIMemoryPoolFeature);
283
feature = Unsafe.
As
<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature);
287
feature = Unsafe.
As
<IConnectionSocketFeature?, TFeature?>(ref _currentIConnectionSocketFeature);
291
feature = Unsafe.
As
<IProtocolErrorCodeFeature?, TFeature?>(ref _currentIProtocolErrorCodeFeature);
295
feature = Unsafe.
As
<IStreamDirectionFeature?, TFeature?>(ref _currentIStreamDirectionFeature);
299
feature = Unsafe.
As
<IStreamIdFeature?, TFeature?>(ref _currentIStreamIdFeature);
303
feature = Unsafe.
As
<IStreamAbortFeature?, TFeature?>(ref _currentIStreamAbortFeature);
307
feature = Unsafe.
As
<IStreamClosedFeature?, TFeature?>(ref _currentIStreamClosedFeature);
311
feature = 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)
113
ref Unsafe.
As
<byte, long>(ref MemoryMarshal.GetReference(timingInfo.Span[sizeof(long)..])),
src\Shared\ServerInfrastructure\StringUtilities.cs (1)
171
ref Unsafe.
As
<char, byte>(
Microsoft.CodeAnalysis.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150
return Unsafe.
As
<TFromEnum, TToEnum>(ref value);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ModifierExtensions.cs (1)
16
return Unsafe.
As
<Modifiers, DeclarationModifiers>(ref modifiers);
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150
return Unsafe.
As
<TFromEnum, TToEnum>(ref value);
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150
return Unsafe.
As
<TFromEnum, TToEnum>(ref value);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ModifierExtensions.cs (1)
16
return Unsafe.
As
<Modifiers, DeclarationModifiers>(ref modifiers);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150
return Unsafe.
As
<TFromEnum, TToEnum>(ref value);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ModifierExtensions.cs (1)
16
return Unsafe.
As
<Modifiers, DeclarationModifiers>(ref modifiers);
Microsoft.CodeAnalysis.CSharp (1)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2048
var result = (TypeKind)Volatile.Read(ref Unsafe.
As
<TypeKind, byte>(ref _lazyKind));
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150
return Unsafe.
As
<TFromEnum, TToEnum>(ref value);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ModifierExtensions.cs (1)
16
return Unsafe.
As
<Modifiers, DeclarationModifiers>(ref modifiers);
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150
return Unsafe.
As
<TFromEnum, TToEnum>(ref value);
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150
return Unsafe.
As
<TFromEnum, TToEnum>(ref value);
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150
return Unsafe.
As
<TFromEnum, TToEnum>(ref value);
Microsoft.Data.Analysis (12)
PrimitiveColumnContainer.cs (1)
558
ReadOnlyDataFrameBuffer<bool> boolLocalBuffer = Unsafe.
As
<ReadOnlyDataFrameBuffer<T>, ReadOnlyDataFrameBuffer<bool>>(ref localBuffer);
PrimitiveDataFrameColumn.cs (9)
1058
newColumn._columnContainer.HandleOperation(operation, Unsafe.
As
<U, T>(ref value));
1093
newColumn._columnContainer.HandleOperation(operation, Unsafe.
As
<U, T>(ref value));
1135
newColumn._columnContainer.HandleReverseOperation(operation, Unsafe.
As
<U, T>(ref value));
1169
newColumn._columnContainer.HandleReverseOperation(operation, Unsafe.
As
<U, T>(ref value));
1207
retColumn._columnContainer.HandleOperation(operation, Unsafe.
As
<U, bool>(ref value));
1364
return new BooleanDataFrameColumn(Name, (this as PrimitiveDataFrameColumn<bool>)._columnContainer.HandleOperation(operation, Unsafe.
As
<U, bool>(ref value)));
1374
return new BooleanDataFrameColumn(Name, primitiveColumn._columnContainer.HandleOperation(operation, Unsafe.
As
<U, T>(ref value)));
1386
return new BooleanDataFrameColumn(Name, (this as PrimitiveDataFrameColumn<DateTime>)._columnContainer.HandleOperation(operation, Unsafe.
As
<U, DateTime>(ref value)));
1406
return new BooleanDataFrameColumn(Name, primitiveColumn._columnContainer.HandleOperation(operation, Unsafe.
As
<U, T>(ref value)));
PrimitiveDataFrameColumn.Sort.cs (1)
63
ReadOnlyMemory<T> typedBuffer = Unsafe.
As
<ReadOnlyMemory<byte>, ReadOnlyMemory<T>>(ref buffer);
ReadOnlyDataFrameBuffer.cs (1)
31
return 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)
150
return Unsafe.
As
<TFromEnum, TToEnum>(ref value);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ModifierExtensions.cs (1)
16
return Unsafe.
As
<Modifiers, DeclarationModifiers>(ref modifiers);
System.DirectoryServices.Protocols (1)
System\DirectoryServices\Protocols\ldap\LdapSessionOptions.cs (1)
118
internal ref readonly byte GetPinnableReference() => ref Unsafe.
As
<SecurityProtocol, byte>(ref _securityProtocol);
System.Drawing.Common (1)
System\Drawing\SystemFonts.cs (1)
268
GetFontFromData(Unsafe.
As
<LOGFONTW, LOGFONT>(ref Unsafe.AsRef(in logFont)));
System.Memory (2)
System\Buffers\ReadOnlySequence.cs (1)
494
ReadOnlySequence<char> charSequence = Unsafe.
As
<ReadOnlySequence<T>, ReadOnlySequence<char>>(ref localThis);
System\Buffers\ReadOnlySequence.Helpers.cs (1)
688
return MemoryMarshal.CreateReadOnlySpan(ref Unsafe.
As
<char, T>(ref MemoryMarshal.GetReference(spanOfChar)), spanOfChar.Length);
System.Net.Quic (2)
System\Net\Quic\Internal\ResettableValueTaskSource.cs (1)
58
public bool IsCompleted => (State)Volatile.Read(ref Unsafe.
As
<State, byte>(ref _state)) == State.Completed;
System\Net\Quic\Internal\ValueTaskSource.cs (1)
41
public 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)
818
QueueState state = (QueueState)Volatile.Read(ref Unsafe.
As
<QueueState, int>(ref _state));
System.Numerics.Tensors (49)
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IAggregationOperator.cs (24)
2396
ref Unsafe.
As
<byte, T>(ref MemoryMarshal.GetReference(AlignmentByteMask_64x65)),
2403
ref Unsafe.
As
<ushort, T>(ref MemoryMarshal.GetReference(AlignmentUInt16Mask_32x33)),
2410
ref Unsafe.
As
<uint, T>(ref MemoryMarshal.GetReference(AlignmentUInt32Mask_16x17)),
2417
ref Unsafe.
As
<ulong, T>(ref MemoryMarshal.GetReference(AlignmentUInt64Mask_8x9)),
2432
ref Unsafe.
As
<byte, T>(ref MemoryMarshal.GetReference(AlignmentByteMask_64x65)),
2439
ref Unsafe.
As
<ushort, T>(ref MemoryMarshal.GetReference(AlignmentUInt16Mask_32x33)),
2446
ref Unsafe.
As
<uint, T>(ref MemoryMarshal.GetReference(AlignmentUInt32Mask_16x17)),
2453
ref Unsafe.
As
<ulong, T>(ref MemoryMarshal.GetReference(AlignmentUInt64Mask_8x9)),
2468
ref Unsafe.
As
<byte, T>(ref MemoryMarshal.GetReference(AlignmentByteMask_64x65)),
2475
ref Unsafe.
As
<ushort, T>(ref MemoryMarshal.GetReference(AlignmentUInt16Mask_32x33)),
2482
ref Unsafe.
As
<uint, T>(ref MemoryMarshal.GetReference(AlignmentUInt32Mask_16x17)),
2489
ref Unsafe.
As
<ulong, T>(ref MemoryMarshal.GetReference(AlignmentUInt64Mask_8x9)),
2504
ref Unsafe.
As
<byte, T>(ref MemoryMarshal.GetReference(RemainderByteMask_64x65)),
2511
ref Unsafe.
As
<ushort, T>(ref MemoryMarshal.GetReference(RemainderUInt16Mask_32x33)),
2518
ref Unsafe.
As
<uint, T>(ref MemoryMarshal.GetReference(RemainderUInt32Mask_16x17)),
2525
ref Unsafe.
As
<ulong, T>(ref MemoryMarshal.GetReference(RemainderUInt64Mask_8x9)),
2540
ref Unsafe.
As
<byte, T>(ref MemoryMarshal.GetReference(RemainderByteMask_64x65)),
2547
ref Unsafe.
As
<ushort, T>(ref MemoryMarshal.GetReference(RemainderUInt16Mask_32x33)),
2554
ref Unsafe.
As
<uint, T>(ref MemoryMarshal.GetReference(RemainderUInt32Mask_16x17)),
2561
ref Unsafe.
As
<ulong, T>(ref MemoryMarshal.GetReference(RemainderUInt64Mask_8x9)),
2576
ref Unsafe.
As
<byte, T>(ref MemoryMarshal.GetReference(RemainderByteMask_64x65)),
2583
ref Unsafe.
As
<ushort, T>(ref MemoryMarshal.GetReference(RemainderUInt16Mask_32x33)),
2590
ref Unsafe.
As
<uint, T>(ref MemoryMarshal.GetReference(RemainderUInt32Mask_16x17)),
2597
ref 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)
324
ref Unsafe.
As
<TDerived, T>(ref items._reference),
System\Numerics\Tensors\netcore\TensorPrimitives.CosineSimilarity.cs (6)
203
ref short xRef = ref Unsafe.
As
<Half, short>(ref MemoryMarshal.GetReference(x));
204
ref short yRef = ref Unsafe.
As
<Half, short>(ref MemoryMarshal.GetReference(y));
245
ref short xRef = ref Unsafe.
As
<Half, short>(ref MemoryMarshal.GetReference(x));
246
ref short yRef = ref Unsafe.
As
<Half, short>(ref MemoryMarshal.GetReference(y));
287
ref short xRef = ref Unsafe.
As
<Half, short>(ref MemoryMarshal.GetReference(x));
288
ref short yRef = ref Unsafe.
As
<Half, short>(ref MemoryMarshal.GetReference(y));
System\Numerics\Tensors\netcore\TensorPrimitives.HammingDistance.cs (2)
55
MemoryMarshal.CreateReadOnlySpan(ref Unsafe.
As
<T, ushort>(ref MemoryMarshal.GetReference(x)), x.Length),
56
MemoryMarshal.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)
152
return Unsafe.
As
<object, T>(ref o);
157
rtType.CallDefaultStructConstructor(ref Unsafe.
As
<T, byte>(ref t));
src\libraries\System.Private.CoreLib\src\System\Array.cs (19)
543
ref object? srcData = ref Unsafe.Add(ref Unsafe.
As
<byte, object?>(ref MemoryMarshal.GetArrayDataReference(sourceArray)), sourceIndex);
589
ref object? destData = ref Unsafe.Add(ref Unsafe.
As
<byte, object?>(ref MemoryMarshal.GetArrayDataReference(destinationArray)), destinationIndex);
611
ref object? srcData = ref Unsafe.Add(ref Unsafe.
As
<byte, object?>(ref MemoryMarshal.GetArrayDataReference(sourceArray)), sourceIndex);
612
ref object? destData = ref Unsafe.Add(ref Unsafe.
As
<byte, object?>(ref MemoryMarshal.GetArrayDataReference(destinationArray)), destinationIndex);
680
SpanHelpers.ClearWithReferences(ref Unsafe.
As
<byte, IntPtr>(ref pStart), totalByteLength / (nuint)sizeof(IntPtr));
701
lowerBound = Unsafe.Add(ref Unsafe.
As
<byte, int>(ref p), rank);
716
SpanHelpers.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()));
1919
ref Unsafe.Add(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetArrayDataReference(array)), startIndex),
1927
ref Unsafe.Add(ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetArrayDataReference(array)), startIndex),
1935
ref Unsafe.Add(ref Unsafe.
As
<T, int>(ref MemoryMarshal.GetArrayDataReference(array)), startIndex),
1943
ref 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()));
2164
ref Unsafe.Add(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex),
2174
ref Unsafe.Add(ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex),
2184
ref Unsafe.Add(ref Unsafe.
As
<T, int>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex),
2194
ref Unsafe.Add(ref Unsafe.
As
<T, long>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex),
3073
new 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)
137
ref Unsafe.
As
<T, byte>(ref destination),
138
ref Unsafe.
As
<T, byte>(ref source),
145
ref Unsafe.
As
<T, byte>(ref destination),
146
ref Unsafe.
As
<T, byte>(ref source),
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Integer.Signed.cs (4)
59
return TryParseByteX(source, out Unsafe.
As
<sbyte, byte>(ref value), out bytesConsumed);
111
return TryParseUInt16X(source, out Unsafe.
As
<short, ushort>(ref value), out bytesConsumed);
163
return TryParseUInt32X(source, out Unsafe.
As
<int, uint>(ref value), out bytesConsumed);
215
return TryParseUInt64X(source, out Unsafe.
As
<long, ulong>(ref value), out bytesConsumed);
src\libraries\System.Private.CoreLib\src\System\ByReference.cs (1)
17
public 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)
173
ref byte value = ref Unsafe.
As
<bool, byte>(ref MemoryMarshal.GetArrayDataReference<bool>(values));
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\RandomizedStringEqualityComparer.cs (1)
90
ref Unsafe.
As
<char, byte>(ref MemoryMarshal.GetReference(alternate)),
src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (3)
24
private static ref DecCalc AsMutable(ref decimal d) => ref Unsafe.
As
<decimal, DecCalc>(ref d);
2218
int 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)
421
ushort flagsValue = Unsafe.
As
<byte, ushort>(ref pFlagsValue);
422
return (Unsafe.
As
<byte, ushort>(ref pThisValue) & flagsValue) == flagsValue;
428
uint flagsValue = Unsafe.
As
<byte, uint>(ref pFlagsValue);
429
return (Unsafe.
As
<byte, uint>(ref pThisValue) & flagsValue) == flagsValue;
435
ulong flagsValue = Unsafe.
As
<byte, ulong>(ref pFlagsValue);
436
return (Unsafe.
As
<byte, ulong>(ref pThisValue) & flagsValue) == flagsValue;
894
if (underlyingType == typeof(sbyte)) return TryParseByValueOrName<sbyte, byte>(rt, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TEnum, sbyte>(ref result));
895
if (underlyingType == typeof(byte)) return TryParseByValueOrName<byte, byte>(rt, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TEnum, byte>(ref result));
896
if (underlyingType == typeof(short)) return TryParseByValueOrName<short, ushort>(rt, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TEnum, short>(ref result));
897
if (underlyingType == typeof(ushort)) return TryParseByValueOrName<ushort, ushort>(rt, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TEnum, ushort>(ref result));
898
if (underlyingType == typeof(int)) return TryParseByValueOrName<int, uint>(rt, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TEnum, int>(ref result));
899
if (underlyingType == typeof(uint)) return TryParseByValueOrName<uint, uint>(rt, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TEnum, uint>(ref result));
900
if (underlyingType == typeof(long)) return TryParseByValueOrName<long, ulong>(rt, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TEnum, long>(ref result));
901
if (underlyingType == typeof(ulong)) return TryParseByValueOrName<ulong, ulong>(rt, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TEnum, ulong>(ref result));
903
if (underlyingType == typeof(nint)) return TryParseRareTypeByValueOrName<nint, nuint>(rt, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TEnum, nint>(ref result));
904
if (underlyingType == typeof(nuint)) return TryParseRareTypeByValueOrName<nuint, nuint>(rt, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TEnum, nuint>(ref result));
905
if (underlyingType == typeof(float)) return TryParseRareTypeByValueOrName<float, float>(rt, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TEnum, float>(ref result));
906
if (underlyingType == typeof(double)) return TryParseRareTypeByValueOrName<double, double>(rt, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TEnum, double>(ref result));
907
if (underlyingType == typeof(char)) return TryParseRareTypeByValueOrName<char, char>(rt, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TEnum, char>(ref result));
938
return TryParseByName(enumType, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TUnderlying, TStorage>(ref result));
953
return TryParseByName(enumType, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TUnderlying, TStorage>(ref result));
996
return TryParseByName(enumType, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TUnderlying, TStorage>(ref result));
1020
return TryParseByName(enumType, value, ignoreCase, throwOnFailure, out Unsafe.
As
<TUnderlying, TStorage>(ref result));
1169
CorElementType.ELEMENT_TYPE_I1 => Unsafe.
As
<byte, sbyte>(ref data),
1171
CorElementType.ELEMENT_TYPE_I2 => Unsafe.
As
<byte, short>(ref data),
1172
CorElementType.ELEMENT_TYPE_U2 => Unsafe.
As
<byte, ushort>(ref data),
1173
CorElementType.ELEMENT_TYPE_I4 => Unsafe.
As
<byte, int>(ref data),
1174
CorElementType.ELEMENT_TYPE_U4 => Unsafe.
As
<byte, uint>(ref data),
1175
CorElementType.ELEMENT_TYPE_I8 => Unsafe.
As
<byte, long>(ref data),
1176
CorElementType.ELEMENT_TYPE_U8 => Unsafe.
As
<byte, ulong>(ref data),
1178
CorElementType.ELEMENT_TYPE_R4 => Unsafe.
As
<byte, float>(ref data),
1179
CorElementType.ELEMENT_TYPE_R8 => Unsafe.
As
<byte, double>(ref data),
1180
CorElementType.ELEMENT_TYPE_I => Unsafe.
As
<byte, IntPtr>(ref data),
1181
CorElementType.ELEMENT_TYPE_U => Unsafe.
As
<byte, UIntPtr>(ref data),
1182
CorElementType.ELEMENT_TYPE_CHAR => Unsafe.
As
<byte, char>(ref data),
1183
CorElementType.ELEMENT_TYPE_BOOLEAN => Unsafe.
As
<byte, bool>(ref data),
1213
return Unsafe.
As
<byte, ushort>(ref pThisValue) == Unsafe.
As
<byte, ushort>(ref pOtherValue);
1217
return Unsafe.
As
<byte, uint>(ref pThisValue) == Unsafe.
As
<byte, uint>(ref pOtherValue);
1221
return Unsafe.
As
<byte, ulong>(ref pThisValue) == Unsafe.
As
<byte, ulong>(ref pOtherValue);
1260
CorElementType.ELEMENT_TYPE_I1 => Unsafe.
As
<byte, sbyte>(ref data).GetHashCode(),
1262
CorElementType.ELEMENT_TYPE_I2 => Unsafe.
As
<byte, short>(ref data).GetHashCode(),
1263
CorElementType.ELEMENT_TYPE_U2 => Unsafe.
As
<byte, ushort>(ref data).GetHashCode(),
1264
CorElementType.ELEMENT_TYPE_I4 => Unsafe.
As
<byte, int>(ref data).GetHashCode(),
1265
CorElementType.ELEMENT_TYPE_U4 => Unsafe.
As
<byte, uint>(ref data).GetHashCode(),
1266
CorElementType.ELEMENT_TYPE_I8 => Unsafe.
As
<byte, long>(ref data).GetHashCode(),
1267
CorElementType.ELEMENT_TYPE_U8 => Unsafe.
As
<byte, ulong>(ref data).GetHashCode(),
1269
CorElementType.ELEMENT_TYPE_R4 => Unsafe.
As
<byte, float>(ref data).GetHashCode(),
1270
CorElementType.ELEMENT_TYPE_R8 => Unsafe.
As
<byte, double>(ref data).GetHashCode(),
1271
CorElementType.ELEMENT_TYPE_I => Unsafe.
As
<byte, IntPtr>(ref data).GetHashCode(),
1272
CorElementType.ELEMENT_TYPE_U => Unsafe.
As
<byte, UIntPtr>(ref data).GetHashCode(),
1273
CorElementType.ELEMENT_TYPE_CHAR => Unsafe.
As
<byte, char>(ref data).GetHashCode(),
1274
CorElementType.ELEMENT_TYPE_BOOLEAN => Unsafe.
As
<byte, bool>(ref data).GetHashCode(),
1298
return Unsafe.
As
<byte, sbyte>(ref pThisValue).CompareTo(Unsafe.
As
<byte, sbyte>(ref pTargetValue));
1304
return Unsafe.
As
<byte, short>(ref pThisValue).CompareTo(Unsafe.
As
<byte, short>(ref pTargetValue));
1307
return Unsafe.
As
<byte, ushort>(ref pThisValue).CompareTo(Unsafe.
As
<byte, ushort>(ref pTargetValue));
1310
return Unsafe.
As
<byte, int>(ref pThisValue).CompareTo(Unsafe.
As
<byte, int>(ref pTargetValue));
1313
return Unsafe.
As
<byte, uint>(ref pThisValue).CompareTo(Unsafe.
As
<byte, uint>(ref pTargetValue));
1316
return Unsafe.
As
<byte, long>(ref pThisValue).CompareTo(Unsafe.
As
<byte, long>(ref pTargetValue));
1319
return Unsafe.
As
<byte, ulong>(ref pThisValue).CompareTo(Unsafe.
As
<byte, ulong>(ref pTargetValue));
1323
return Unsafe.
As
<byte, float>(ref pThisValue).CompareTo(Unsafe.
As
<byte, float>(ref pTargetValue));
1326
return Unsafe.
As
<byte, double>(ref pThisValue).CompareTo(Unsafe.
As
<byte, double>(ref pTargetValue));
1470
TStorage value = Unsafe.
As
<byte, TStorage>(ref rawData);
1500
TStorage value = Unsafe.
As
<byte, TStorage>(ref rawData);
1567
ushort value = Unsafe.
As
<byte, ushort>(ref data);
1578
uint value = Unsafe.
As
<byte, uint>(ref data);
1591
ulong value = Unsafe.
As
<byte, ulong>(ref data);
1700
CorElementType.ELEMENT_TYPE_I2 => TryFormatPrimitiveDefault<short, ushort>(enumType, Unsafe.
As
<byte, short>(ref rawData), destination, out charsWritten),
1701
CorElementType.ELEMENT_TYPE_U2 => TryFormatPrimitiveDefault<ushort, ushort>(enumType, Unsafe.
As
<byte, ushort>(ref rawData), destination, out charsWritten),
1702
CorElementType.ELEMENT_TYPE_I4 => TryFormatPrimitiveDefault<int, uint>(enumType, Unsafe.
As
<byte, int>(ref rawData), destination, out charsWritten),
1703
CorElementType.ELEMENT_TYPE_U4 => TryFormatPrimitiveDefault<uint, uint>(enumType, Unsafe.
As
<byte, uint>(ref rawData), destination, out charsWritten),
1704
CorElementType.ELEMENT_TYPE_I8 => TryFormatPrimitiveDefault<long, ulong>(enumType, Unsafe.
As
<byte, long>(ref rawData), destination, out charsWritten),
1705
CorElementType.ELEMENT_TYPE_U8 => TryFormatPrimitiveDefault<ulong, ulong>(enumType, Unsafe.
As
<byte, ulong>(ref rawData), destination, out charsWritten),
1707
CorElementType.ELEMENT_TYPE_R4 => TryFormatPrimitiveDefault<float, float>(enumType, Unsafe.
As
<byte, float>(ref rawData), destination, out charsWritten),
1708
CorElementType.ELEMENT_TYPE_R8 => TryFormatPrimitiveDefault<double, double>(enumType, Unsafe.
As
<byte, double>(ref rawData), destination, out charsWritten),
1709
CorElementType.ELEMENT_TYPE_I => TryFormatPrimitiveDefault<nint, nuint>(enumType, Unsafe.
As
<byte, nint>(ref rawData), destination, out charsWritten),
1710
CorElementType.ELEMENT_TYPE_U => TryFormatPrimitiveDefault<nuint, nuint>(enumType, Unsafe.
As
<byte, nuint>(ref rawData), destination, out charsWritten),
1711
CorElementType.ELEMENT_TYPE_CHAR => TryFormatPrimitiveDefault<char, char>(enumType, Unsafe.
As
<byte, char>(ref rawData), destination, out charsWritten),
1722
CorElementType.ELEMENT_TYPE_I2 => TryFormatPrimitiveNonDefault<short, ushort>(enumType, Unsafe.
As
<byte, short>(ref rawData), destination, out charsWritten, format),
1723
CorElementType.ELEMENT_TYPE_U2 => TryFormatPrimitiveNonDefault<ushort, ushort>(enumType, Unsafe.
As
<byte, ushort>(ref rawData), destination, out charsWritten, format),
1724
CorElementType.ELEMENT_TYPE_I4 => TryFormatPrimitiveNonDefault<int, uint>(enumType, Unsafe.
As
<byte, int>(ref rawData), destination, out charsWritten, format),
1725
CorElementType.ELEMENT_TYPE_U4 => TryFormatPrimitiveNonDefault<uint, uint>(enumType, Unsafe.
As
<byte, uint>(ref rawData), destination, out charsWritten, format),
1726
CorElementType.ELEMENT_TYPE_I8 => TryFormatPrimitiveNonDefault<long, ulong>(enumType, Unsafe.
As
<byte, long>(ref rawData), destination, out charsWritten, format),
1727
CorElementType.ELEMENT_TYPE_U8 => TryFormatPrimitiveNonDefault<ulong, ulong>(enumType, Unsafe.
As
<byte, ulong>(ref rawData), destination, out charsWritten, format),
1729
CorElementType.ELEMENT_TYPE_R4 => TryFormatPrimitiveNonDefault<float, float>(enumType, Unsafe.
As
<byte, float>(ref rawData), destination, out charsWritten, format),
1730
CorElementType.ELEMENT_TYPE_R8 => TryFormatPrimitiveNonDefault<double, double>(enumType, Unsafe.
As
<byte, double>(ref rawData), destination, out charsWritten, format),
1731
CorElementType.ELEMENT_TYPE_I => TryFormatPrimitiveNonDefault<nint, nuint>(enumType, Unsafe.
As
<byte, nint>(ref rawData), destination, out charsWritten, format),
1732
CorElementType.ELEMENT_TYPE_U => TryFormatPrimitiveNonDefault<nuint, nuint>(enumType, Unsafe.
As
<byte, nuint>(ref rawData), destination, out charsWritten, format),
1733
CorElementType.ELEMENT_TYPE_CHAR => TryFormatPrimitiveNonDefault<char, char>(enumType, Unsafe.
As
<byte, char>(ref rawData), destination, out charsWritten, format),
1911
return TryFormatNumberAsHex<TStorage>(ref Unsafe.
As
<TUnderlying, byte>(ref value), destination, out charsWritten);
src\libraries\System.Private.CoreLib\src\System\Globalization\CharUnicodeInfo.cs (4)
287
ref short rsStart = ref Unsafe.
As
<byte, short>(ref MemoryMarshal.GetReference(UppercaseValues));
306
ref ushort rsStart = ref Unsafe.
As
<byte, ushort>(ref MemoryMarshal.GetReference(UppercaseValues));
322
ref short rsStart = ref Unsafe.
As
<byte, short>(ref MemoryMarshal.GetReference(LowercaseValues));
341
ref ushort rsStart = ref Unsafe.
As
<byte, ushort>(ref MemoryMarshal.GetReference(LowercaseValues));
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (8)
96
vec1 = TVector.LoadUnsafe(ref Unsafe.
As
<char, ushort>(ref charA), i);
97
vec2 = TVector.LoadUnsafe(ref Unsafe.
As
<char, ushort>(ref charB), i);
123
vec1 = TVector.LoadUnsafe(ref Unsafe.
As
<char, ushort>(ref charA), i);
124
vec2 = TVector.LoadUnsafe(ref Unsafe.
As
<char, ushort>(ref charB), i);
187
valueAu64 = Unsafe.ReadUnaligned<ulong>(ref Unsafe.
As
<char, byte>(ref Unsafe.AddByteOffset(ref charA, byteOffset)));
188
valueBu64 = Unsafe.ReadUnaligned<ulong>(ref Unsafe.
As
<char, byte>(ref Unsafe.AddByteOffset(ref charB, byteOffset)));
222
valueAu32 = Unsafe.ReadUnaligned<uint>(ref Unsafe.
As
<char, byte>(ref Unsafe.AddByteOffset(ref charA, byteOffset)));
223
valueBu32 = Unsafe.ReadUnaligned<uint>(ref Unsafe.
As
<char, byte>(ref Unsafe.AddByteOffset(ref charB, byteOffset)));
src\libraries\System.Private.CoreLib\src\System\Guid.cs (1)
248
return Unsafe.
As
<GuidResult, Guid>(ref Unsafe.AsRef(in this));
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (9)
246
return nint_t.TryParse(s, out Unsafe.
As
<nint, nint_t>(ref result));
253
return nint_t.TryParse(s, provider, out Unsafe.
As
<nint, nint_t>(ref result));
259
return nint_t.TryParse(s, style, provider, out Unsafe.
As
<nint, nint_t>(ref result));
265
return nint_t.TryParse(s, out Unsafe.
As
<nint, nint_t>(ref result));
275
return nint_t.TryParse(utf8Text, out Unsafe.
As
<nint, nint_t>(ref result));
286
return nint_t.TryParse(s, provider, out Unsafe.
As
<nint, nint_t>(ref result));
292
return nint_t.TryParse(s, style, provider, out Unsafe.
As
<nint, nint_t>(ref result));
1437
return nint_t.TryParse(utf8Text, style, provider, out Unsafe.
As
<nint, nint_t>(ref result));
1447
return nint_t.TryParse(utf8Text, provider, out Unsafe.
As
<nint, nint_t>(ref result));
src\libraries\System.Private.CoreLib\src\System\Marvin.OrdinalIgnoreCase.cs (2)
28
tempValue = Unsafe.ReadUnaligned<uint>(ref Unsafe.
As
<char, byte>(ref Unsafe.AddByteOffset(ref data, byteOffset)));
93
int 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)
287
refToReturn = ref Unsafe.
As
<char, T>(ref ((string)tmpObject).GetRawStringData());
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (174)
335
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
342
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
349
ref Unsafe.
As
<T, int>(ref MemoryMarshal.GetReference(span)),
356
ref Unsafe.
As
<T, long>(ref MemoryMarshal.GetReference(span)),
818
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
825
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
832
ref Unsafe.
As
<T, int>(ref MemoryMarshal.GetReference(span)),
839
ref Unsafe.
As
<T, long>(ref MemoryMarshal.GetReference(span)),
867
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
874
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
881
ref Unsafe.
As
<T, int>(ref MemoryMarshal.GetReference(span)),
888
ref Unsafe.
As
<T, long>(ref MemoryMarshal.GetReference(span)),
945
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
953
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
983
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
991
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
1052
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
1061
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
1093
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
1102
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
1155
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
1165
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
1212
ref byte valuesRef = ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(values));
1215
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
1225
ref short valuesRef = ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(values));
1228
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
1241
ref Unsafe.
As
<T, char>(ref MemoryMarshal.GetReference(span)),
1243
ref Unsafe.
As
<T, char>(ref MemoryMarshal.GetReference(values)),
1396
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
1403
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
1410
ref Unsafe.
As
<T, int>(ref MemoryMarshal.GetReference(span)),
1417
ref Unsafe.
As
<T, long>(ref MemoryMarshal.GetReference(span)),
1445
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
1452
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
1459
ref Unsafe.
As
<T, int>(ref MemoryMarshal.GetReference(span)),
1466
ref Unsafe.
As
<T, long>(ref MemoryMarshal.GetReference(span)),
1523
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
1531
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
1561
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
1569
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
1630
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
1639
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
1671
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
1680
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
1734
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
1744
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
1792
ref byte valuesRef = ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(values));
1795
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
1805
ref short valuesRef = ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(values));
1808
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
1821
ref Unsafe.
As
<T, char>(ref MemoryMarshal.GetReference(span)),
1823
ref Unsafe.
As
<T, char>(ref MemoryMarshal.GetReference(values)),
1930
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
1939
ref Unsafe.
As
<T, ushort>(ref MemoryMarshal.GetReference(span)),
1948
ref Unsafe.
As
<T, uint>(ref MemoryMarshal.GetReference(span)),
1957
ref Unsafe.
As
<T, ulong>(ref MemoryMarshal.GetReference(span)),
2001
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
2010
ref Unsafe.
As
<T, ushort>(ref MemoryMarshal.GetReference(span)),
2019
ref Unsafe.
As
<T, uint>(ref MemoryMarshal.GetReference(span)),
2028
ref Unsafe.
As
<T, ulong>(ref MemoryMarshal.GetReference(span)),
2072
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
2081
ref Unsafe.
As
<T, ushort>(ref MemoryMarshal.GetReference(span)),
2090
ref Unsafe.
As
<T, uint>(ref MemoryMarshal.GetReference(span)),
2099
ref Unsafe.
As
<T, ulong>(ref MemoryMarshal.GetReference(span)),
2143
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
2152
ref Unsafe.
As
<T, ushort>(ref MemoryMarshal.GetReference(span)),
2161
ref Unsafe.
As
<T, uint>(ref MemoryMarshal.GetReference(span)),
2170
ref Unsafe.
As
<T, ulong>(ref MemoryMarshal.GetReference(span)),
2216
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
2222
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
2228
ref Unsafe.
As
<T, int>(ref MemoryMarshal.GetReference(span)),
2234
ref Unsafe.
As
<T, long>(ref MemoryMarshal.GetReference(span)),
2257
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
2263
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
2269
ref Unsafe.
As
<T, int>(ref MemoryMarshal.GetReference(span)),
2275
ref Unsafe.
As
<T, long>(ref MemoryMarshal.GetReference(span)),
2325
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
2327
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(value)),
2332
ref Unsafe.
As
<T, char>(ref MemoryMarshal.GetReference(span)),
2334
ref Unsafe.
As
<T, char>(ref MemoryMarshal.GetReference(value)),
2354
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
2356
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(value)),
2361
ref Unsafe.
As
<T, char>(ref MemoryMarshal.GetReference(span)),
2363
ref Unsafe.
As
<T, char>(ref MemoryMarshal.GetReference(value)),
2412
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
2419
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
2426
ref Unsafe.
As
<T, int>(ref MemoryMarshal.GetReference(span)),
2433
ref Unsafe.
As
<T, long>(ref MemoryMarshal.GetReference(span)),
2458
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
2465
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
2472
ref Unsafe.
As
<T, int>(ref MemoryMarshal.GetReference(span)),
2479
ref Unsafe.
As
<T, long>(ref MemoryMarshal.GetReference(span)),
2532
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
2534
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(value)),
2540
ref Unsafe.
As
<T, char>(ref MemoryMarshal.GetReference(span)),
2542
ref Unsafe.
As
<T, char>(ref MemoryMarshal.GetReference(value)),
2564
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
2566
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(value)),
2572
ref Unsafe.
As
<T, char>(ref MemoryMarshal.GetReference(span)),
2574
ref Unsafe.
As
<T, char>(ref MemoryMarshal.GetReference(value)),
2675
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
2683
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
2710
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
2718
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
2775
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
2784
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
2813
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
2822
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
2879
ref byte spanRef = ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span));
2880
ref byte valueRef = ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(values));
2927
ref short spanRef = ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span));
2928
ref 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),
3095
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
3103
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
3130
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
3138
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
3196
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
3205
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
3234
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
3243
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
3301
ref byte spanRef = ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span));
3302
ref byte valueRef = ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(values));
3349
ref short spanRef = ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span));
3350
ref 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),
3456
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
3457
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(other)),
3498
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
3499
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(other)),
3540
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
3542
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(other)),
3547
ref Unsafe.
As
<T, char>(ref MemoryMarshal.GetReference(span)),
3549
ref Unsafe.
As
<T, char>(ref MemoryMarshal.GetReference(other)),
3596
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
3597
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(value)),
3639
ref Unsafe.
As
<T, byte>(ref Unsafe.Add(ref MemoryMarshal.GetReference(span), (nint)(uint)(spanLength - valueLength) /* force zero-extension */)),
3640
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(value)),
4479
ref byte src = ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span));
4491
ref ushort src = ref Unsafe.
As
<T, ushort>(ref MemoryMarshal.GetReference(span));
4502
ref int src = ref Unsafe.
As
<T, int>(ref MemoryMarshal.GetReference(span));
4513
ref long src = ref Unsafe.
As
<T, long>(ref MemoryMarshal.GetReference(span));
4545
ref byte src = ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span));
4557
ref ushort src = ref Unsafe.
As
<T, ushort>(ref MemoryMarshal.GetReference(span));
4568
ref int src = ref Unsafe.
As
<T, int>(ref MemoryMarshal.GetReference(span));
4579
ref long src = ref Unsafe.
As
<T, long>(ref MemoryMarshal.GetReference(span));
4659
ref Unsafe.
As
<T, byte>(ref src),
4660
ref Unsafe.
As
<T, byte>(ref dst),
4670
ref Unsafe.
As
<T, ushort>(ref src),
4671
ref Unsafe.
As
<T, ushort>(ref dst),
4680
ref Unsafe.
As
<T, int>(ref src),
4681
ref Unsafe.
As
<T, int>(ref dst),
4690
ref Unsafe.
As
<T, long>(ref src),
4691
ref Unsafe.
As
<T, long>(ref dst),
4745
ref Unsafe.
As
<T, byte>(ref src),
4746
ref Unsafe.
As
<T, byte>(ref dst),
4756
ref Unsafe.
As
<T, ushort>(ref src),
4757
ref Unsafe.
As
<T, ushort>(ref dst),
4766
ref Unsafe.
As
<T, int>(ref src),
4767
ref Unsafe.
As
<T, int>(ref dst),
4776
ref Unsafe.
As
<T, long>(ref src),
4777
ref Unsafe.
As
<T, long>(ref dst),
4942
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
4943
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(other)),
5433
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
5440
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
5447
ref Unsafe.
As
<T, int>(ref MemoryMarshal.GetReference(span)),
5454
ref Unsafe.
As
<T, long>(ref MemoryMarshal.GetReference(span)),
5482
ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(span)),
5489
ref Unsafe.
As
<T, short>(ref MemoryMarshal.GetReference(span)),
5496
ref Unsafe.
As
<T, int>(ref MemoryMarshal.GetReference(span)),
5503
ref Unsafe.
As
<T, long>(ref MemoryMarshal.GetReference(span)),
src\libraries\System.Private.CoreLib\src\System\Number.BigInteger.cs (1)
948
ref 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)
20
internal ref Impl AsImpl() => ref Unsafe.
As
<Matrix3x2, Impl>(ref this);
24
internal readonly ref readonly Impl AsROImpl() => ref Unsafe.
As
<Matrix3x2, Impl>(ref Unsafe.AsRef(in this));
30
public ref Matrix3x2 AsM3x2() => ref Unsafe.
As
<Impl, Matrix3x2>(ref this);
src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix4x4.Impl.cs (3)
23
internal ref Impl AsImpl() => ref Unsafe.
As
<Matrix4x4, Impl>(ref this);
27
internal readonly ref readonly Impl AsROImpl() => ref Unsafe.
As
<Matrix4x4, Impl>(ref Unsafe.AsRef(in this));
33
public ref Matrix4x4 AsM4x4() => ref Unsafe.
As
<Impl, Matrix4x4>(ref this);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (7)
837
return Unsafe.ReadUnaligned<Vector<T>>(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(values)));
1986
ref readonly byte address = ref Unsafe.
As
<T, byte>(ref Unsafe.AsRef(in source));
2002
ref readonly byte address = ref Unsafe.
As
<T, byte>(ref Unsafe.Add(ref Unsafe.AsRef(in source), (nint)elementOffset));
3032
ref byte address = ref Unsafe.
As
<T, byte>(ref destination);
3049
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref destination), source);
3563
ref T address = ref Unsafe.
As
<Vector<T>, T>(ref Unsafe.AsRef(in vector));
3571
ref 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)
61
this = Unsafe.ReadUnaligned<Vector<T>>(ref Unsafe.
As
<T, byte>(ref values[0]));
80
this = Unsafe.ReadUnaligned<Vector<T>>(ref Unsafe.
As
<T, byte>(ref values[index]));
97
this = Unsafe.ReadUnaligned<Vector<T>>(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(values)));
636
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref destination[0]), this);
660
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref destination[startIndex]), this);
690
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(destination)), this);
812
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(destination)), this);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (7)
411
return Unsafe.ReadUnaligned<Vector2>(ref Unsafe.
As
<float, byte>(ref MemoryMarshal.GetReference(values)));
704
ref readonly byte address = ref Unsafe.
As
<float, byte>(ref Unsafe.AsRef(in source));
714
ref readonly byte address = ref Unsafe.
As
<float, byte>(ref Unsafe.Add(ref Unsafe.AsRef(in source), (nint)elementOffset));
974
Unsafe.WriteUnaligned(ref Unsafe.
As
<float, byte>(ref array[0]), this);
1002
Unsafe.WriteUnaligned(ref Unsafe.
As
<float, byte>(ref array[index]), this);
1016
Unsafe.WriteUnaligned(ref Unsafe.
As
<float, byte>(ref MemoryMarshal.GetReference(destination)), this);
1030
Unsafe.WriteUnaligned(ref Unsafe.
As
<float, byte>(ref MemoryMarshal.GetReference(destination)), this);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.Extensions.cs (2)
84
ref byte address = ref Unsafe.
As
<float, byte>(ref destination);
97
Unsafe.WriteUnaligned(ref Unsafe.
As
<float, byte>(ref destination), source);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.cs (7)
446
return Unsafe.ReadUnaligned<Vector3>(ref Unsafe.
As
<float, byte>(ref MemoryMarshal.GetReference(values)));
734
ref readonly byte address = ref Unsafe.
As
<float, byte>(ref Unsafe.AsRef(in source));
744
ref readonly byte address = ref Unsafe.
As
<float, byte>(ref Unsafe.Add(ref Unsafe.AsRef(in source), (nint)elementOffset));
984
Unsafe.WriteUnaligned(ref Unsafe.
As
<float, byte>(ref array[0]), this);
1012
Unsafe.WriteUnaligned(ref Unsafe.
As
<float, byte>(ref array[index]), this);
1026
Unsafe.WriteUnaligned(ref Unsafe.
As
<float, byte>(ref MemoryMarshal.GetReference(destination)), this);
1040
Unsafe.WriteUnaligned(ref Unsafe.
As
<float, byte>(ref MemoryMarshal.GetReference(destination)), this);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.Extensions.cs (2)
79
ref byte address = ref Unsafe.
As
<float, byte>(ref destination);
92
Unsafe.WriteUnaligned(ref Unsafe.
As
<float, byte>(ref destination), source);
src\libraries\System.Private.CoreLib\src\System\Numerics\VectorDebugView_1.cs (11)
33
Unsafe.WriteUnaligned(ref Unsafe.
As
<double, byte>(ref items[0]), _value);
43
Unsafe.WriteUnaligned(ref Unsafe.
As
<short, byte>(ref items[0]), _value);
53
Unsafe.WriteUnaligned(ref Unsafe.
As
<int, byte>(ref items[0]), _value);
63
Unsafe.WriteUnaligned(ref Unsafe.
As
<long, byte>(ref items[0]), _value);
73
Unsafe.WriteUnaligned(ref Unsafe.
As
<nint, byte>(ref items[0]), _value);
83
Unsafe.WriteUnaligned(ref Unsafe.
As
<nuint, byte>(ref items[0]), _value);
93
Unsafe.WriteUnaligned(ref Unsafe.
As
<sbyte, byte>(ref items[0]), _value);
103
Unsafe.WriteUnaligned(ref Unsafe.
As
<float, byte>(ref items[0]), _value);
113
Unsafe.WriteUnaligned(ref Unsafe.
As
<ushort, byte>(ref items[0]), _value);
123
Unsafe.WriteUnaligned(ref Unsafe.
As
<uint, byte>(ref items[0]), _value);
133
Unsafe.WriteUnaligned(ref Unsafe.
As
<ulong, byte>(ref items[0]), _value);
src\libraries\System.Private.CoreLib\src\System\ReadOnlyMemory.cs (1)
209
refToReturn = ref Unsafe.
As
<char, T>(ref ((string)tmpObject).GetRawStringData());
src\libraries\System.Private.CoreLib\src\System\ReadOnlySpan.cs (2)
227
return new ReadOnlySpan<T>(ref Unsafe.
As
<TDerived, T>(ref items._reference), items.Length);
358
return new string(new ReadOnlySpan<char>(ref Unsafe.
As
<T, char>(ref _reference), _length));
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (16)
131
return 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)),
152
return Volatile.Read(ref Unsafe.
As
<IntPtr, object>(ref *(IntPtr*)_addressOrOffset));
165
ref Unsafe.
As
<IntPtr, object>(ref *(IntPtr*)_addressOrOffset).GetRawData());
168
return Pointer.Box((void*)Unsafe.
As
<byte, IntPtr>(
223
ref Unsafe.
As
<byte, object?>(ref Unsafe.AddByteOffset(ref obj.GetRawData(), _addressOrOffset)),
239
ref Unsafe.
As
<byte, short>(ref Unsafe.AddByteOffset(ref obj.GetRawData(), _addressOrOffset)),
240
Unsafe.
As
<byte, short>(ref value!.GetRawData()));
247
ref Unsafe.
As
<byte, int>(ref Unsafe.AddByteOffset(ref obj.GetRawData(), _addressOrOffset)),
248
Unsafe.
As
<byte, int>(ref value!.GetRawData()));
255
ref Unsafe.
As
<byte, long>(ref Unsafe.AddByteOffset(ref obj.GetRawData(), _addressOrOffset)),
256
Unsafe.
As
<byte, long>(ref value!.GetRawData()));
261
Volatile.Write(ref Unsafe.
As
<IntPtr, object?>(ref *(IntPtr*)_addressOrOffset), value);
275
Unsafe.
As
<byte, short>(ref value!.GetRawData()));
282
Unsafe.
As
<byte, int>(ref value!.GetRawData()));
289
Unsafe.
As
<byte, long>(ref value!.GetRawData()));
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokeUtils.cs (55)
138
Unsafe.
As
<byte, ushort>(ref destElement) = srcElement; break;
141
Unsafe.
As
<byte, uint>(ref destElement) = srcElement; break;
144
Unsafe.
As
<byte, ulong>(ref destElement) = srcElement; break;
146
Unsafe.
As
<byte, float>(ref destElement) = srcElement; break;
148
Unsafe.
As
<byte, double>(ref destElement) = srcElement; break;
158
Unsafe.
As
<byte, short>(ref destElement) = Unsafe.
As
<byte, sbyte>(ref srcElement); break;
160
Unsafe.
As
<byte, int>(ref destElement) = Unsafe.
As
<byte, sbyte>(ref srcElement); break;
162
Unsafe.
As
<byte, long>(ref destElement) = Unsafe.
As
<byte, sbyte>(ref srcElement); break;
164
Unsafe.
As
<byte, float>(ref destElement) = Unsafe.
As
<byte, sbyte>(ref srcElement); break;
166
Unsafe.
As
<byte, double>(ref destElement) = Unsafe.
As
<byte, sbyte>(ref srcElement); break;
179
Unsafe.
As
<byte, ushort>(ref destElement) = Unsafe.
As
<byte, ushort>(ref srcElement); break;
182
Unsafe.
As
<byte, uint>(ref destElement) = Unsafe.
As
<byte, ushort>(ref srcElement); break;
185
Unsafe.
As
<byte, ulong>(ref destElement) = Unsafe.
As
<byte, ushort>(ref srcElement); break;
187
Unsafe.
As
<byte, float>(ref destElement) = Unsafe.
As
<byte, ushort>(ref srcElement); break;
189
Unsafe.
As
<byte, double>(ref destElement) = Unsafe.
As
<byte, ushort>(ref srcElement); break;
199
Unsafe.
As
<byte, int>(ref destElement) = Unsafe.
As
<byte, short>(ref srcElement); break;
201
Unsafe.
As
<byte, long>(ref destElement) = Unsafe.
As
<byte, short>(ref srcElement); break;
203
Unsafe.
As
<byte, float>(ref destElement) = Unsafe.
As
<byte, short>(ref srcElement); break;
205
Unsafe.
As
<byte, double>(ref destElement) = Unsafe.
As
<byte, short>(ref srcElement); break;
216
Unsafe.
As
<byte, ulong>(ref destElement) = Unsafe.
As
<byte, uint>(ref srcElement); break;
218
Unsafe.
As
<byte, float>(ref destElement) = Unsafe.
As
<byte, uint>(ref srcElement); break;
220
Unsafe.
As
<byte, double>(ref destElement) = Unsafe.
As
<byte, uint>(ref srcElement); break;
230
Unsafe.
As
<byte, long>(ref destElement) = Unsafe.
As
<byte, int>(ref srcElement); break;
232
Unsafe.
As
<byte, float>(ref destElement) = Unsafe.
As
<byte, int>(ref srcElement); break;
234
Unsafe.
As
<byte, double>(ref destElement) = Unsafe.
As
<byte, int>(ref srcElement); break;
244
Unsafe.
As
<byte, float>(ref destElement) = Unsafe.
As
<byte, ulong>(ref srcElement); break;
246
Unsafe.
As
<byte, double>(ref destElement) = Unsafe.
As
<byte, ulong>(ref srcElement); break;
256
Unsafe.
As
<byte, float>(ref destElement) = Unsafe.
As
<byte, long>(ref srcElement); break;
258
Unsafe.
As
<byte, double>(ref destElement) = Unsafe.
As
<byte, long>(ref srcElement); break;
266
Unsafe.
As
<byte, double>(ref destElement) = Unsafe.
As
<byte, float>(ref srcElement); break;
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (3)
108
ref TaskAwaiter ta = ref Unsafe.
As
<TAwaiter, TaskAwaiter>(ref awaiter); // relies on TaskAwaiter/TaskAwaiter<T> having the same layout
113
ref ConfiguredTaskAwaitable.ConfiguredTaskAwaiter ta = ref Unsafe.
As
<TAwaiter, ConfiguredTaskAwaitable.ConfiguredTaskAwaiter>(ref awaiter);
343
return ref Unsafe.
As
<object?, ExecutionContext?>(ref m_stateObject);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\CastCache.cs (3)
109
return ref Unsafe.
As
<byte, int>(ref Unsafe.AddByteOffset(ref table.GetRawData(), (nint)sizeof(nint)));
129
return ref Unsafe.
As
<int, uint>(ref Unsafe.Add(ref tableData, 2));
136
return ref Unsafe.Add(ref Unsafe.
As
<int, CastCacheEntry>(ref tableData), index + 1);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\GenericCache.cs (2)
112
return ref Unsafe.
As
<byte, Entry>(ref Unsafe.As<RawArrayData>(table).Data);
138
return 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)
370
return 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)
273
return ReadUnaligned<TTo>(ref
As
<TFrom, byte>(ref source));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (2)
450
Interlocked.Or(ref Unsafe.
As
<CreateComInterfaceFlagsEx, int>(ref Flags), setMask);
458
Interlocked.And(ref Unsafe.
As
<CreateComInterfaceFlagsEx, int>(ref Flags), resetMask);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (1)
577
return ref Unsafe.
As
<UnionTypes, T>(ref _typeUnion._unionTypes);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (6)
37
ref Unsafe.
As
<T, byte>(ref GetReference(span)),
60
ref Unsafe.
As
<T, byte>(ref GetReference(span)),
153
ref Unsafe.
As
<TFrom, TTo>(ref span._reference),
208
ref Unsafe.
As
<TFrom, TTo>(ref GetReference(span)),
561
return ref Unsafe.
As
<byte, T>(ref GetReference(span));
583
return ref Unsafe.
As
<byte, T>(ref GetReference(span));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (6)
698
return NativeType.TryParse(s, out Unsafe.
As
<NFloat, NativeType>(ref result));
708
return NativeType.TryParse(s, out Unsafe.
As
<NFloat, NativeType>(ref result));
718
return NativeType.TryParse(utf8Text, out Unsafe.
As
<NFloat, NativeType>(ref result));
735
return NativeType.TryParse(s, style, provider, out Unsafe.
As
<NFloat, NativeType>(ref result));
752
return NativeType.TryParse(s, style, provider, out Unsafe.
As
<NFloat, NativeType>(ref result));
1923
return NativeType.TryParse(utf8Text, style, provider, out Unsafe.
As
<NFloat, NativeType>(ref result));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (16)
762
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref destination[0]), vector);
789
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref destination[startIndex]), vector);
806
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(destination)), vector);
990
return Unsafe.ReadUnaligned<Vector128<T>>(ref Unsafe.
As
<T, byte>(ref values[0]));
1011
return Unsafe.ReadUnaligned<Vector128<T>>(ref Unsafe.
As
<T, byte>(ref values[index]));
1028
return Unsafe.ReadUnaligned<Vector128<T>>(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(values)));
2362
ref readonly byte address = ref Unsafe.
As
<T, byte>(ref Unsafe.AsRef(in source));
2378
ref readonly byte address = ref Unsafe.
As
<T, byte>(ref Unsafe.Add(ref Unsafe.AsRef(in source), (nint)elementOffset));
2385
internal static Vector128<ushort> LoadUnsafe(ref char source) => LoadUnsafe(ref Unsafe.
As
<char, ushort>(ref source));
2391
internal static Vector128<ushort> LoadUnsafe(ref char source, nuint elementOffset) => LoadUnsafe(ref Unsafe.
As
<char, ushort>(ref source), elementOffset);
3942
ref byte address = ref Unsafe.
As
<T, byte>(ref Unsafe.Add(ref destination, elementOffset));
3956
ref byte address = ref Unsafe.
As
<T, byte>(ref destination);
3973
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref destination), source);
4121
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(destination)), vector);
4458
ref T address = ref Unsafe.
As
<Vector128<T>, T>(ref Unsafe.AsRef(in vector));
4466
ref 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)
106
ref byte address = ref Unsafe.
As
<Vector<T>, byte>(ref value);
120
Unsafe.WriteUnaligned(ref Unsafe.
As
<Vector128<float>, byte>(ref result), value);
134
Unsafe.WriteUnaligned(ref Unsafe.
As
<Vector128<float>, byte>(ref result), value);
145
ref byte address = ref Unsafe.
As
<Vector128<float>, byte>(ref value);
156
ref byte address = ref Unsafe.
As
<Vector128<float>, byte>(ref value);
179
Unsafe.WriteUnaligned(ref Unsafe.
As
<Vector<T>, byte>(ref result), value);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128DebugView_1.cs (11)
32
Unsafe.WriteUnaligned(ref Unsafe.
As
<double, byte>(ref items[0]), _value);
42
Unsafe.WriteUnaligned(ref Unsafe.
As
<short, byte>(ref items[0]), _value);
52
Unsafe.WriteUnaligned(ref Unsafe.
As
<int, byte>(ref items[0]), _value);
62
Unsafe.WriteUnaligned(ref Unsafe.
As
<long, byte>(ref items[0]), _value);
72
Unsafe.WriteUnaligned(ref Unsafe.
As
<nint, byte>(ref items[0]), _value);
82
Unsafe.WriteUnaligned(ref Unsafe.
As
<nuint, byte>(ref items[0]), _value);
92
Unsafe.WriteUnaligned(ref Unsafe.
As
<sbyte, byte>(ref items[0]), _value);
102
Unsafe.WriteUnaligned(ref Unsafe.
As
<float, byte>(ref items[0]), _value);
112
Unsafe.WriteUnaligned(ref Unsafe.
As
<ushort, byte>(ref items[0]), _value);
122
Unsafe.WriteUnaligned(ref Unsafe.
As
<uint, byte>(ref items[0]), _value);
132
Unsafe.WriteUnaligned(ref Unsafe.
As
<ulong, byte>(ref items[0]), _value);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (19)
369
ref byte address = ref Unsafe.
As
<Vector<T>, byte>(ref value);
375
Unsafe.WriteUnaligned(ref Unsafe.
As
<Vector256<T>, byte>(ref result), value);
393
ref byte address = ref Unsafe.
As
<Vector256<T>, byte>(ref value);
399
Unsafe.WriteUnaligned(ref Unsafe.
As
<Vector<T>, byte>(ref result), value);
769
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref destination[0]), vector);
796
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref destination[startIndex]), vector);
813
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(destination)), vector);
997
return Unsafe.ReadUnaligned<Vector256<T>>(ref Unsafe.
As
<T, byte>(ref values[0]));
1018
return Unsafe.ReadUnaligned<Vector256<T>>(ref Unsafe.
As
<T, byte>(ref values[index]));
1035
return Unsafe.ReadUnaligned<Vector256<T>>(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(values)));
2446
ref readonly byte address = ref Unsafe.
As
<T, byte>(ref Unsafe.AsRef(in source));
2462
ref readonly byte address = ref Unsafe.
As
<T, byte>(ref Unsafe.Add(ref Unsafe.AsRef(in source), (nint)elementOffset));
2469
internal static Vector256<ushort> LoadUnsafe(ref char source) => LoadUnsafe(ref Unsafe.
As
<char, ushort>(ref source));
2475
internal static Vector256<ushort> LoadUnsafe(ref char source, nuint elementOffset) => LoadUnsafe(ref Unsafe.
As
<char, ushort>(ref source), elementOffset);
3923
ref byte address = ref Unsafe.
As
<T, byte>(ref destination);
3940
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref destination), source);
4076
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(destination)), vector);
4411
ref T address = ref Unsafe.
As
<Vector256<T>, T>(ref Unsafe.AsRef(in vector));
4419
ref 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)
32
Unsafe.WriteUnaligned(ref Unsafe.
As
<double, byte>(ref items[0]), _value);
42
Unsafe.WriteUnaligned(ref Unsafe.
As
<short, byte>(ref items[0]), _value);
52
Unsafe.WriteUnaligned(ref Unsafe.
As
<int, byte>(ref items[0]), _value);
62
Unsafe.WriteUnaligned(ref Unsafe.
As
<long, byte>(ref items[0]), _value);
72
Unsafe.WriteUnaligned(ref Unsafe.
As
<nint, byte>(ref items[0]), _value);
82
Unsafe.WriteUnaligned(ref Unsafe.
As
<nuint, byte>(ref items[0]), _value);
92
Unsafe.WriteUnaligned(ref Unsafe.
As
<sbyte, byte>(ref items[0]), _value);
102
Unsafe.WriteUnaligned(ref Unsafe.
As
<float, byte>(ref items[0]), _value);
112
Unsafe.WriteUnaligned(ref Unsafe.
As
<ushort, byte>(ref items[0]), _value);
122
Unsafe.WriteUnaligned(ref Unsafe.
As
<uint, byte>(ref items[0]), _value);
132
Unsafe.WriteUnaligned(ref Unsafe.
As
<ulong, byte>(ref items[0]), _value);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (17)
368
Unsafe.WriteUnaligned(ref Unsafe.
As
<Vector512<T>, byte>(ref result), value);
384
ref byte address = ref Unsafe.
As
<Vector512<T>, byte>(ref value);
681
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref destination[0]), vector);
707
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref destination[startIndex]), vector);
723
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(destination)), vector);
899
return Unsafe.ReadUnaligned<Vector512<T>>(ref Unsafe.
As
<T, byte>(ref values[0]));
919
return Unsafe.ReadUnaligned<Vector512<T>>(ref Unsafe.
As
<T, byte>(ref values[index]));
936
return Unsafe.ReadUnaligned<Vector512<T>>(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(values)));
2472
ref readonly byte address = ref Unsafe.
As
<T, byte>(ref Unsafe.AsRef(in source));
2488
ref readonly byte address = ref Unsafe.
As
<T, byte>(ref Unsafe.Add(ref Unsafe.AsRef(in source), (nint)elementOffset));
2495
internal static Vector512<ushort> LoadUnsafe(ref char source) => LoadUnsafe(ref Unsafe.
As
<char, ushort>(ref source));
2501
internal static Vector512<ushort> LoadUnsafe(ref char source, nuint elementOffset) => LoadUnsafe(ref Unsafe.
As
<char, ushort>(ref source), elementOffset);
3934
ref byte address = ref Unsafe.
As
<T, byte>(ref destination);
3951
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref destination), source);
4053
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(destination)), vector);
4388
ref T address = ref Unsafe.
As
<Vector512<T>, T>(ref Unsafe.AsRef(in vector));
4396
ref 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)
32
Unsafe.WriteUnaligned(ref Unsafe.
As
<double, byte>(ref items[0]), _value);
42
Unsafe.WriteUnaligned(ref Unsafe.
As
<short, byte>(ref items[0]), _value);
52
Unsafe.WriteUnaligned(ref Unsafe.
As
<int, byte>(ref items[0]), _value);
62
Unsafe.WriteUnaligned(ref Unsafe.
As
<long, byte>(ref items[0]), _value);
72
Unsafe.WriteUnaligned(ref Unsafe.
As
<nint, byte>(ref items[0]), _value);
82
Unsafe.WriteUnaligned(ref Unsafe.
As
<nuint, byte>(ref items[0]), _value);
92
Unsafe.WriteUnaligned(ref Unsafe.
As
<sbyte, byte>(ref items[0]), _value);
102
Unsafe.WriteUnaligned(ref Unsafe.
As
<float, byte>(ref items[0]), _value);
112
Unsafe.WriteUnaligned(ref Unsafe.
As
<ushort, byte>(ref items[0]), _value);
122
Unsafe.WriteUnaligned(ref Unsafe.
As
<uint, byte>(ref items[0]), _value);
132
Unsafe.WriteUnaligned(ref Unsafe.
As
<ulong, byte>(ref items[0]), _value);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (13)
719
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref destination[0]), vector);
746
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref destination[startIndex]), vector);
763
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(destination)), vector);
970
return Unsafe.ReadUnaligned<Vector64<T>>(ref Unsafe.
As
<T, byte>(ref values[0]));
991
return Unsafe.ReadUnaligned<Vector64<T>>(ref Unsafe.
As
<T, byte>(ref values[index]));
1008
return Unsafe.ReadUnaligned<Vector64<T>>(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(values)));
2345
ref readonly byte address = ref Unsafe.
As
<T, byte>(ref Unsafe.AsRef(in source));
2361
ref readonly byte address = ref Unsafe.
As
<T, byte>(ref Unsafe.Add(ref Unsafe.AsRef(in source), (nint)elementOffset));
3834
ref byte address = ref Unsafe.
As
<T, byte>(ref destination);
3851
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref destination), source);
4000
Unsafe.WriteUnaligned(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(destination)), vector);
4345
ref T address = ref Unsafe.
As
<Vector64<T>, T>(ref Unsafe.AsRef(in vector));
4353
ref 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)
32
Unsafe.WriteUnaligned(ref Unsafe.
As
<double, byte>(ref items[0]), _value);
42
Unsafe.WriteUnaligned(ref Unsafe.
As
<short, byte>(ref items[0]), _value);
52
Unsafe.WriteUnaligned(ref Unsafe.
As
<int, byte>(ref items[0]), _value);
62
Unsafe.WriteUnaligned(ref Unsafe.
As
<long, byte>(ref items[0]), _value);
72
Unsafe.WriteUnaligned(ref Unsafe.
As
<nint, byte>(ref items[0]), _value);
82
Unsafe.WriteUnaligned(ref Unsafe.
As
<nuint, byte>(ref items[0]), _value);
92
Unsafe.WriteUnaligned(ref Unsafe.
As
<sbyte, byte>(ref items[0]), _value);
102
Unsafe.WriteUnaligned(ref Unsafe.
As
<float, byte>(ref items[0]), _value);
112
Unsafe.WriteUnaligned(ref Unsafe.
As
<ushort, byte>(ref items[0]), _value);
122
Unsafe.WriteUnaligned(ref Unsafe.
As
<uint, byte>(ref items[0]), _value);
132
Unsafe.WriteUnaligned(ref Unsafe.
As
<ulong, byte>(ref items[0]), _value);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any1SearchValues.cs (4)
36
SpanHelpers.NonPackedIndexOfValueType<TImpl, SpanHelpers.DontNegate<TImpl>>(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, span.Length);
40
SpanHelpers.NonPackedIndexOfValueType<TImpl, SpanHelpers.Negate<TImpl>>(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, span.Length);
44
SpanHelpers.LastIndexOfValueType(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, span.Length);
48
SpanHelpers.LastIndexOfAnyExceptValueType(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, span.Length);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any2CharPackedIgnoreCaseSearchValues.cs (2)
57
ref Unsafe.
As
<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state);
65
ref Unsafe.
As
<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Any2SearchValues.cs (4)
36
SpanHelpers.NonPackedIndexOfAnyValueType<TImpl, SpanHelpers.DontNegate<TImpl>>(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, span.Length);
40
SpanHelpers.NonPackedIndexOfAnyValueType<TImpl, SpanHelpers.Negate<TImpl>>(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, span.Length);
44
SpanHelpers.LastIndexOfAnyValueType(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, span.Length);
48
SpanHelpers.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)
36
SpanHelpers.NonPackedIndexOfAnyValueType<TImpl, SpanHelpers.DontNegate<TImpl>>(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, span.Length);
40
SpanHelpers.NonPackedIndexOfAnyValueType<TImpl, SpanHelpers.Negate<TImpl>>(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, span.Length);
44
SpanHelpers.LastIndexOfAnyValueType(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, span.Length);
48
SpanHelpers.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)
39
SpanHelpers.IndexOfAnyValueType(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, _e3, span.Length);
43
SpanHelpers.IndexOfAnyExceptValueType(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, _e3, span.Length);
47
SpanHelpers.LastIndexOfAnyValueType(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, _e3, span.Length);
51
SpanHelpers.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)
40
SpanHelpers.IndexOfAnyValueType(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, _e3, _e4, span.Length);
44
SpanHelpers.IndexOfAnyExceptValueType(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, _e3, _e4, span.Length);
48
SpanHelpers.LastIndexOfAnyValueType(ref Unsafe.
As
<T, TImpl>(ref MemoryMarshal.GetReference(span)), _e0, _e1, _e2, _e3, _e4, span.Length);
52
SpanHelpers.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)
50
ref Unsafe.
As
<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state);
58
ref Unsafe.
As
<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state);
66
ref Unsafe.
As
<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state);
74
ref Unsafe.
As
<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state);
82
ref Unsafe.
As
<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state);
90
ref Unsafe.
As
<char, short>(ref MemoryMarshal.GetReference(span)), span.Length, ref _state);
src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (4)
193
TryIndexOfAny<DontNegate>(ref Unsafe.
As
<char, short>(ref searchSpace), searchSpaceLength, asciiValues, out index);
197
TryIndexOfAny<Negate>(ref Unsafe.
As
<char, short>(ref searchSpace), searchSpaceLength, asciiValues, out index);
201
TryLastIndexOfAny<DontNegate>(ref Unsafe.
As
<char, short>(ref searchSpace), searchSpaceLength, asciiValues, out index);
205
TryLastIndexOfAny<Negate>(ref Unsafe.
As
<char, short>(ref searchSpace), searchSpaceLength, asciiValues, out index);
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (9)
85
Unsafe.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
108
ref Unsafe.
As
<char, short>(ref MemoryMarshal.GetReference(values)),
428
Vector256<byte> charMap256 = Vector256.LoadUnsafe(ref Unsafe.
As
<ProbabilisticMap, byte>(ref state.Map));
513
Vector128<byte> charMapLower = Vector128.LoadUnsafe(ref Unsafe.
As
<ProbabilisticMap, byte>(ref state.Map));
514
Vector128<byte> charMapUpper = Vector128.LoadUnsafe(ref Unsafe.
As
<ProbabilisticMap, byte>(ref state.Map), (nuint)Vector128<byte>.Count);
603
Vector256<byte> charMap256 = Vector256.LoadUnsafe(ref Unsafe.
As
<ProbabilisticMap, byte>(ref state.Map));
690
Vector128<byte> charMapLower = Vector128.LoadUnsafe(ref Unsafe.
As
<ProbabilisticMap, byte>(ref state.Map));
691
Vector128<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)
98
ref Unsafe.
As
<ProbabilisticMap, uint>(ref Map),
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticWithAsciiCharSearchValues.cs (6)
60
ref Unsafe.
As
<char, short>(ref MemoryMarshal.GetReference(span)),
70
ref Unsafe.
As
<char, short>(ref MemoryMarshal.GetReference(span)),
109
ref Unsafe.
As
<char, short>(ref MemoryMarshal.GetReference(span)),
159
ref Unsafe.
As
<char, short>(ref MemoryMarshal.GetReference(span)),
169
ref Unsafe.
As
<char, short>(ref MemoryMarshal.GetReference(span)),
198
ref Unsafe.
As
<char, short>(ref MemoryMarshal.GetReference(span)),
src\libraries\System.Private.CoreLib\src\System\SearchValues\RangeCharSearchValues.cs (2)
45
ref Unsafe.
As
<char, ushort>(ref MemoryMarshal.GetReference(span)),
55
ref 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)
100
ref Unsafe.
As
<char, short>(ref Unsafe.Add(ref MemoryMarshal.GetReference(span), i)),
209
ref 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)
76
ref Unsafe.
As
<char, byte>(ref matchStart),
266
ref byte matchByteStart = ref Unsafe.
As
<char, byte>(ref matchStart);
275
ref byte matchByteStart = ref Unsafe.
As
<char, byte>(ref matchStart);
334
ref byte matchByteStart = ref Unsafe.
As
<char, byte>(ref matchStart);
344
ref byte matchByteStart = ref Unsafe.
As
<char, byte>(ref matchStart);
426
ref byte matchByteStart = ref Unsafe.
As
<char, byte>(ref matchStart);
435
ref byte matchByteStart = ref Unsafe.
As
<char, byte>(ref matchStart);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\SingleStringSearchValuesThreeChars.cs (12)
259
Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref Unsafe.
As
<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16());
260
Vector128<ushort> cmpCh3 = Vector128.Equals(ch3, Vector128.LoadUnsafe(ref Unsafe.
As
<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16());
272
Vector128<ushort> cmpCh2 = Vector128.Equals(ch2, Vector128.LoadUnsafe(ref Unsafe.
As
<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16() & caseConversion);
273
Vector128<ushort> cmpCh3 = Vector128.Equals(ch3, Vector128.LoadUnsafe(ref Unsafe.
As
<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16() & caseConversion);
287
Vector256<ushort> cmpCh2 = Vector256.Equals(ch2, Vector256.LoadUnsafe(ref Unsafe.
As
<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16());
288
Vector256<ushort> cmpCh3 = Vector256.Equals(ch3, Vector256.LoadUnsafe(ref Unsafe.
As
<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16());
296
Vector256<ushort> cmpCh2 = Vector256.Equals(ch2, Vector256.LoadUnsafe(ref Unsafe.
As
<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16() & caseConversion);
297
Vector256<ushort> cmpCh3 = Vector256.Equals(ch3, Vector256.LoadUnsafe(ref Unsafe.
As
<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16() & caseConversion);
310
Vector512<ushort> cmpCh2 = Vector512.Equals(ch2, Vector512.LoadUnsafe(ref Unsafe.
As
<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16());
311
Vector512<ushort> cmpCh3 = Vector512.Equals(ch3, Vector512.LoadUnsafe(ref Unsafe.
As
<char, byte>(ref searchSpace), ch3ByteOffset).AsUInt16());
319
Vector512<ushort> cmpCh2 = Vector512.Equals(ch2, Vector512.LoadUnsafe(ref Unsafe.
As
<char, byte>(ref searchSpace), ch2ByteOffset).AsUInt16() & caseConversion);
320
Vector512<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)
298
SpanHelpers.ClearWithReferences(ref Unsafe.
As
<T, IntPtr>(ref _reference), (uint)_length * (nuint)(sizeof(T) / sizeof(nuint)));
302
SpanHelpers.ClearWithoutReferences(ref Unsafe.
As
<T, byte>(ref _reference), (uint)_length * (nuint)sizeof(T));
382
return new string(new ReadOnlySpan<char>(ref Unsafe.
As
<T, char>(ref _reference), _length));
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (30)
37
ref byte valueTail = ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref value, 1));
56
ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref searchSpace, offset + 1)),
122
ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref searchSpace, offset + charPos)),
123
ref Unsafe.
As
<char, byte>(ref value), (nuint)(uint)valueLength * 2))
187
ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref searchSpace, offset + charPos)),
188
ref Unsafe.
As
<char, byte>(ref value), (nuint)(uint)valueLength * 2))
249
ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref searchSpace, offset + charPos)),
250
ref Unsafe.
As
<char, byte>(ref value), (nuint)(uint)valueLength * 2))
274
return LastIndexOfValueType(ref Unsafe.
As
<char, short>(ref searchSpace), (short)value, searchSpaceLength); // for single-char values use plain LastIndexOf
284
ref byte valueTail = ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref value, 1));
294
int relativeIndex = LastIndexOfValueType(ref Unsafe.
As
<char, short>(ref searchSpace), (short)valueHead, remainingSearchSpaceLength);
300
ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref searchSpace, relativeIndex + 1)),
346
ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref searchSpace, offset + charPos)),
347
ref Unsafe.
As
<char, byte>(ref value), (nuint)(uint)valueLength * 2))
396
ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref searchSpace, offset + charPos)),
397
ref Unsafe.
As
<char, byte>(ref value), (nuint)(uint)valueLength * 2))
446
ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref searchSpace, offset + charPos)),
447
ref Unsafe.
As
<char, byte>(ref value), (nuint)(uint)valueLength * 2))
485
if (Unsafe.ReadUnaligned<Vector<ushort>>(ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref first, (nint)i))) !=
486
Unsafe.ReadUnaligned<Vector<ushort>>(ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref second, (nint)i))))
497
if (Unsafe.ReadUnaligned<nuint>(ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref first, (nint)i))) !=
498
Unsafe.ReadUnaligned<nuint>(ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref second, (nint)i))))
509
if (Unsafe.ReadUnaligned<int>(ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref first, (nint)i))) ==
510
Unsafe.ReadUnaligned<int>(ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref second, (nint)i))))
899
ref ushort first = ref Unsafe.
As
<char, ushort>(ref Unsafe.Add(ref buf, offset));
900
ref ushort last = ref Unsafe.
As
<char, ushort>(ref Unsafe.Add(ref buf, lastOffset));
938
ref byte first = ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref buf, offset));
939
ref byte last = ref Unsafe.
As
<char, byte>(ref Unsafe.Add(ref buf, lastOffset));
977
ref ushort first = ref Unsafe.
As
<char, ushort>(ref Unsafe.Add(ref buf, offset));
978
ref ushort last = ref Unsafe.
As
<char, ushort>(ref Unsafe.Add(ref buf, lastOffset));
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.cs (4)
307
Reverse(ref Unsafe.
As
<T, byte>(ref elements), length);
312
Reverse(ref Unsafe.
As
<T, char>(ref elements), length);
317
Reverse(ref Unsafe.
As
<T, int>(ref elements), length);
322
Reverse(ref Unsafe.
As
<T, long>(ref elements), length);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Packed.cs (12)
34
IndexOf<SpanHelpers.DontNegate<short>, NopTransform>(ref Unsafe.
As
<char, short>(ref searchSpace), (short)value, length);
39
IndexOf<SpanHelpers.Negate<short>, NopTransform>(ref Unsafe.
As
<char, short>(ref searchSpace), (short)value, length);
44
IndexOfAny<SpanHelpers.DontNegate<short>, NopTransform>(ref Unsafe.
As
<char, short>(ref searchSpace), (short)value0, (short)value1, length);
49
IndexOfAny<SpanHelpers.Negate<short>, NopTransform>(ref Unsafe.
As
<char, short>(ref searchSpace), (short)value0, (short)value1, length);
54
IndexOfAny<SpanHelpers.DontNegate<short>>(ref Unsafe.
As
<char, short>(ref searchSpace), (short)value0, (short)value1, (short)value2, length);
59
IndexOfAny<SpanHelpers.Negate<short>>(ref Unsafe.
As
<char, short>(ref searchSpace), (short)value0, (short)value1, (short)value2, length);
67
return IndexOf<SpanHelpers.DontNegate<short>, Or20Transform>(ref Unsafe.
As
<char, short>(ref searchSpace), (short)value, length);
76
return IndexOf<SpanHelpers.Negate<short>, Or20Transform>(ref Unsafe.
As
<char, short>(ref searchSpace), (short)value, length);
86
return IndexOfAny<SpanHelpers.DontNegate<short>, Or20Transform>(ref Unsafe.
As
<char, short>(ref searchSpace), (short)value0, (short)value1, length);
96
return IndexOfAny<SpanHelpers.Negate<short>, Or20Transform>(ref Unsafe.
As
<char, short>(ref searchSpace), (short)value0, (short)value1, length);
102
IndexOfAnyInRange<SpanHelpers.DontNegate<short>>(ref Unsafe.
As
<char, short>(ref searchSpace), (short)lowInclusive, (short)rangeInclusive, length);
107
IndexOfAnyInRange<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)
108
ref byte refDataAsBytes = ref Unsafe.
As
<T, byte>(ref refData);
1466
return 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);
1632
NonPackedIndexOfValueType<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);
3871
ref char charSearchSpace = ref Unsafe.
As
<T, char>(ref searchSpace);
src\libraries\System.Private.CoreLib\src\System\String.Comparison.cs (2)
689
return Marvin.ComputeHash32(ref Unsafe.
As
<char, byte>(ref _firstChar), (uint)_stringLength * 2 /* in bytes, not chars */, (uint)seed, (uint)(seed >> 32));
710
return 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)
528
internal ref byte GetRawStringDataAsUInt8() => ref Unsafe.
As
<char, byte>(ref _firstChar);
529
internal ref ushort GetRawStringDataAsUInt16() => ref Unsafe.
As
<char, ushort>(ref _firstChar);
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
2075
ref 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);
471
int 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)
32
IsValidCore(ref Unsafe.
As
<char, ushort>(ref MemoryMarshal.GetReference(value)), value.Length);
62
Unsafe.ReadUnaligned<uint>(ref Unsafe.
As
<T, byte>(ref searchSpace)) |
63
Unsafe.ReadUnaligned<uint>(ref Unsafe.
As
<T, byte>(ref Unsafe.Add(ref searchSpace, length - sizeof(uint)))));
90
Unsafe.ReadUnaligned<ulong>(ref Unsafe.
As
<T, byte>(ref Unsafe.Add(ref searchSpace, i))) |
91
Unsafe.ReadUnaligned<ulong>(ref Unsafe.
As
<T, byte>(ref Unsafe.Add(ref searchSpace, i + elementsPerUlong)))))
102
Unsafe.ReadUnaligned<ulong>(ref Unsafe.
As
<T, byte>(ref Unsafe.Add(ref searchSpace, i))) |
103
Unsafe.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);
194
EqualsIgnoreCase<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)
2285
Unsafe.WriteUnaligned(ref Unsafe.
As
<char, byte>(ref outputBuffer), vecWide.ToScalar());
2291
Unsafe.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)));
203
return (nint)Exchange(ref Unsafe.
As
<nint, long>(ref location1), (long)value);
220
return (nuint)Exchange(ref Unsafe.
As
<nuint, long>(ref location1), (long)value);
244
object? result = Exchange(ref Unsafe.
As
<T, object?>(ref location1), value);
245
return Unsafe.
As
<object?, T>(ref result);
259
ref Unsafe.
As
<T, byte>(ref location1),
267
ref Unsafe.
As
<T, ushort>(ref location1),
275
ref Unsafe.
As
<T, int>(ref location1),
282
ref 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)));
451
return (nint)CompareExchange(ref Unsafe.
As
<nint, long>(ref location1), (long)value, (long)comparand);
469
return (nuint)CompareExchange(ref Unsafe.
As
<nuint, long>(ref location1), (long)value, (long)comparand);
494
object? result = CompareExchange(ref Unsafe.
As
<T, object?>(ref location1), value, comparand);
495
return Unsafe.
As
<object?, T>(ref result);
509
ref Unsafe.
As
<T, byte>(ref location1),
518
ref Unsafe.
As
<T, ushort>(ref location1),
527
ref Unsafe.
As
<T, int>(ref location1),
535
ref 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);
671
ref Unsafe.
As
<T, byte>(ref location1),
689
ref Unsafe.
As
<T, ushort>(ref location1),
704
ref Unsafe.
As
<T, int>(ref location1),
711
ref 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);
814
ref Unsafe.
As
<T, byte>(ref location1),
832
ref Unsafe.
As
<T, ushort>(ref location1),
847
ref Unsafe.
As
<T, int>(ref location1),
854
ref Unsafe.
As
<T, long>(ref location1),
src\libraries\System.Private.CoreLib\src\System\Threading\Volatile.cs (28)
22
Unsafe.
As
<bool, VolatileBoolean>(ref Unsafe.AsRef(in location)).Value;
27
Unsafe.
As
<bool, VolatileBoolean>(ref location).Value = value;
36
Unsafe.
As
<byte, VolatileByte>(ref Unsafe.AsRef(in location)).Value;
41
Unsafe.
As
<byte, VolatileByte>(ref location).Value = value;
49
long result = Read(ref Unsafe.
As
<double, long>(ref Unsafe.AsRef(in location)));
56
Write(ref Unsafe.
As
<double, long>(ref location), BitConverter.DoubleToInt64Bits(value));
65
Unsafe.
As
<short, VolatileInt16>(ref Unsafe.AsRef(in location)).Value;
70
Unsafe.
As
<short, VolatileInt16>(ref location).Value = value;
79
Unsafe.
As
<int, VolatileInt32>(ref Unsafe.AsRef(in location)).Value;
84
Unsafe.
As
<int, VolatileInt32>(ref location).Value = value;
92
(long)Unsafe.
As
<long, VolatileIntPtr>(ref Unsafe.AsRef(in location)).Value;
102
Unsafe.
As
<long, VolatileIntPtr>(ref location).Value = (nint)value;
115
Unsafe.
As
<nint, VolatileIntPtr>(ref Unsafe.AsRef(in location)).Value;
120
Unsafe.
As
<nint, VolatileIntPtr>(ref location).Value = value;
130
Unsafe.
As
<sbyte, VolatileSByte>(ref Unsafe.AsRef(in location)).Value;
136
Unsafe.
As
<sbyte, VolatileSByte>(ref location).Value = value;
145
Unsafe.
As
<float, VolatileSingle>(ref Unsafe.AsRef(in location)).Value;
150
Unsafe.
As
<float, VolatileSingle>(ref location).Value = value;
160
Unsafe.
As
<ushort, VolatileUInt16>(ref Unsafe.AsRef(in location)).Value;
166
Unsafe.
As
<ushort, VolatileUInt16>(ref location).Value = value;
176
Unsafe.
As
<uint, VolatileUInt32>(ref Unsafe.AsRef(in location)).Value;
182
Unsafe.
As
<uint, VolatileUInt32>(ref location).Value = value;
190
(ulong)Read(ref Unsafe.
As
<ulong, long>(ref Unsafe.AsRef(in location)));
196
Write(ref Unsafe.
As
<ulong, long>(ref location), (long)value);
206
Unsafe.
As
<nuint, VolatileUIntPtr>(ref Unsafe.AsRef(in location)).Value;
212
Unsafe.
As
<nuint, VolatileUIntPtr>(ref location).Value = value;
222
Unsafe.As<T>(Unsafe.
As
<T, VolatileObject>(ref Unsafe.AsRef(in location)).Value)!;
227
Unsafe.
As
<T, VolatileObject>(ref location).Value = value;
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (9)
242
return nuint_t.TryParse(s, out Unsafe.
As
<nuint, nuint_t>(ref result));
253
return nuint_t.TryParse(s, provider, out Unsafe.
As
<nuint, nuint_t>(ref result));
259
return nuint_t.TryParse(s, style, provider, out Unsafe.
As
<nuint, nuint_t>(ref result));
265
return nuint_t.TryParse(s, out Unsafe.
As
<nuint, nuint_t>(ref result));
275
return nuint_t.TryParse(utf8Text, out Unsafe.
As
<nuint, nuint_t>(ref result));
282
return nuint_t.TryParse(s, provider, out Unsafe.
As
<nuint, nuint_t>(ref result));
288
return nuint_t.TryParse(s, style, provider, out Unsafe.
As
<nuint, nuint_t>(ref result));
1230
return nuint_t.TryParse(utf8Text, style, provider, out Unsafe.
As
<nuint, nuint_t>(ref result));
1240
return nuint_t.TryParse(utf8Text, provider, out Unsafe.
As
<nuint, nuint_t>(ref result));
src\System\Array.CoreCLR.cs (4)
173
ref object elementRef = ref Unsafe.
As
<byte, object>(ref arrayDataRef);
211
SpanHelpers.ClearWithReferences(ref Unsafe.
As
<byte, nint>(ref offsetDataRef), elementSize / (nuint)sizeof(IntPtr));
221
Unsafe.Add(ref Unsafe.
As
<byte, object?>(ref arrayDataRef), (nuint)flattenedIndex) = null;
230
Unsafe.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)
886
ref GCConfigurationContext context = ref Unsafe.
As
<byte, GCConfigurationContext>(ref *(byte*)configurationContext);
src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (5)
126
return Unsafe.
As
<byte, object>(ref Unsafe.Add(ref data, DataOffset + contIndex * PointerSize));
134
Unsafe.
As
<byte, Exception>(ref Unsafe.Add(ref data, DataOffset + contIndex * PointerSize)) = ex;
259
Unsafe.
As
<byte, object?>(ref Unsafe.Add(ref RuntimeHelpers.GetRawData(newContinuation), keepAliveOffset)) = loaderAllocator;
272
Unsafe.
As
<byte, object?>(ref Unsafe.Add(ref RuntimeHelpers.GetRawData(newContinuation), keepAliveOffset)) = GCHandle.FromIntPtr(loaderAllocatorHandle).Target;
615
private ref byte GetResultStorage() => ref Unsafe.
As
<T?, byte>(ref m_result);
src\System\Runtime\CompilerServices\CastHelpers.cs (2)
639
SpanHelpers.ClearWithReferences(ref Unsafe.
As
<byte, IntPtr>(ref destPtr), typeMT->GetNumInstanceFieldBytesIfContainsGCPointers() / (nuint)sizeof(IntPtr));
650
Unsafe.
As
<byte, bool>(ref destPtr) = true;
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (9)
69
new ReadOnlySpan<ushort>(ref Unsafe.
As
<byte, ushort>(ref src), array.Length),
70
new Span<ushort>(ref Unsafe.
As
<byte, ushort>(ref dst), array.Length));
74
new ReadOnlySpan<uint>(ref Unsafe.
As
<byte, uint>(ref src), array.Length),
75
new Span<uint>(ref Unsafe.
As
<byte, uint>(ref dst), array.Length));
79
new ReadOnlySpan<ulong>(ref Unsafe.
As
<byte, ulong>(ref src), array.Length),
80
new Span<ulong>(ref Unsafe.
As
<byte, ulong>(ref dst), array.Length));
423
return ref Unsafe.
As
<byte, int>(ref Unsafe.As<RawArrayData>(array).Data);
1154
return ref Unsafe.Subtract(ref Unsafe.
As
<MethodTableAuxiliaryData, DynamicStaticsInfo>(ref this), 1);
1162
return ref Unsafe.Subtract(ref Unsafe.
As
<MethodTableAuxiliaryData, ThreadStaticsInfo>(ref this), 1);
src\System\Runtime\CompilerServices\StaticsHelpers.cs (2)
108
return Unsafe.
As
<IntPtr, object[]>(ref _nonCollectibleTlsArrayData_private);
289
object boxedObject = Unsafe.
As
<byte, object>(ref Unsafe.Add(ref pArgs->staticBaseHelper(pArgs->arg0), pArgs->offset));
src\System\RuntimeType.BoxCache.cs (1)
72
return Unsafe.
As
<byte, object>(ref data);
src\System\TypedReference.CoreCLR.cs (1)
53
result = Unsafe.
As
<byte, object>(ref value._value);
src\System\ValueType.cs (3)
126
hashCode.Add(Unsafe.
As
<byte, object>(ref Unsafe.AddByteOffset(ref rawData, fieldOffset)).GetHashCode());
130
hashCode.Add(Unsafe.
As
<byte, double>(ref Unsafe.AddByteOffset(ref rawData, fieldOffset)).GetHashCode());
134
hashCode.Add(Unsafe.
As
<byte, float>(ref Unsafe.AddByteOffset(ref rawData, fieldOffset)).GetHashCode());
System.Private.Windows.Core (115)
System\IO\BinaryReaderExtensions.cs (1)
43
return Unsafe.
As
<long, DateTime>(ref data);
System\IO\BinaryWriterExtensions.cs (1)
23
long dateData = Unsafe.
As
<DateTime, long>(ref value);
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
91
Unsafe.
As
<DateTime, ulong>(ref value)).Write(writer);
System\Private\Windows\Ole\Composition.NativeToRuntimeAdapter.cs (7)
30
fixed (Com.FORMATETC* nativeFormat = &Unsafe.
As
<FORMATETC, Com.FORMATETC>(ref pFormatetc))
68
HRESULT result = nativeDataObject.Value->GetCanonicalFormatEtc(Unsafe.
As
<FORMATETC, Com.FORMATETC>(ref formatIn), out Com.FORMATETC nativeFormat);
69
formatOut = Unsafe.
As
<Com.FORMATETC, FORMATETC>(ref nativeFormat);
75
Com.FORMATETC nativeFormat = Unsafe.
As
<FORMATETC, Com.FORMATETC>(ref format);
85
Com.FORMATETC nativeFormat = Unsafe.
As
<FORMATETC, Com.FORMATETC>(ref format);
96
return nativeDataObject.Value->QueryGetData(Unsafe.
As
<FORMATETC, Com.FORMATETC>(ref format));
102
Com.FORMATETC nativeFormat = Unsafe.
As
<FORMATETC, Com.FORMATETC>(ref formatIn);
System\Private\Windows\Ole\FormatEnumerator.cs (1)
116
rgelt[i] = Unsafe.
As
<ComTypes.FORMATETC, FORMATETC>(ref elt[i]);
System\SpanReader.cs (2)
146
value = Unsafe.ReadUnaligned<TValue>(ref Unsafe.
As
<T, byte>(ref MemoryMarshal.GetReference(_unread)));
180
value = MemoryMarshal.CreateReadOnlySpan(ref Unsafe.
As
<T, TValue>(ref MemoryMarshal.GetReference(_unread)), count);
System\Value.cs (59)
604
return new(Unsafe.
As
<T, bool>(ref Unsafe.AsRef(in value)));
606
return new(Unsafe.
As
<T, byte>(ref Unsafe.AsRef(in value)));
608
return new(Unsafe.
As
<T, sbyte>(ref Unsafe.AsRef(in value)));
610
return new(Unsafe.
As
<T, char>(ref Unsafe.AsRef(in value)));
612
return new(Unsafe.
As
<T, short>(ref Unsafe.AsRef(in value)));
614
return new(Unsafe.
As
<T, int>(ref Unsafe.AsRef(in value)));
616
return new(Unsafe.
As
<T, long>(ref Unsafe.AsRef(in value)));
618
return new(Unsafe.
As
<T, ushort>(ref Unsafe.AsRef(in value)));
620
return new(Unsafe.
As
<T, uint>(ref Unsafe.AsRef(in value)));
622
return new(Unsafe.
As
<T, ulong>(ref Unsafe.AsRef(in value)));
624
return new(Unsafe.
As
<T, float>(ref Unsafe.AsRef(in value)));
626
return new(Unsafe.
As
<T, double>(ref Unsafe.AsRef(in value)));
628
return new(Unsafe.
As
<T, DateTime>(ref Unsafe.AsRef(in value)));
630
return new(Unsafe.
As
<T, DateTimeOffset>(ref Unsafe.AsRef(in value)));
632
return new(Unsafe.
As
<T, Color>(ref Unsafe.AsRef(in value)));
635
return new(Unsafe.
As
<T, bool?>(ref Unsafe.AsRef(in value)));
637
return new(Unsafe.
As
<T, byte?>(ref Unsafe.AsRef(in value)));
639
return new(Unsafe.
As
<T, sbyte?>(ref Unsafe.AsRef(in value)));
641
return new(Unsafe.
As
<T, char?>(ref Unsafe.AsRef(in value)));
643
return new(Unsafe.
As
<T, short?>(ref Unsafe.AsRef(in value)));
645
return new(Unsafe.
As
<T, int?>(ref Unsafe.AsRef(in value)));
647
return new(Unsafe.
As
<T, long?>(ref Unsafe.AsRef(in value)));
649
return new(Unsafe.
As
<T, ushort?>(ref Unsafe.AsRef(in value)));
651
return new(Unsafe.
As
<T, uint?>(ref Unsafe.AsRef(in value)));
653
return new(Unsafe.
As
<T, ulong?>(ref Unsafe.AsRef(in value)));
655
return new(Unsafe.
As
<T, float?>(ref Unsafe.AsRef(in value)));
657
return new(Unsafe.
As
<T, double?>(ref Unsafe.AsRef(in value)));
659
return new(Unsafe.
As
<T, DateTime?>(ref Unsafe.AsRef(in value)));
661
return new(Unsafe.
As
<T, DateTimeOffset?>(ref Unsafe.AsRef(in value)));
664
return new(Unsafe.
As
<T, ArraySegment<byte>>(ref Unsafe.AsRef(in value)));
666
return new(Unsafe.
As
<T, ArraySegment<char>>(ref Unsafe.AsRef(in value)));
671
return new Value(StraightCastFlag<T>.Instance, Unsafe.
As
<T, ulong>(ref value));
716
value = Unsafe.
As
<Union, T>(ref Unsafe.AsRef(in _union));
722
value = Unsafe.
As
<Color, T>(ref Unsafe.AsRef(in color));
727
value = Unsafe.
As
<DateTime, T>(ref Unsafe.AsRef(in _union.DateTime));
733
value = Unsafe.
As
<DateTimeOffset, T>(ref Unsafe.AsRef(in dto));
739
value = Unsafe.
As
<DateTimeOffset, T>(ref Unsafe.AsRef(in dto));
784
value = Unsafe.
As
<ArraySegment<byte>, T>(ref segment);
800
value = Unsafe.
As
<ArraySegment<char>, T>(ref segment);
811
value = Unsafe.
As
<int?, T>(ref Unsafe.AsRef(in @int));
817
value = Unsafe.
As
<long?, T>(ref Unsafe.AsRef(in @long));
823
value = Unsafe.
As
<bool?, T>(ref Unsafe.AsRef(in @bool));
829
value = Unsafe.
As
<float?, T>(ref Unsafe.AsRef(in single));
835
value = Unsafe.
As
<double?, T>(ref Unsafe.AsRef(in @double));
841
value = Unsafe.
As
<uint?, T>(ref Unsafe.AsRef(in @uint));
847
value = Unsafe.
As
<ulong?, T>(ref Unsafe.AsRef(in @ulong));
853
value = Unsafe.
As
<char?, T>(ref Unsafe.AsRef(in @char));
859
value = Unsafe.
As
<short?, T>(ref Unsafe.AsRef(in @short));
865
value = Unsafe.
As
<ushort?, T>(ref Unsafe.AsRef(in @ushort));
871
value = Unsafe.
As
<byte?, T>(ref Unsafe.AsRef(in @byte));
877
value = Unsafe.
As
<sbyte?, T>(ref Unsafe.AsRef(in @sbyte));
883
value = Unsafe.
As
<Color?, T>(ref Unsafe.AsRef(in color));
889
value = Unsafe.
As
<DateTime?, T>(ref Unsafe.AsRef(in dateTime));
895
value = Unsafe.
As
<DateTimeOffset?, T>(ref Unsafe.AsRef(in dto));
901
value = Unsafe.
As
<DateTimeOffset?, T>(ref Unsafe.AsRef(in dto));
920
value = Unsafe.
As
<NullableTemplate<byte>, T>(ref Unsafe.AsRef(in byteTemplate));
925
value = Unsafe.
As
<NullableTemplate<ushort>, T>(ref Unsafe.AsRef(in ushortTemplate));
930
value = Unsafe.
As
<NullableTemplate<uint>, T>(ref Unsafe.AsRef(in uintTemplate));
935
value = Unsafe.
As
<NullableTemplate<ulong>, T>(ref Unsafe.AsRef(in ulongTemplate));
System\Value.PackedColor.cs (1)
35
CastColor castColor = Unsafe.
As
<Color, CastColor>(ref Unsafe.AsRef(in color));
System\Value.StraightCastFlag.cs (1)
16
public 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)
57
return new(handle.Wrapper, Unsafe.
As
<THandle, nint>(ref local));
68
return new(handle.Wrapper, Unsafe.
As
<nint, THandle>(ref local));
Windows\Win32\Graphics\Gdi\ARGB.cs (1)
58
ref Unsafe.
As
<uint, ARGB>(ref MemoryMarshal.GetReference(argbColors)),
Windows\Win32\Graphics\Gdi\ArgbBuffer.cs (1)
38
ref Unsafe.
As
<ARGB, uint>(ref _bufferScope.GetPinnableReference());
Windows\Win32\Graphics\Gdi\HDC.cs (1)
24
return Unsafe.
As
<XFORM, Matrix3x2>(ref matrix);
Windows\Win32\System\Com\IComCallableWrapper.cs (1)
25
return ref Unsafe.
As
<byte, Guid>(ref MemoryMarshal.GetReference(data));
Windows\Win32\System\Com\IID.cs (1)
18
return ref Unsafe.
As
<byte, Guid>(ref MemoryMarshal.GetReference(data));
System.Private.Windows.Core.TestUtilities (3)
XUnit\InvalidEnumDataAttribute.cs (3)
32
currentValue = Unsafe.
As
<ulong, TEnum>(ref currentFlagValue);
52
currentValue = Unsafe.
As
<ulong, TEnum>(ref minValue);
62
currentValue = Unsafe.
As
<ulong, TEnum>(ref maxValue);
System.Private.Windows.GdiPlus (4)
Windows\Win32\Graphics\GdiPlus\Rect.cs (2)
11
public static implicit operator Rectangle(Rect rect) => Unsafe.
As
<Rect, Rectangle>(ref rect);
12
public static implicit operator Rect(Rectangle rectangle) => Unsafe.
As
<Rectangle, Rect>(ref rectangle);
Windows\Win32\Graphics\GdiPlus\RectF.cs (2)
11
public static implicit operator RectangleF(RectF rect) => Unsafe.
As
<RectF, RectangleF>(ref rect);
12
public static implicit operator RectF(RectangleF rectangle) => Unsafe.
As
<RectangleF, RectF>(ref rectangle);
System.ServiceModel.NetTcp (2)
System\ServiceModel\Channels\TcpChannelFactory.cs (2)
74
return Unsafe.
As
<TimeSpan, T>(ref temp);
91
return Unsafe.
As
<int, T>(ref temp);
System.ServiceModel.UnixDomainSocket (2)
System\ServiceModel\Channels\UnixDomainSocketChannelFactory.cs (2)
87
return Unsafe.
As
<TimeSpan, T>(ref temp);
104
return Unsafe.
As
<int, T>(ref temp);
System.Text.RegularExpressions.Generator (1)
Stubs.cs (1)
93
uint 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)
362
return Unsafe.BitCast<int, TInt>(Volatile.Read(ref Unsafe.
As
<TInt, int>(ref _lowestBreakIteration)));
366
return 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)
425
UpdateFont(ref Unsafe.
As
<LOGFONTW, LOGFONT>(ref logFont));
System\Windows\Forms\PropertyStore.cs (2)
203
AddOrUpdate(key, Unsafe.
As
<T, Padding>(ref value));
207
AddOrUpdate(key, Unsafe.
As
<T, Rectangle>(ref value));
System.Windows.Forms.Primitives (179)
Microsoft\Office\IMsoComponent.cs (1)
118
return ref Unsafe.
As
<byte, Guid>(ref MemoryMarshal.GetReference(data));
Microsoft\Office\IMsoComponentManager.cs (1)
30
return ref Unsafe.
As
<byte, Guid>(ref MemoryMarshal.GetReference(data));
Microsoft\VisualStudio\Shell\ICategorizeProperties.cs (1)
28
return ref Unsafe.
As
<byte, Guid>(ref MemoryMarshal.GetReference(data));
Microsoft\VisualStudio\Shell\IProvidePropertyBuilder.cs (1)
28
return ref Unsafe.
As
<byte, Guid>(ref MemoryMarshal.GetReference(data));
Microsoft\VisualStudio\Shell\IVSMDPerPropertyBrowsing.cs (1)
29
return ref Unsafe.
As
<byte, Guid>(ref MemoryMarshal.GetReference(data));
Microsoft\VisualStudio\Shell\IVsPerPropertyBrowsing.cs (1)
28
return ref Unsafe.
As
<byte, Guid>(ref MemoryMarshal.GetReference(data));
System\Drawing\FontExtensions.cs (2)
14
return Unsafe.
As
<LOGFONT, LOGFONTW>(ref logFont);
20
return Unsafe.
As
<LOGFONT, LOGFONTW>(ref logFont);
System\EnumExtensions.cs (8)
26
Unsafe.
As
<T, byte>(ref value) |= *(byte*)&flags;
30
Unsafe.
As
<T, byte>(ref value) &= (byte)~*(byte*)&flags;
37
Unsafe.
As
<T, ushort>(ref value) |= *(ushort*)&flags;
41
Unsafe.
As
<T, ushort>(ref value) &= (ushort)~*(ushort*)&flags;
48
Unsafe.
As
<T, uint>(ref value) |= *(uint*)&flags;
52
Unsafe.
As
<T, uint>(ref value) &= ~*(uint*)&flags;
59
Unsafe.
As
<T, ulong>(ref value) |= *(ulong*)&flags;
63
Unsafe.
As
<T, ulong>(ref value) &= ~*(ulong*)&flags;
System\Windows\Forms\IExtender.cs (1)
99
return 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)
63
return ref Unsafe.
As
<byte, Guid>(ref MemoryMarshal.GetReference(data));
System.Windows.Forms.Tests (1)
System\Windows\Forms\DragDropHelperTests.cs (1)
107
Assert.Equal(expectedIsInDragLoopFormat, DragDropHelper.IsInDragLoopFormat(Unsafe.
As
<FORMATETC, Com.FORMATETC>(ref formatEtc)));
Test.Utilities (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150
return Unsafe.
As
<TFromEnum, TToEnum>(ref value);
Text.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
150
return Unsafe.
As
<TFromEnum, TToEnum>(ref value);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ModifierExtensions.cs (1)
16
return Unsafe.
As
<Modifiers, DeclarationModifiers>(ref modifiers);