xamarin-docs
xamarin-docs copied to clipboard
Missing namespace in registration by attribute sample
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.
- ID: e66af026-e933-b091-ef25-8f7bd1399142
- Version Independent ID: e12ebe0d-55ed-9a21-65d3-382efe5bc74e
- Content: Xamarin.Forms DependencyService Registration and Resolution - Xamarin
- Content Source: docs/xamarin-forms/app-fundamentals/dependency-service/registration-and-resolution.md
- Product: xamarin
- Technology: xamarin-forms
- GitHub Login: @davidbritch
- Microsoft Alias: dabritch