Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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();
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #10
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;
            var rootInstanceType = rootInstance?.GetType();

            rootInstanceXamlType = rootInstanceType != null?wiringContext.TypeContext.TypeRepository.GetXamlType(rootInstanceType) : null;
        }
 public DefaultObjectAssemblerFactory(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
Beispiel #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;
 }
Beispiel #14
0
 public object Load(IEnumerable <XamlInstruction> nodes, IWiringContext context)
 {
     return(new TemplateContent(nodes, context));
 }
 public DummyXamlParserFactory(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
Beispiel #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);
 }
Beispiel #18
0
 public TemplateContent(IEnumerable <XamlInstruction> nodes, IWiringContext context)
 {
     Nodes   = nodes;
     Context = context;
 }
Beispiel #19
0
 public DummyAssemblerFactory(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
Beispiel #20
0
 public MarkupExtensionNodeToXamlNodesConverter(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
 public DummyAssemblerFactory(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
Beispiel #22
0
 public TemplateContent(IEnumerable<XamlInstruction> nodes, IWiringContext context)
 {
     _nodes = nodes;
     _context = context;
 }
Beispiel #23
0
 public WpfParserFactory(ITypeFactory typeFactory)
 {
     wiringContext = new WpfWiringContext(typeFactory);
 }
Beispiel #24
0
 public TemplateContent(IEnumerable<XamlInstruction> nodes, IWiringContext wiringContext)
 {
     this.nodes = nodes;
     this.wiringContext = wiringContext;
 }
 public PerspexParserFactory(ITypeFactory typeFactory)
 {
     _wiringContext = new PerspexWiringContext(typeFactory);
 }
Beispiel #26
0
 public DefaultObjectAssemblerFactory(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
Beispiel #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;
 }
Beispiel #30
0
 public XamlInstructionParser(IWiringContext wiringContext)
 {
     this.wiringContext = wiringContext;
 }
 public PerspexParserFactory(ITypeFactory typeFactory)
 {
     _wiringContext = new PerspexWiringContext(typeFactory);
 }
Beispiel #32
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);
 }
Beispiel #34
0
 public WpfWiringContext(ITypeFactory factory)
 {
     wiringContext = new WiringContext(GetTypeContext(factory), GetFeatureProvider());
 }
Beispiel #35
0
 public object Load(IEnumerable<XamlInstruction> nodes, IWiringContext context)
 {
     return new TemplateContent(nodes, context);
 }
Beispiel #36
0
 public TemplateContent(IEnumerable <XamlInstruction> nodes, IWiringContext wiringContext)
 {
     this.nodes         = nodes;
     this.wiringContext = wiringContext;
 }
Beispiel #37
0
 public WpfParserFactory(ITypeFactory typeFactory)
 {
     wiringContext = new WpfWiringContext(typeFactory);
 }
Beispiel #38
0
 public Hydrator(IEnumerable<Type> inflatables, IWiringContext wiringContext)
 {
     this.inflatables = inflatables;
     this.wiringContext = wiringContext;
     instructionBuilder = new XamlInstructionBuilder(wiringContext.TypeContext);
 }