public BlockAccumulator Nest(ObjectBlock block) { CurrentObject.AddBlock(block); _objectBlocks.Push(block); Rank = Rank + 1; return(this); }
public object Read(Type type, ObjectBlock block) { var settings = _blocks.SettingsFor(type); block.MakeCollections(settings); var result = _resolver.BindModel(type, new ObjectBlockValues(block, settings, type)); return(result.Value); }
public override IBlock MakeBlock(Match match) { var name = match.Groups[1].Value; var implicitValue = match.Groups[2].Value; var block = new ObjectBlock(name) { ImplicitValue = implicitValue }; var otherProperties = match.Groups[3].Value; if (otherProperties.IsNotEmpty()) { var propertyBlocks = otherProperties.Split(", ") .Select(_propertyBlockParser.Parse) .ToList(); block.Blocks = propertyBlocks; } return(block); }
public BlockAccumulator(ObjectBlock root) { _objectBlocks = new Stack <ObjectBlock>(); _objectBlocks.Push(root); }
public void AddBlock(ObjectBlock block) { _blocks.Add(block); }
public ObjectBlockValues(ObjectBlock root, IObjectBlockSettings settings, Type type) { _root = root; _settings = settings; _type = type; }
public ObjectBlockValues(ObjectBlock root, Type type) : this(root, new ObjectBlockSettings(), type) { }