Exemple #1
0
        public ObjectAssembler(IWiringContext wiringContext, ITopDownValueContext topDownValueContext, ObjectAssemblerSettings objectAssemblerSettings = null)
        {
            var mapping = new DeferredLoaderMapping();
            mapping.Map<DataTemplate>(template => template.AlternateTemplateContent, new DeferredLoader());

            objectAssembler = new TemplateHostingObjectAssembler(new OmniXaml.ObjectAssembler.ObjectAssembler(wiringContext, topDownValueContext, objectAssemblerSettings), mapping);
        }
        public PerspexObjectAssembler(IWiringContext wiringContext, ObjectAssemblerSettings objectAssemblerSettings = null)
        {
            var mapping = new DeferredLoaderMapping();
            mapping.Map<XamlDataTemplate>(template => template.Content, new TemplateLoader());

            var assembler = new ObjectAssembler(wiringContext, new TopDownMemberValueContext(), objectAssemblerSettings);
            _objectAssembler = new TemplateHostingObjectAssembler(assembler, mapping);
        }
Exemple #3
0
        public ObjectAssembler(IWiringContext wiringContext, ITopDownValueContext topDownValueContext, ObjectAssemblerSettings objectAssemblerSettings = null)
        {
            var mapping = new DeferredLoaderMapping();

            mapping.Map <DataTemplate>(template => template.AlternateTemplateContent, new DeferredLoader());

            objectAssembler = new TemplateHostingObjectAssembler(new OmniXaml.ObjectAssembler.ObjectAssembler(wiringContext, topDownValueContext, objectAssemblerSettings), mapping);
        }
Exemple #4
0
        public StateCommuter(StackingLinkedList<Level> stack, IWiringContext wiringContext, ITopDownValueContext topDownValueContext)
        {
            Guard.ThrowIfNull(stack, nameof(stack));
            Guard.ThrowIfNull(wiringContext, nameof(wiringContext));
            Guard.ThrowIfNull(topDownValueContext, nameof(topDownValueContext));

            Stack = stack;
            this.topDownValueContext = topDownValueContext;
            ValuePipeline = new ValuePipeline(wiringContext.TypeContext, topDownValueContext);
        }
Exemple #5
0
        public PerspexObjectAssembler(IWiringContext wiringContext, ObjectAssemblerSettings objectAssemblerSettings = null)
        {
            var mapping = new DeferredLoaderMapping();

            mapping.Map <XamlDataTemplate>(template => template.Content, new TemplateLoader());

            var assembler = new ObjectAssembler(wiringContext, new TopDownMemberValueContext(), objectAssemblerSettings);

            _objectAssembler = new TemplateHostingObjectAssembler(assembler, mapping);
        }
Exemple #6
0
        public ObjectAssembler(IWiringContext wiringContext, ITopDownValueContext topDownValueContext, ObjectAssemblerSettings settings = null)
            : this(new StackingLinkedList<Level>(), wiringContext, topDownValueContext)
        {
            Guard.ThrowIfNull(wiringContext, nameof(wiringContext));
            Guard.ThrowIfNull(topDownValueContext, nameof(topDownValueContext));

            this.topDownValueContext = topDownValueContext;
            StateCommuter.RaiseLevel();
            rootInstance = settings?.RootInstance;
            rootInstanceType = settings?.RootInstance?.GetType();
        }
Exemple #7
0
        public StateCommuter(StackingLinkedList <Level> stack, IWiringContext wiringContext, ITopDownValueContext topDownValueContext)
        {
            Guard.ThrowIfNull(stack, nameof(stack));
            Guard.ThrowIfNull(wiringContext, nameof(wiringContext));
            Guard.ThrowIfNull(topDownValueContext, nameof(topDownValueContext));

            Stack = stack;
            this.topDownValueContext = topDownValueContext;
            ValuePipeline            = new ValuePipeline(wiringContext.TypeContext, topDownValueContext);
            instanceProperties       = new InstanceProperties();
        }
        public PerspexObjectAssembler(IWiringContext wiringContext, ObjectAssemblerSettings objectAssemblerSettings = null)
        {
            var mapping = new DeferredLoaderMapping();
            mapping.Map<ControlTemplate>(x => x.Content, new TemplateLoader());
            mapping.Map<DataTemplate>(x => x.Content, new TemplateLoader());
            mapping.Map<FocusAdornerTemplate>(x => x.Content, new TemplateLoader());
            mapping.Map<TreeDataTemplate>(x => x.Content, new TemplateLoader());
            mapping.Map<ItemsPanelTemplate>(x => x.Content, new TemplateLoader());

            var assembler = new ObjectAssembler(wiringContext, new TopDownValueContext(), objectAssemblerSettings);
            _objectAssembler = new TemplateHostingObjectAssembler(assembler, mapping);
        }
