Esempio 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);
        }
Esempio n. 2
0
 public ObjectAssembler(StackingLinkedList<Level> state,
     IRuntimeTypeSource typeSource,
     ITopDownValueContext topDownValueContext,
     IInstanceLifeCycleListener listener)
 {
     StateCommuter = new StateCommuter(state, typeSource, topDownValueContext, listener);
     LifecycleListener = listener;
 }
Esempio 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);
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio 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();
        }
Esempio 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();
        }
Esempio 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;
        }
Esempio 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);
        }
Esempio 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;
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio n. 14
0
 public ValueContext(ITypeRepository typeRepository, ITopDownValueContext topDownValueContext, IReadOnlyDictionary <string, object> parsingDictionary)
 {
     this.typeRepository      = typeRepository;
     this.topDownValueContext = topDownValueContext;
     this.parsingDictionary   = parsingDictionary;
 }
Esempio n. 15
0
 public ValueContext(ITypeRepository typeRepository, ITopDownValueContext topDownValueContext)
 {
     this.typeRepository      = typeRepository;
     this.topDownValueContext = topDownValueContext;
 }
Esempio n. 16
0
 public ObjectAssembler(StackingLinkedList<Level> state, IWiringContext wiringContext, ITopDownValueContext topDownValueContext)
 {
     WiringContext = wiringContext;
     StateCommuter = new StateCommuter(state, wiringContext, topDownValueContext);
 }
Esempio n. 17
0
 public EndObjectCommand(ObjectAssembler assembler, ITopDownValueContext topDownValueContext)
     : base(assembler)
 {
     this.topDownValueContext = topDownValueContext;
 }
Esempio n. 18
0
 public ValueContext(ITypeRepository typeRepository, ITopDownValueContext topDownValueContext, IReadOnlyDictionary<string, object> parsingDictionary)
 {
     this.typeRepository = typeRepository;
     this.topDownValueContext = topDownValueContext;
     this.parsingDictionary = parsingDictionary;
 }
Esempio n. 19
0
 public ObjectAssembler(StackingLinkedList <Level> state, IWiringContext wiringContext, ITopDownValueContext topDownValueContext)
 {
     WiringContext = wiringContext;
     StateCommuter = new StateCommuter(state, wiringContext, topDownValueContext);
 }
Esempio n. 20
0
 public XamlTypeConverterContext(IXamlTypeRepository typeRepository, ITopDownValueContext topDownValueContext)
 {
     this.typeRepository      = typeRepository;
     this.topDownValueContext = topDownValueContext;
 }
Esempio n. 21
0
 public ValueCommand(StateCommuter stateCommuter, ITypeRepository typeSource, ITopDownValueContext topDownValueContext, string value) : base(stateCommuter)
 {
     this.value = value;
     ValuePipeLine = new ValuePipeline(typeSource, topDownValueContext);
 }
Esempio n. 22
0
 public ValueCommand(ObjectAssembler objectAssembler, ITopDownValueContext topDownValueContext, string value) : base(objectAssembler)
 {
     this.value    = value;
     ValuePipeLine = new ValuePipeline(objectAssembler.WiringContext.TypeContext, topDownValueContext);
 }
Esempio n. 23
0
 public ValuePipeline(ITypeRepository typeRepository, ITopDownValueContext topDownValueContext)
 {
     this.typeRepository = typeRepository;
     this.topDownValueContext = topDownValueContext;
 }
Esempio n. 24
0
 public ValueCommand(ObjectAssembler objectAssembler, ITopDownValueContext topDownValueContext, string value)
     : base(objectAssembler)
 {
     this.value = value;
     ValuePipeLine = new ValuePipeline(objectAssembler.WiringContext.TypeContext, topDownValueContext);
 }
 public XamlTypeConverterContext(IXamlTypeRepository typeRepository, ITopDownValueContext topDownValueContext)
 {
     this.typeRepository = typeRepository;
     this.topDownValueContext = topDownValueContext;
 }
Esempio n. 26
0
 public EndMemberCommand(ObjectAssembler assembler, ITopDownValueContext topDownValueContext) : base(assembler)
 {
     this.topDownValueContext = topDownValueContext;
     typeContext = Assembler.WiringContext.TypeContext;
 }
Esempio n. 27
0
 public EndMemberCommand(ObjectAssembler assembler, ITopDownValueContext topDownValueContext)
     : base(assembler)
 {
     this.topDownValueContext = topDownValueContext;
     typeContext = Assembler.WiringContext.TypeContext;
 }
Esempio n. 28
0
 public ValuePipeline(IXamlTypeRepository typeRepository, ITopDownValueContext topDownValueContext)
 {
     this.typeRepository      = typeRepository;
     this.topDownValueContext = topDownValueContext;
 }