public virtual TResult VisitDiscard(IDiscardSymbol symbol) { #pragma warning disable CS8717 // A member returning a [MaybeNull] value introduces a null value when 'TResult' is a non-nullable reference type. return(DefaultVisit(symbol)); #pragma warning restore CS8717 // A member returning a [MaybeNull] value introduces a null value when 'TResult' is a non-nullable reference type. }
public override void VisitDiscard(IDiscardSymbol symbol) { if (format.LocalOptions.IncludesOption(SymbolDisplayLocalOptions.IncludeType)) { symbol.Type.Accept(this); AddSpace(); } builder.Add(CreatePart(SymbolDisplayPartKind.Punctuation, symbol, "_")); }
public override void VisitDiscard(IDiscardSymbol symbol) { if (format.LocalOptions.IncludesOption(SymbolDisplayLocalOptions.IncludeType)) { VisitTypeWithAnnotations(TypeWithAnnotations.Create((TypeSymbol)symbol.Type, symbol.NullableAnnotation.ToInternalAnnotation())); AddSpace(); } builder.Add(CreatePart(SymbolDisplayPartKind.Punctuation, symbol, "_")); }
public virtual TResult?VisitDiscard(IDiscardSymbol symbol) { return(DefaultVisit(symbol)); }
public virtual void VisitDiscard(IDiscardSymbol symbol) { DefaultVisit(symbol); }
private void AddDescriptionForDiscard(IDiscardSymbol symbol) { AddToGroup(SymbolDescriptionGroups.MainDescription, Description(FeaturesResources.discard), ToMinimalDisplayParts(symbol, MinimallyQualifiedFormatWithConstants)); }
/// <inheritdoc /> public override void VisitDiscard(IDiscardSymbol symbol) => Visit(symbol);
public virtual TResult VisitDiscard(IDiscardSymbol symbol, TArgument argument) { return(DefaultVisit(symbol, argument)); }
public override void VisitDiscard(IDiscardSymbol symbol) { base.VisitDiscard(symbol); }
/// <summary> /// Try getting the <see cref="ILocalSymbol"/> for the node. /// Gets the semantic model for the tree if the node is not in the tree corresponding to <paramref name="semanticModel"/>. /// </summary> /// <param name="semanticModel">The <see cref="SemanticModel"/>.</param> /// <param name="node">The <see cref="VariableDesignationSyntax"/>.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/>.</param> /// <param name="symbol">The symbol if found.</param> /// <returns>True if a symbol was found.</returns> public static bool TryGetSymbol(this SemanticModel semanticModel, DiscardDesignationSyntax node, CancellationToken cancellationToken, out IDiscardSymbol symbol) { symbol = GetDeclaredSymbolSafe(semanticModel, node, cancellationToken); return(symbol != null); }