Ejemplo n.º 1
0
 /// <summary>
 /// Overwrites the properties in this HighlightingColor with those from the given color;
 /// but maintains the current values where the properties of the given color return <c>null</c>.
 /// </summary>
 public void MergeWith(HighlightingColor color)
 {
     FreezableHelper.ThrowIfFrozen(this);
     if (color.fontWeight != null)
     {
         this.fontWeight = color.fontWeight;
     }
     if (color.fontStyle != null)
     {
         this.fontStyle = color.fontStyle;
     }
     if (color.foreground != null)
     {
         this.foreground = color.foreground;
     }
     if (color.background != null)
     {
         this.background = color.background;
     }
     if (color.underline != null)
     {
         this.underline = color.underline;
     }
     if (color.fontFamily != null)
     {
         this.fontFamily = color.fontFamily;
     }
     if (color.fontSize != null)
     {
         this.fontSize = color.fontSize;
     }
 }
Ejemplo n.º 2
0
 public void AddDocumentation(IUnresolvedEntity entity, string xmlDocumentation)
 {
     FreezableHelper.ThrowIfFrozen(this);
     if (documentation == null)
     {
         documentation = new Dictionary <IUnresolvedEntity, string>();
     }
     documentation.Add(entity, xmlDocumentation);
 }
Ejemplo n.º 3
0
 void SetFlag(byte flag, bool value)
 {
     FreezableHelper.ThrowIfFrozen(this);
     if (value)
     {
         this.flags |= flag;
     }
     else
     {
         this.flags &= unchecked ((byte)~flag);
     }
 }
Ejemplo n.º 4
0
 protected void ThrowIfFrozen()
 {
     FreezableHelper.ThrowIfFrozen(this);
 }