Nullable: System.Runtime.InteropServices.CustomMarshalers/WindowsRuntime (#23930)
[platform/upstream/coreclr.git] / src / System.Private.CoreLib / shared / System / Runtime / InteropServices / ICustomMarshaler.cs
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4
5 #nullable enable
6 namespace System.Runtime.InteropServices
7 {
8     // This the base interface that must be implemented by all custom marshalers.
9     public interface ICustomMarshaler
10     {
11         object MarshalNativeToManaged(IntPtr pNativeData);
12
13         IntPtr MarshalManagedToNative(object ManagedObj);
14
15         void CleanUpNativeData(IntPtr pNativeData);
16
17         void CleanUpManagedData(object ManagedObj);
18
19         int GetNativeDataSize();
20     }
21 }