Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@
Link="Common\System\IO\PathInternal.CaseSensitivity.cs" />
<Compile Include="$(CommonPath)System\Memory\FixedBufferExtensions.cs"
Link="Common\System\Memory\FixedBufferExtensions.cs" />
<Compile Include="$(CommonPath)System\Runtime\InteropServices\SuppressGCTransitionAttribute.internal.cs" />
<Compile Include="$(CoreLibSharedDir)System\Runtime\InteropServices\SuppressGCTransitionAttribute.cs"
Link="System\Runtime\InteropServices\SuppressGCTransitionAttribute.cs" />
<Compile Include="Microsoft\IO\StringExtensions.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@
<Compile Include="Microsoft\Win32\UserPreferenceChangingEventHandler.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != '$(NetCoreAppCurrent)'">
<Compile Include="$(CommonPath)System\Runtime\InteropServices\SuppressGCTransitionAttribute.internal.cs"
Link="Common\System\Runtime\InteropServices\SuppressGCTransitionAttribute.internal.cs" />
<Compile Include="$(CoreLibSharedDir)System\Runtime\InteropServices\SuppressGCTransitionAttribute.cs"
Link="System\Runtime\InteropServices\SuppressGCTransitionAttribute.cs" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<Reference Include="mscorlib" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
<ItemGroup Condition="!$(TargetFramework.StartsWith('$(NetCoreAppCurrent)'))">
<Compile Include="$(CommonPath)System\Runtime\InteropServices\SuppressGCTransitionAttribute.internal.cs" />
<Compile Include="$(CoreLibSharedDir)System\Runtime\InteropServices\SuppressGCTransitionAttribute.cs"
Link="System\Runtime\InteropServices\SuppressGCTransitionAttribute.cs" />
</ItemGroup>
<!-- Source includes -->
<ItemGroup Condition="'$(TargetsWindows)' == 'true' and !$(TargetFramework.StartsWith('net4'))">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ namespace System.Runtime.InteropServices
/// In general, usage of this attribute is not recommended if debugging the P/Invoke is important, for example
/// stepping through the native code or diagnosing an exception thrown from the native code.
///
/// The runtime may load the native library for method marked with this attribute in advance before the method is called for the first time.
/// Usage of this attribute is not recommended for platform neutral libraries with conditional platform specific code.
///
/// The P/Invoke method that this attribute is applied to must have all of the following properties:
/// * Native function always executes for a trivial amount of time (less than 1 microsecond).
/// * Native function does not perform a blocking syscall (e.g. any type of I/O).
Expand All @@ -55,7 +58,12 @@ namespace System.Runtime.InteropServices
/// * Data corruption.
/// </remarks>
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public sealed class SuppressGCTransitionAttribute : Attribute
#if SYSTEM_PRIVATE_CORELIB
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how other similar attributes are done.

public
#else
internal
#endif
sealed class SuppressGCTransitionAttribute : Attribute
{
public SuppressGCTransitionAttribute()
{
Expand Down