LibraryImportAttribute
Attribute used to indicate a source generator should create a function for marshalling
arguments instead of relying on the runtime to generate an equivalent marshalling function at run-time.
using System.Runtime.CompilerServices;
namespace System.Runtime.InteropServices
{
[System.Runtime.CompilerServices.NullableContext(2)]
[System.Runtime.CompilerServices.Nullable(0)]
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
internal sealed class LibraryImportAttribute : Attribute
{
[System.Runtime.CompilerServices.Nullable(1)]
public string LibraryName {
[System.Runtime.CompilerServices.NullableContext(1)]
get;
}
public string EntryPoint { get; set; }
public System.Runtime.InteropServices.StringMarshalling StringMarshalling { get; set; }
public Type StringMarshallingCustomType { get; set; }
public bool SetLastError { get; set; }
[System.Runtime.CompilerServices.NullableContext(1)]
public LibraryImportAttribute(string libraryName)
{
LibraryName = libraryName;
}
}
}