Ejemplo n.º 1
0
 public ObjectAssembler(StackingLinkedList<Level> state,
     IRuntimeTypeSource typeSource,
     ITopDownValueContext topDownValueContext,
     IInstanceLifeCycleListener listener)
 {
     StateCommuter = new StateCommuter(state, typeSource, topDownValueContext, listener);
     LifecycleListener = listener;
 }
Ejemplo n.º 2
0
 public ObjectAssembler(StackingLinkedList <Level> state,
                        IRuntimeTypeSource typeSource,
                        IInstanceLifeCycleListener listener,
                        IValueContext context)
 {
     StateCommuter     = new StateCommuter(state, typeSource, listener, context);
     LifecycleListener = listener;
 }
Ejemplo n.º 3
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.º 4
0
        public StateCommuter(StackingLinkedList<Level> stack,
            IRuntimeTypeSource typeSource,
            IInstanceLifeCycleListener lifecycleListener,
            IValueContext valueContext)
        {
            Guard.ThrowIfNull(stack, nameof(stack));
            Guard.ThrowIfNull(typeSource, nameof(typeSource));

            Stack = stack;
            this.lifecycleListener = lifecycleListener;
            this.valueContext = valueContext;
        }
Ejemplo n.º 5
0
        public StateCommuter(StackingLinkedList <Level> stack,
                             IRuntimeTypeSource typeSource,
                             IInstanceLifeCycleListener lifecycleListener,
                             IValueContext valueContext)
        {
            Guard.ThrowIfNull(stack, nameof(stack));
            Guard.ThrowIfNull(typeSource, nameof(typeSource));

            Stack = stack;
            this.lifecycleListener = lifecycleListener;
            this.valueContext      = valueContext;
        }
Ejemplo n.º 6
0
        public TestRuntimeTypeSource()
        {
            var namespaceRegistry = CreateNamespaceRegistry();

            var featureProvider = new TypeFeatureProvider(new TypeConverterProvider());

            featureProvider.FillFromAttributes(ScannedAssemblies.AllExportedTypes());
            testTypeRepository = new TestTypeRepository(namespaceRegistry, new TypeFactory(), featureProvider);

            inner = new RuntimeTypeSource(testTypeRepository, namespaceRegistry);
            inner.RegisterPrefix(new PrefixRegistration("", "root"));
            inner.RegisterPrefix(new PrefixRegistration("x", "another"));
        }
Ejemplo n.º 7
0
        public PerspexObjectAssembler(IRuntimeTypeSource runtimeTypeSource, Settings 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());

            assembler       = new ObjectAssembler(runtimeTypeSource, new TopDownValueContext(), objectAssemblerSettings);
            objectAssembler = new TemplateHostingObjectAssembler(assembler, mapping);
        }