Exemple #9
0
        public PerspexObjectAssembler(IWiringContext wiringContext, ObjectAssemblerSettings objectAssemblerSettings = null)
        {
            var mapping = new DeferredLoaderMapping();

            mapping.Map <ControlTemplate>(x => x.Content, new TemplateLoader());
            mapping.Map <DataTemplate>(x => x.Content, new TemplateLoader());
            mapping.Map <FocusAdornerTemplate>(x => x.Content, new TemplateLoader());
            mapping.Map <TreeDataTemplate>(x => x.Content, new TemplateLoader());
            mapping.Map <ItemsPanelTemplate>(x => x.Content, new TemplateLoader());

            var assembler = new ObjectAssembler(wiringContext, new TopDownValueContext(), objectAssemblerSettings);

            _objectAssembler = new TemplateHostingObjectAssembler(assembler, mapping);
        }
        public ObjectAssembler(IWiringContext wiringContext, ITopDownValueContext topDownValueContext, ObjectAssemblerSettings settings = null)
            : this(new StackingLinkedList <Level>(), wiringContext, topDownValueContext)
        {
            Guard.ThrowIfNull(wiringContext, nameof(wiringContext));
            Guard.ThrowIfNull(topDownValueContext, nameof(topDownValueContext));

            this.topDownValueContext = topDownValueContext;
            StateCommuter.RaiseLevel();

            rootInstance = settings?.RootInstance;
            var rootInstanceType = rootInstance?.GetType();

            rootInstanceXamlType = rootInstanceType != null?wiringContext.TypeContext.TypeRepository.GetXamlType(rootInstanceType) : null;
        }
 public DefaultObjectAssemblerFactory(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
Exemple #12
0
 public Hydrator(IEnumerable <Type> inflatables, IWiringContext wiringContext)
 {
     this.inflatables   = inflatables;
     this.wiringContext = wiringContext;
     instructionBuilder = new XamlInstructionBuilder(wiringContext.TypeContext);
 }
 public XamlInstructionParser(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
Exemple #14
0
 public object Load(IEnumerable <XamlInstruction> nodes, IWiringContext context)
 {
     return(new TemplateContent(nodes, context));
 }
 public DummyXamlParserFactory(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
Exemple #16
0
 public ObjectAssembler(StackingLinkedList<Level> state, IWiringContext wiringContext, ITopDownValueContext topDownValueContext)
 {
     WiringContext = wiringContext;
     StateCommuter = new StateCommuter(state, wiringContext, topDownValueContext);
 }
 public XamlProtoInstructionParser(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
     instructionBuilder = new ProtoInstructionBuilder(wiringContext.TypeContext);
 }
 public TemplateContent(IEnumerable <XamlInstruction> nodes, IWiringContext context)
 {
     Nodes   = nodes;
     Context = context;
 }
Exemple #19
0
 public DummyAssemblerFactory(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
Exemple #20
0
 public MarkupExtensionNodeToXamlNodesConverter(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
 public DummyAssemblerFactory(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
Exemple #22
0
 public TemplateContent(IEnumerable<XamlInstruction> nodes, IWiringContext context)
 {
     _nodes = nodes;
     _context = context;
 }
Exemple #23
0
 public WpfParserFactory(ITypeFactory typeFactory)
 {
     wiringContext = new WpfWiringContext(typeFactory);
 }
Exemple #24
0
 public TemplateContent(IEnumerable<XamlInstruction> nodes, IWiringContext wiringContext)
 {
     this.nodes = nodes;
     this.wiringContext = wiringContext;
 }
 public PerspexParserFactory(ITypeFactory typeFactory)
 {
     _wiringContext = new PerspexWiringContext(typeFactory);
 }
Exemple #26
0
 public DefaultObjectAssemblerFactory(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
Exemple #27
0
 public WpfWiringContext(ITypeFactory factory)
 {
     wiringContext = new WiringContext(GetTypeContext(factory), GetFeatureProvider());
 }
 public DummyXamlParserFactory(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
 public MarkupExtensionNodeToXamlNodesConverter(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
Exemple #30
0
 public XamlInstructionParser(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
 public PerspexParserFactory(ITypeFactory typeFactory)
 {
     _wiringContext = new PerspexWiringContext(typeFactory);
 }
 public ObjectAssembler(StackingLinkedList <Level> state, IWiringContext wiringContext, ITopDownValueContext topDownValueContext)
 {
     WiringContext = wiringContext;
     StateCommuter = new StateCommuter(state, wiringContext, topDownValueContext);
 }
 public XamlProtoInstructionParser(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
     instructionBuilder = new ProtoInstructionBuilder(wiringContext.TypeContext);
 }
Exemple #34
0
 public WpfWiringContext(ITypeFactory factory)
 {
     wiringContext = new WiringContext(GetTypeContext(factory), GetFeatureProvider());
 }
Exemple #35
0
 public object Load(IEnumerable<XamlInstruction> nodes, IWiringContext context)
 {
     return new TemplateContent(nodes, context);
 }
 public TemplateContent(IEnumerable <XamlInstruction> nodes, IWiringContext wiringContext)
 {
     this.nodes         = nodes;
     this.wiringContext = wiringContext;
 }
Exemple #37
0
 public WpfParserFactory(ITypeFactory typeFactory)
 {
     wiringContext = new WpfWiringContext(typeFactory);
 }
Exemple #38
0
 public Hydrator(IEnumerable<Type> inflatables, IWiringContext wiringContext)
 {
     this.inflatables = inflatables;
     this.wiringContext = wiringContext;
     instructionBuilder = new XamlInstructionBuilder(wiringContext.TypeContext);
 }