Nullable: System.Runtime.InteropServices.CustomMarshalers/WindowsRuntime (#23930)
[platform/upstream/coreclr.git] / src / System.Private.CoreLib / src / System / Runtime / InteropServices / WindowsRuntime / IReference.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.WindowsRuntime
7 {
8     [ComImport]
9     [Guid("61c17706-2d65-11e0-9ae8-d48564015472")]
10     [WindowsRuntimeImport]
11     // Note that ideally, T should be constrained to be a value type.  However, Windows uses IReference<HSTRING>
12     // and the projection may not be exactly pretty.
13     internal interface IReference<T> : IPropertyValue
14     {
15         T Value { get; }
16     }
17
18     [ComImport]
19     [Guid("61c17707-2d65-11e0-9ae8-d48564015472")]
20     [WindowsRuntimeImport]
21     // T can be any WinRT-compatible type, including reference types.
22     internal interface IReferenceArray<T> : IPropertyValue
23     {
24         T[] Value { get; }
25     }
26 }