/// <summary> /// Construct a non-formattable <see cref="SymbolDisplayPart"/> (i.e. with a fixed string value). /// </summary> /// <param name="kind">The kind of the display part.</param> /// <param name="symbol">An optional associated symbol.</param> /// <param name="text">The fixed string value of the part.</param> public SymbolDisplayPart(SymbolDisplayPartKind kind, ISymbol?symbol, string text) { if (!kind.IsValid()) { throw new ArgumentOutOfRangeException(nameof(kind)); } if (text == null) { throw new ArgumentNullException(nameof(text)); } _kind = kind; _text = text; _symbol = symbol; }
/// <summary> /// Construct a non-formattable <see cref="SymbolDisplayPart"/> (i.e. with a fixed string value). /// </summary> /// <param name="kind">The kind of the display part.</param> /// <param name="symbol">An optional associated symbol.</param> /// <param name="text">The fixed string value of the part.</param> public SymbolDisplayPart(SymbolDisplayPartKind kind, ISymbol symbol, string text) { if (!kind.IsValid()) { throw new ArgumentOutOfRangeException("kind"); } if (text == null) { throw new ArgumentNullException("text"); } _kind = kind; _text = text; _symbol = symbol; }
/// <summary> /// Construct a non-formattable <see cref="SymbolDisplayPart"/> (i.e. with a fixed string value). /// </summary> /// <param name="kind">The kind of the display part.</param> /// <param name="symbol">An optional associated symbol.</param> /// <param name="text">The fixed string value of the part.</param> public SymbolDisplayPart(SymbolDisplayPartKind kind, ISymbol symbol, string text) { if (!kind.IsValid()) { throw new ArgumentOutOfRangeException("kind"); } if (text == null) { throw new ArgumentNullException("text"); } this.kind = kind; this.text = text; this.symbol = symbol; }