Пример #1
0
 Frame(Syntax target, Frame parent = null, HierachicalFormatter formatter = null)
 {
     Parent = parent;
     Formatter = parent?.Formatter ?? formatter;
     Target = target;
     LeftCache = new ValueCache<Frame>(() => new Frame(Target.Left, this));
     RightCache = new ValueCache<Frame>(() => new Frame(Target.Right, this));
     ItemsWithoutLeadingBreaksCache = new ValueCache<ResultItems>
         (GetItemsWithoutLeadingBreaks);
     LeadingLineBreaksCache = new ValueCache<int>(GetLeadingLineBreaksForCache);
     HasInnerLineBreaksCache = new ValueCache<bool>(GetHasInnerLineBreaksForCache);
 }
Пример #2
0
 internal static Frame Create(Syntax target, HierachicalFormatter formatter)
 {
     var result = new Frame(target, formatter: formatter);
     return result;
 }