C# Class Microsoft.CodeAnalysis.Sarif.Driver.XmlWriterExtensions

Extension methods applied to class XmlWriter.
Mostra file Open project: Microsoft/sarif-sdk

Public Methods

Method Description
WriteElementIfNonempty ( this writer, string localElementName, string elementValue ) : void

Writes an element if the supplied value is not null or whitespace.

Private Methods

Method Description
WriteElementInt ( this writer, string localElementName, int value ) : void
WriteEntryList ( this writer, string entryListName, string>.IEnumerable entryListEntries ) : void

Method Details

WriteElementIfNonempty() public static method

Writes an element if the supplied value is not null or whitespace.
Thrown when is null. Thrown when is not set.
public static WriteElementIfNonempty ( this writer, string localElementName, string elementValue ) : void
writer this The writer to which an element shall be written.
localElementName string The name of the element to be written.
elementValue string The element string if the element should be written; otherwise, null.
return void