Ejemplo n.º 8
0
        public ObjectAssembler(IRuntimeTypeSource typeSource, IValueContext valueContext, Settings settings = null)
            : this(new StackingLinkedList<Level>(), typeSource, GetLifecycleListener(settings), valueContext)
        {
            this.valueContext = valueContext;
            Guard.ThrowIfNull(typeSource, nameof(typeSource));

            TypeSource = typeSource;
            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(IRuntimeTypeSource typeSource, IValueContext valueContext, Settings settings = null)
            : this(new StackingLinkedList <Level>(), typeSource, GetLifecycleListener(settings), valueContext)
        {
            this.valueContext = valueContext;
            Guard.ThrowIfNull(typeSource, nameof(typeSource));

            TypeSource = typeSource;
            StateCommuter.RaiseLevel();

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

            rootInstanceXamlType = rootInstanceType != null?TypeSource.GetByType(rootInstanceType) : null;
        }
Ejemplo n.º 11
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.º 12
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.º 13
0
        public AvaloniaObjectAssembler(
            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 parsingDictionary = GetDictionary(settings);
            var valueContext      = new ValueContext(typeSource, topDownValueContext, parsingDictionary);

            assembler       = new ObjectAssembler(typeSource, valueContext, settings);
            objectAssembler = new TemplateHostingObjectAssembler(assembler, mapping);
        }
Ejemplo n.º 14
0
 public ProtoInstructionParser(IRuntimeTypeSource typeSource)
 {
     this.typeSource    = typeSource;
     instructionBuilder = new ProtoInstructionBuilder(typeSource);
 }
Ejemplo n.º 15
0
 public object Load(IEnumerable <Instruction> nodes, IRuntimeTypeSource typeSource)
 {
     return(new TemplateContent(nodes, typeSource));
 }
Ejemplo n.º 16
0
 public DefaultObjectAssemblerFactory(IRuntimeTypeSource typeSource)
 {
     this.typeSource = typeSource;
 }
Ejemplo n.º 17
0
 public ProtoInstructionBuilder(IRuntimeTypeSource typeSource)
 {
     this.typeSource = typeSource;
 }
Ejemplo n.º 18
0
 public DummyParserFactory(IRuntimeTypeSource runtimeTypeSource)
 {
     this.runtimeTypeSource = runtimeTypeSource;
 }
Ejemplo n.º 19
0
 public DummyAssemblerFactory(IRuntimeTypeSource runtimeTypeSource)
 {
     this.runtimeTypeSource = runtimeTypeSource;
 }
Ejemplo n.º 20
0
 public TemplateContent(IEnumerable<Instruction> nodes, IRuntimeTypeSource typeSource)
 {
     this.nodes = nodes;
     this.typeSource = typeSource;
 }
Ejemplo n.º 21
0
 public PerspexParserFactory(ITypeFactory typeFactory)
 {
     runtimeTypeSource = new PerspexRuntimeTypeSource(typeFactory);
 }
 public MarkupExtensionNodeToXamlNodesConverter(IRuntimeTypeSource typeSource)
 {
     TypeSource = typeSource;
 }
Ejemplo n.º 23
0
 public PerspexParserFactory(ITypeFactory typeFactory)
 {
     runtimeTypeSource = new PerspexRuntimeTypeSource(typeFactory);
 }      
Ejemplo n.º 24
0
 public WpfParserFactory()
 {
     runtimeTypeSource = new WpfRuntimeTypeSource();
 }
 public AvaloniaParserFactory(ITypeFactory typeFactory)
 {
     runtimeTypeSource = new AvaloniaRuntimeTypeSource(typeFactory);
 }
Ejemplo n.º 26
0
 public DefaultParserFactory(IRuntimeTypeSource runtimeTypeSource)
 {
     this.runtimeTypeSource = runtimeTypeSource;
 }
Ejemplo n.º 27
0
 public Hydrator(IEnumerable<Type> inflatables, IRuntimeTypeSource typeSource)
 {
     this.inflatables = inflatables;
     this.typeSource = typeSource;
     instructionBuilder = new XamlInstructionBuilder(typeSource);
 }
Ejemplo n.º 28
0
 public DefaultLoader(IRuntimeTypeSource runtimeTypeSource)
 {
     IParserFactory parserFactory = new DefaultParserFactory(runtimeTypeSource);
     xmlLoader = new XmlLoader(parserFactory);
 }
Ejemplo n.º 29
0
 public AvaloniaParserFactory(ITypeFactory typeFactory)
 {
     runtimeTypeSource = new AvaloniaRuntimeTypeSource(typeFactory);
 }      
Ejemplo n.º 30
0
 public InstructionParser(IRuntimeTypeSource typeSource)
 {
     this.typeSource = typeSource;
 }
Ejemplo n.º 31
0
 public DummyAssemblerFactory(IRuntimeTypeSource runtimeTypeSource)
 {
     this.runtimeTypeSource = runtimeTypeSource;
 }
Ejemplo n.º 32
0
 public TemplateContent(IEnumerable <Instruction> nodes, IRuntimeTypeSource runtimeTypeSource)
 {
     this.nodes             = nodes;
     this.runtimeTypeSource = runtimeTypeSource;
 }
Ejemplo n.º 33
0
        public DefaultLoader(IRuntimeTypeSource runtimeTypeSource)
        {
            IParserFactory parserFactory = new DefaultParserFactory(runtimeTypeSource);

            xmlLoader = new XmlLoader(parserFactory);
        }
Ejemplo n.º 34
0
 public DefaultParserFactory(IRuntimeTypeSource runtimeTypeSource)
 {
     this.runtimeTypeSource = runtimeTypeSource;
 }
Ejemplo n.º 35
0
 public InstructionParser(IRuntimeTypeSource typeSource)
 {
     this.typeSource = typeSource;
 }
Ejemplo n.º 36
0
 public ProtoInstructionParser(IRuntimeTypeSource typeSource)
 {
     this.typeSource = typeSource;
     instructionBuilder = new ProtoInstructionBuilder(typeSource);
 }
Ejemplo n.º 37
0
 public object Load(IEnumerable<Instruction> nodes, IRuntimeTypeSource runtimeTypeSource)
 {
     return new TemplateContent(nodes, runtimeTypeSource);
 }
Ejemplo n.º 38
0
 public Hydrator(IEnumerable <Type> inflatables, IRuntimeTypeSource typeSource)
 {
     this.inflatables   = inflatables;
     this.typeSource    = typeSource;
     instructionBuilder = new XamlInstructionBuilder(typeSource);
 }
 public DefaultObjectAssemblerFactory(IRuntimeTypeSource typeSource)
 {
     this.typeSource = typeSource;
 }
Ejemplo n.º 40
0
 public TemplateContent(IEnumerable <Instruction> nodes, IRuntimeTypeSource typeSource)
 {
     Nodes      = nodes;
     TypeSource = typeSource;
 }
Ejemplo n.º 41
0
 public MarkupExtensionNodeToXamlNodesConverter(IRuntimeTypeSource typeSource)
 {
     TypeSource = typeSource;
 }
Ejemplo n.º 42
0
 public WpfParserFactory()
 {
     runtimeTypeSource = new WpfRuntimeTypeSource();
 }
Ejemplo n.º 43
0
 public DummyParserFactory(IRuntimeTypeSource runtimeTypeSource)
 {
     this.runtimeTypeSource = runtimeTypeSource;
 }