xamarin-docs icon indicating copy to clipboard operation
xamarin-docs copied to clipboard

Missing namespace in registration by attribute sample

Open bdrajer opened this issue 2 years ago • 0 comments

Shouldn't the Dependency attribute here state the full namespace of the class? It doesn't compile otherwise in my case...

Instead of this:

[assembly: Dependency(typeof(DeviceOrientationService))] namespace DependencyServiceDemos.iOS { public class DeviceOrientationService : IDeviceOrientationService {

Something like this:

[assembly: Dependency(typeof(DependencyServiceDemos.iOS.DeviceOrientationService))]


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

bdrajer avatar Aug 07 '21 17:08 bdrajer