Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public ObjectAssembler(StackingLinkedList<Level> state,
     IRuntimeTypeSource typeSource,
     ITopDownValueContext topDownValueContext,
     IInstanceLifeCycleListener listener)
 {
     StateCommuter = new StateCommuter(state, typeSource, topDownValueContext, listener);
     LifecycleListener = listener;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
        public ObjectAssembler(IRuntimeTypeSource typeSource, ITopDownValueContext topDownValueContext, Settings settings = null)
        {
            TypeSource = typeSource;
            var mapping = new DeferredLoaderMapping();
            mapping.Map<DataTemplate>(template => template.AlternateTemplateContent, new DeferredLoader());

            objectAssembler = new TemplateHostingObjectAssembler(
                new OmniXaml.ObjectAssembler.ObjectAssembler(typeSource, topDownValueContext, settings),
                mapping);
        }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 8
0
        public ObjectAssembler(IRuntimeTypeSource typeSource, ITopDownValueContext topDownValueContext, Settings settings = null)
            : this(new StackingLinkedList<Level>(), typeSource, topDownValueContext, GetLifecycleListener(settings))
        {
            Guard.ThrowIfNull(typeSource, nameof(typeSource));
            Guard.ThrowIfNull(topDownValueContext, nameof(topDownValueContext));

            TypeSource = typeSource;
            TopDownValueContext = topDownValueContext;
            StateCommuter.RaiseLevel();

            rootInstance = settings?.RootInstance;
            var rootInstanceType = rootInstance?.GetType();
            rootInstanceXamlType = rootInstanceType != null ? TypeSource.GetByType(rootInstanceType) : null;
        }
Ejemplo n.º 9
0
        public StateCommuter(StackingLinkedList<Level> stack,
            IRuntimeTypeSource typeSource,
            ITopDownValueContext topDownValueContext,
            IInstanceLifeCycleListener lifecycleListener)
        {
            Guard.ThrowIfNull(stack, nameof(stack));
            Guard.ThrowIfNull(typeSource, nameof(typeSource));
            Guard.ThrowIfNull(topDownValueContext, nameof(topDownValueContext));

            Stack = stack;
            this.topDownValueContext = topDownValueContext;
            this.lifecycleListener = lifecycleListener;
            ValuePipeline = new ValuePipeline(typeSource, topDownValueContext);
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 11
0
        public PerspexObjectAssembler(
            IRuntimeTypeSource typeSource, 
            ITopDownValueContext topDownValueContext, 
            Settings settings = 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 valueContext = new ValueContext(typeSource, topDownValueContext);
            assembler = new ObjectAssembler(typeSource, valueContext, settings);
            objectAssembler = new TemplateHostingObjectAssembler(assembler, mapping);
        }
Ejemplo n.º 12
0
        public ObjectAssembler(IRuntimeTypeSource typeSource, ITopDownValueContext topDownValueContext, Settings settings = null)
        {
            TypeSource = typeSource;
            var mapping = new DeferredLoaderMapping();

            mapping.Map <DataTemplate>(template => template.AlternateTemplateContent, new DeferredLoader());
            var parsingDictionary      = GetDictionary(settings);
            var valueConnectionContext = new ValueContext(typeSource, topDownValueContext, parsingDictionary);

            objectAssembler = new TemplateHostingObjectAssembler(
                new OmniXaml.ObjectAssembler.ObjectAssembler(
                    typeSource,
                    valueConnectionContext,
                    settings),
                mapping);
        }
Ejemplo n.º 13
0
        public PerspexObjectAssembler(
            IRuntimeTypeSource typeSource,
            ITopDownValueContext topDownValueContext,
            Settings settings = 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 valueContext = new ValueContext(typeSource, topDownValueContext);

            assembler       = new ObjectAssembler(typeSource, valueContext, settings);
            objectAssembler = new TemplateHostingObjectAssembler(assembler, mapping);
        }
Ejemplo n.º 14
0
 public ValueContext(ITypeRepository typeRepository, ITopDownValueContext topDownValueContext, IReadOnlyDictionary <string, object> parsingDictionary)
 {
     this.typeRepository      = typeRepository;
     this.topDownValueContext = topDownValueContext;
     this.parsingDictionary   = parsingDictionary;
 }
Ejemplo n.º 15
0
 public ValueContext(ITypeRepository typeRepository, ITopDownValueContext topDownValueContext)
 {
     this.typeRepository      = typeRepository;
     this.topDownValueContext = topDownValueContext;
 }
Ejemplo n.º 16
0
 public ObjectAssembler(StackingLinkedList<Level> state, IWiringContext wiringContext, ITopDownValueContext topDownValueContext)
 {
     WiringContext = wiringContext;
     StateCommuter = new StateCommuter(state, wiringContext, topDownValueContext);
 }
Ejemplo n.º 17
0
 public EndObjectCommand(ObjectAssembler assembler, ITopDownValueContext topDownValueContext)
     : base(assembler)
 {
     this.topDownValueContext = topDownValueContext;
 }
Ejemplo n.º 18
0
 public ValueContext(ITypeRepository typeRepository, ITopDownValueContext topDownValueContext, IReadOnlyDictionary<string, object> parsingDictionary)
 {
     this.typeRepository = typeRepository;
     this.topDownValueContext = topDownValueContext;
     this.parsingDictionary = parsingDictionary;
 }
Ejemplo n.º 19
0
 public ObjectAssembler(StackingLinkedList <Level> state, IWiringContext wiringContext, ITopDownValueContext topDownValueContext)
 {
     WiringContext = wiringContext;
     StateCommuter = new StateCommuter(state, wiringContext, topDownValueContext);
 }
Ejemplo n.º 20
0
 public XamlTypeConverterContext(IXamlTypeRepository typeRepository, ITopDownValueContext topDownValueContext)
 {
     this.typeRepository      = typeRepository;
     this.topDownValueContext = topDownValueContext;
 }
Ejemplo n.º 21
0
 public ValueCommand(StateCommuter stateCommuter, ITypeRepository typeSource, ITopDownValueContext topDownValueContext, string value) : base(stateCommuter)
 {
     this.value = value;
     ValuePipeLine = new ValuePipeline(typeSource, topDownValueContext);
 }
Ejemplo n.º 22
0
 public ValueCommand(ObjectAssembler objectAssembler, ITopDownValueContext topDownValueContext, string value) : base(objectAssembler)
 {
     this.value    = value;
     ValuePipeLine = new ValuePipeline(objectAssembler.WiringContext.TypeContext, topDownValueContext);
 }
Ejemplo n.º 23
0
 public ValuePipeline(ITypeRepository typeRepository, ITopDownValueContext topDownValueContext)
 {
     this.typeRepository = typeRepository;
     this.topDownValueContext = topDownValueContext;
 }
Ejemplo n.º 24
0
 public ValueCommand(ObjectAssembler objectAssembler, ITopDownValueContext topDownValueContext, string value)
     : base(objectAssembler)
 {
     this.value = value;
     ValuePipeLine = new ValuePipeline(objectAssembler.WiringContext.TypeContext, topDownValueContext);
 }
Ejemplo n.º 25
0
 public XamlTypeConverterContext(IXamlTypeRepository typeRepository, ITopDownValueContext topDownValueContext)
 {
     this.typeRepository = typeRepository;
     this.topDownValueContext = topDownValueContext;
 }
Ejemplo n.º 26
0
 public EndMemberCommand(ObjectAssembler assembler, ITopDownValueContext topDownValueContext) : base(assembler)
 {
     this.topDownValueContext = topDownValueContext;
     typeContext = Assembler.WiringContext.TypeContext;
 }
Ejemplo n.º 27
0
 public EndMemberCommand(ObjectAssembler assembler, ITopDownValueContext topDownValueContext)
     : base(assembler)
 {
     this.topDownValueContext = topDownValueContext;
     typeContext = Assembler.WiringContext.TypeContext;
 }
Ejemplo n.º 28
0
 public ValuePipeline(IXamlTypeRepository typeRepository, ITopDownValueContext topDownValueContext)
 {
     this.typeRepository      = typeRepository;
     this.topDownValueContext = topDownValueContext;
 }