Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obsolete Marshaler<T>.RefAbiType on .NET 6+ #1520

Merged
merged 2 commits into from
Mar 11, 2024
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
8 changes: 8 additions & 0 deletions src/WinRT.Runtime/Marshalers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1853,7 +1853,9 @@ static Marshaler()
CopyManagedArray = MarshalGenericHelper<T>.CopyManagedArray;
DisposeMarshalerArray = MarshalInterface<T>.DisposeMarshalerArray;
DisposeAbiArray = MarshalInterface<T>.DisposeAbiArray;
#if !NET
RefAbiType = AbiType.MakeByRefType();
#endif

return;
}
Expand Down Expand Up @@ -2011,10 +2013,16 @@ static Marshaler()
DisposeMarshalerArray = MarshalGeneric<T>.DisposeMarshalerArray;
DisposeAbiArray = MarshalGeneric<T>.DisposeAbiArray;
}

#if !NET
RefAbiType = AbiType.MakeByRefType();
#endif
}

public static readonly Type AbiType;
#if NET
[Obsolete(AttributeMessages.GenericDeprecatedMessage)]
#endif
public static readonly Type RefAbiType;
public static readonly Func<T, object> CreateMarshaler;
internal static readonly Func<T, object> CreateMarshaler2;
Expand Down
3 changes: 2 additions & 1 deletion src/WinRT.Runtime/MatchingRefApiCompatBaseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,5 @@ CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribut
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'ABI.WinRT.Interop.IActivationFactory.As<A>()' in the implementation but not the reference.
CannotRemoveAttribute : Attribute 'System.ComponentModel.EditorBrowsableAttribute' exists on 'WinRT.IObjectReference.AsType<T>()' in the implementation but not the reference.
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'WinRT.IObjectReference.AsType<T>()' in the implementation but not the reference.
Total Issues: 210
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'System.Type WinRT.Marshaler<T>.RefAbiType' in the implementation but not the reference.
Total Issues: 211