public PerspexRuntimeTypeSource(ITypeFactory typeFactory) { var namespaceRegistry = new PerspexNamespaceRegistry(); var featureProvider = new PerspexTypeFeatureProvider(); var typeRepository = new PerspexTypeRepository(namespaceRegistry, typeFactory, featureProvider); inner = new RuntimeTypeSource(typeRepository, namespaceRegistry); }
public PerspexRuntimeTypeSource(ITypeFactory typeFactory) { var namespaceRegistry = new PerspexNamespaceRegistry(); var featureProvider = new PerspexTypeFeatureProvider(); var typeRepository = new PerspexTypeRepository(namespaceRegistry, typeFactory, featureProvider); inner = new RuntimeTypeSource(typeRepository, namespaceRegistry); }
public PerspexWiringContext(ITypeFactory typeFactory) { var featureProvider = new TypeFeatureProvider(GetContentPropertyProvider(), GetConverterProvider()); var xamlNamespaceRegistry = CreateXamlNamespaceRegistry(); var perspexPropertyBinder = new PerspexPropertyBinder(featureProvider.ConverterProvider); var xamlTypeRepository = new PerspexTypeRepository(xamlNamespaceRegistry, typeFactory, featureProvider, perspexPropertyBinder); var typeContext = new TypeContext(xamlTypeRepository, xamlNamespaceRegistry, typeFactory); _context = new WiringContext(typeContext, featureProvider); }
public PerspexWiringContext(ITypeFactory typeFactory) { var featureProvider = new TypeFeatureProvider(GetContentPropertyProvider(), GetConverterProvider()); var xamlNamespaceRegistry = CreateXamlNamespaceRegistry(); var perspexPropertyBinder = new PerspexPropertyBinder(featureProvider.ConverterProvider); var xamlTypeRepository = new PerspexTypeRepository(xamlNamespaceRegistry, typeFactory, featureProvider, perspexPropertyBinder); var typeContext = new TypeContext(xamlTypeRepository, xamlNamespaceRegistry, typeFactory); _context = new WiringContext(typeContext, featureProvider); }
private static ITypeContext CreateTypeContext(ITypeFactory typeFactory, TypeFeatureProvider featureProvider) { var xamlNamespaceRegistry = CreateXamlNamespaceRegistry(); var typeRepository = new PerspexTypeRepository(xamlNamespaceRegistry, typeFactory, featureProvider); typeRepository.RegisterMetadata(new Metadata <Setter>().WithMemberDependency(x => x.Value, x => x.Property)); typeRepository.RegisterMetadata( new Metadata <SelectingItemsControl>() .WithMemberDependency(x => x.SelectedIndex, x => x.Items) .WithMemberDependency(x => x.SelectedItem, x => x.Items)); return(new TypeContext(typeRepository, xamlNamespaceRegistry, typeFactory)); }
private static ITypeContext CreateTypeContext(ITypeFactory typeFactory, TypeFeatureProvider featureProvider) { var xamlNamespaceRegistry = CreateXamlNamespaceRegistry(); var typeRepository = new PerspexTypeRepository(xamlNamespaceRegistry, typeFactory, featureProvider); typeRepository.RegisterMetadata(new Metadata<Setter>().WithMemberDependency(x => x.Value, x => x.Property)); typeRepository.RegisterMetadata( new Metadata<SelectingItemsControl>() .WithMemberDependency(x => x.SelectedIndex, x => x.Items) .WithMemberDependency(x => x.SelectedItem, x => x.Items)); return new TypeContext(typeRepository, xamlNamespaceRegistry, typeFactory); }