ViewMappingBuilder.Map() method¶
Defined in
Type: ViewMappingBuilder
Namespace: ReactiveUI.Binding
Assembly: ReactiveUI.Binding.dll
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481
Overloads¶
- 1.
public ViewMappingBuilder Map<TViewModel, TView>() where TViewModel : class where TView : IViewFor, new() - 2.
public ViewMappingBuilder Map<TViewModel, TView>(string? contract) where TViewModel : class where TView : IViewFor, new() - 3.
public ViewMappingBuilder Map<TViewModel>(Func<IViewFor> factory) where TViewModel : class - 4.
public ViewMappingBuilder Map<TViewModel>(Func<IViewFor> factory, string? contract) where TViewModel : class
1. Overload¶
public ViewMappingBuilder Map<TViewModel, TView>() where TViewModel : class where TView : IViewFor, new()
Summary: Maps a view model type to a view type with direct construction.
Type parameters
| Name | Description |
|---|---|
TViewModel | The view model type. |
TView | The view type. Must have a parameterless constructor. |
Returns: ViewMappingBuilder -- This builder for chaining.
2. Overload¶
public ViewMappingBuilder Map<TViewModel, TView>(string? contract) where TViewModel : class where TView : IViewFor, new()
Summary: Maps a view model type to a view type with direct construction.
Type parameters
| Name | Description |
|---|---|
TViewModel | The view model type. |
TView | The view type. Must have a parameterless constructor. |
Parameters
| Name | Type | Description |
|---|---|---|
contract | string? | A contract string for named registrations. |
Returns: ViewMappingBuilder -- This builder for chaining.
3. Overload¶
public ViewMappingBuilder Map<TViewModel>(Func<IViewFor> factory) where TViewModel : class
Summary: Maps a view model type to a view using a custom factory function.
Type parameters
| Name | Description |
|---|---|
TViewModel | The view model type. |
Parameters
| Name | Type | Description |
|---|---|---|
factory | Func | A factory function that creates the view. |
Returns: ViewMappingBuilder -- This builder for chaining.
4. Overload¶
public ViewMappingBuilder Map<TViewModel>(Func<IViewFor> factory, string? contract) where TViewModel : class
Summary: Maps a view model type to a view using a custom factory function.
Type parameters
| Name | Description |
|---|---|
TViewModel | The view model type. |
Parameters
| Name | Type | Description |
|---|---|---|
factory | Func | A factory function that creates the view. |
contract | string? | A contract string for named registrations. |
Returns: ViewMappingBuilder -- This builder for chaining.