/// <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; } }
public void AddDocumentation(IUnresolvedEntity entity, string xmlDocumentation) { FreezableHelper.ThrowIfFrozen(this); if (documentation == null) { documentation = new Dictionary <IUnresolvedEntity, string>(); } documentation.Add(entity, xmlDocumentation); }
void SetFlag(byte flag, bool value) { FreezableHelper.ThrowIfFrozen(this); if (value) { this.flags |= flag; } else { this.flags &= unchecked ((byte)~flag); } }
protected void ThrowIfFrozen() { FreezableHelper.ThrowIfFrozen(this); }