-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[NET10] Marked INativeBindingService as Obsolete #29918
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
Conversation
Hey there @@kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR marks the INativeBindingService
interface as obsolete and suppresses the resulting compiler warnings at its call sites in ApplyPropertiesVisitor
.
- Added
[Obsolete]
attribute toINativeBindingService
in Core. - Introduced
#pragma warning disable/restore CS0618
around two usages inApplyPropertiesVisitor
. - Added
using System;
for theObsolete
attribute.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/Controls/src/Core/INativeBindingService.cs | Mark INativeBindingService as obsolete and import System . |
src/Controls/src/Xaml/ApplyPropertiesVisitor.cs | Suppress CS0618 warnings around DependencyService.Get<INativeBindingService>() . |
Comments suppressed due to low confidence (1)
src/Controls/src/Core/INativeBindingService.cs:8
- Please update the public XML documentation in
/docs/
to mention thatINativeBindingService
is now obsolete and will be removed in a future release, so consumers see this deprecation in the official docs.
[Obsolete("INativeBindingService is obsolete and will be removed in a future release.")]
#pragma warning disable CS0618 // Type or member is obsolete | ||
var nativeBindingService = DependencyService.Get<INativeBindingService>(); | ||
#pragma warning restore CS0618 // Type or member is obsolete | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] This pragma silences warnings for the now-obsolete INativeBindingService
. Consider refactoring to the new binding API or removing these calls before the interface is removed in a future release.
#pragma warning disable CS0618 // Type or member is obsolete | |
var nativeBindingService = DependencyService.Get<INativeBindingService>(); | |
#pragma warning restore CS0618 // Type or member is obsolete |
Copilot uses AI. Check for mistakes.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
@StephaneDelcroix Thoughts? |
that capability was lost during the transition from XF to maui, and we didn't get much complain. I'm sure we'll reinvent it later, but let's obsolete and eventually remove |
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issues Fixed
Fixes #21861