Beispiel #1
0
        public void Append(dynamic value, Expression callerNode)
        {
            var targetMonitors = GetMonitorsOfInterest(callerNode);

            foreach (var m in targetMonitors)
            {
                m.WillAppend?.Invoke(this, callerNode, value);
            }

            if (value is null)
            {
                ActualBuilder.Append((object)null);
            }
            else
            {
                ActualBuilder.Append(value);
            }


            foreach (var m in targetMonitors)
            {
                m.DidAppend?.Invoke(this, callerNode, value);
            }
        }
Beispiel #2
0
 public override string ToString()
 {
     return(ActualBuilder.ToString());
 }
Beispiel #3
0
 public void Clear()
 {
     Monitors.ForEach(m => m.WillClearAll?.Invoke(this));
     ActualBuilder.Clear();
     Monitors.ForEach(m => m.DidClearAll?.Invoke(this));
 }