public void Process(XamlInstruction instruction) { if (recording) { if (instruction.InstructionType == XamlInstructionType.StartMember) { depth++; } if (instruction.InstructionType == XamlInstructionType.EndMember) { depth--; if (depth == 0) { recording = false; var loaded = assembler.Load(new ReadOnlyCollection <XamlInstruction>(nodeList), WiringContext); objectAssembler.OverrideInstance(loaded); objectAssembler.Process(instruction); } } if (depth > 0) { nodeList.Add(instruction); } } else { if (instruction.InstructionType == XamlInstructionType.StartMember && !instruction.Member.IsDirective) { var hasAssembler = TryGetDeferredAssembler((MutableXamlMember)instruction.Member, out assembler); if (hasAssembler) { recording = true; nodeList = new Collection <XamlInstruction>(); depth++; objectAssembler.Process(instruction); } } if (!recording) { objectAssembler.Process(instruction); } } }
public void Process(XamlInstruction instruction) { if (recording) { if (instruction.InstructionType == XamlInstructionType.StartMember) { depth++; } if (instruction.InstructionType == XamlInstructionType.EndMember) { depth--; if (depth == 0) { recording = false; var loaded = assembler.Load(new ReadOnlyCollection<XamlInstruction>(nodeList), WiringContext); objectAssembler.OverrideInstance(loaded); objectAssembler.Process(instruction); } } if (depth > 0) { nodeList.Add(instruction); } } else { if (instruction.InstructionType == XamlInstructionType.StartMember && !instruction.Member.IsDirective) { var hasAssembler = TryGetDeferredAssembler((MutableXamlMember) instruction.Member, out assembler); if (hasAssembler) { recording = true; nodeList = new Collection<XamlInstruction>(); depth++; objectAssembler.Process(instruction); } } if (!recording) { objectAssembler.Process(instruction); } } }
public void Process(XamlInstruction node) { _objectAssembler.Process(node); }
private static bool IsTrailing(XamlInstruction xamlInstruction) { return xamlInstruction.InstructionType == XamlInstructionType.EndMember || xamlInstruction.InstructionType == XamlInstructionType.EndObject; }
private static bool IsLeading(XamlInstruction current) { return current.InstructionType == XamlInstructionType.StartMember || current.InstructionType == XamlInstructionType.StartObject; }
public bool Equals(XamlInstruction other) { return(instructionType == other.instructionType && Equals(data, other.data) && internalNodeType == other.internalNodeType); }
public bool Equals(XamlInstruction other) { return instructionType == other.instructionType && Equals(data, other.data) && internalNodeType == other.internalNodeType; }
private static bool IsLeading(XamlInstruction current) { return(current.InstructionType == XamlInstructionType.StartMember || current.InstructionType == XamlInstructionType.StartObject || current.InstructionType == XamlInstructionType.GetObject); }
private static bool IsTrailing(XamlInstruction xamlInstruction) { return(xamlInstruction.InstructionType == XamlInstructionType.EndMember || xamlInstruction.InstructionType == XamlInstructionType.EndObject); }