ImageSourceServiceCollectionExtensions.AddService 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
AddService<TImageSource,TImageSourceService>(IImageSourceServiceCollection) |
AddSingleton을 통해 기본 서비스 컨테이너에 이미지 서비스를 등록합니다. |
AddService<TImageSource>(IImageSourceServiceCollection, Func<IServiceProvider,IImageSourceService<TImageSource>>) |
AddSingleton을 통해 기본 서비스 컨테이너에 이미지 서비스를 등록합니다. |
AddService<TImageSource,TImageSourceService>(IImageSourceServiceCollection)
AddSingleton을 통해 기본 서비스 컨테이너에 이미지 서비스를 등록합니다.
public:
generic <typename TImageSource, typename TImageSourceService>
where TImageSource : Microsoft::Maui::IImageSource where TImageSourceService : class, Microsoft::Maui::IImageSourceService<TImageSource>[System::Runtime::CompilerServices::Extension]
static Microsoft::Maui::Hosting::IImageSourceServiceCollection ^ AddService(Microsoft::Maui::Hosting::IImageSourceServiceCollection ^ services);
public static Microsoft.Maui.Hosting.IImageSourceServiceCollection AddService<TImageSource,TImageSourceService> (this Microsoft.Maui.Hosting.IImageSourceServiceCollection services) where TImageSource : Microsoft.Maui.IImageSource where TImageSourceService : class, Microsoft.Maui.IImageSourceService<TImageSource>;
static member AddService : Microsoft.Maui.Hosting.IImageSourceServiceCollection -> Microsoft.Maui.Hosting.IImageSourceServiceCollection (requires 'ImageSource :> Microsoft.Maui.IImageSource and 'ImageSourceService : null and 'ImageSourceService :> Microsoft.Maui.IImageSourceService<'ImageSource>)
<Extension()>
Public Function AddService(Of TImageSource As IImageSource, TImageSourceService As IImageSource) (services As IImageSourceServiceCollection) As IImageSourceServiceCollection
형식 매개 변수
- TImageSource
등록할 이미지 유형
- TImageSourceService
등록할 서비스 유형
매개 변수
- services
- IImageSourceServiceCollection
서비스 컬렉션
반환
서비스 컬렉션
적용 대상
AddService<TImageSource>(IImageSourceServiceCollection, Func<IServiceProvider,IImageSourceService<TImageSource>>)
AddSingleton을 통해 기본 서비스 컨테이너에 이미지 서비스를 등록합니다.
public:
generic <typename TImageSource>
where TImageSource : Microsoft::Maui::IImageSource[System::Runtime::CompilerServices::Extension]
static Microsoft::Maui::Hosting::IImageSourceServiceCollection ^ AddService(Microsoft::Maui::Hosting::IImageSourceServiceCollection ^ services, Func<IServiceProvider ^, Microsoft::Maui::IImageSourceService<TImageSource> ^> ^ implementationFactory);
public static Microsoft.Maui.Hosting.IImageSourceServiceCollection AddService<TImageSource> (this Microsoft.Maui.Hosting.IImageSourceServiceCollection services, Func<IServiceProvider,Microsoft.Maui.IImageSourceService<TImageSource>> implementationFactory) where TImageSource : Microsoft.Maui.IImageSource;
static member AddService : Microsoft.Maui.Hosting.IImageSourceServiceCollection * Func<IServiceProvider, Microsoft.Maui.IImageSourceService<'ImageSource>> -> Microsoft.Maui.Hosting.IImageSourceServiceCollection (requires 'ImageSource :> Microsoft.Maui.IImageSource)
<Extension()>
Public Function AddService(Of TImageSource As IImageSource) (services As IImageSourceServiceCollection, implementationFactory As Func(Of IServiceProvider, IImageSourceService(Of TImageSource))) As IImageSourceServiceCollection
형식 매개 변수
- TImageSource
등록할 이미지 유형
매개 변수
- services
- IImageSourceServiceCollection
서비스 컬렉션
- implementationFactory
- Func<IServiceProvider,IImageSourceService<TImageSource>>
서비스를 만드는 팩터리 메서드
반환
서비스 컬렉션
적용 대상
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET MAUI