Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

AdfNode

Namespace OfficeIMO.Adf
Assembly OfficeIMO.Adf
Source revision 45ddf07f0b84 with working tree changes
Modifiers sealed

An ADF content node.

Inheritance

  • Object
  • AdfNode

Usage

Explore 6 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 1

Constructors

public AdfNode(String type) #

Creates an ADF node.

Parameters

type System.String requiredposition: 0

Methods

public Int32? GetInt32Attribute(String name) #
Returns: Int32?

Gets an integer attribute when present.

Parameters

name System.String requiredposition: 0
public String? GetStringAttribute(String name) #
Returns: String?

Gets a string attribute when present.

Parameters

name System.String requiredposition: 0
SetAttribute``1 2 overloads
public AdfNode SetAttribute<T>(String name, T? value) #
Returns: AdfNode

Sets a JSON-compatible attribute value.

Type Parameters

T

Parameters

name System.String requiredposition: 0
value T? requiredposition: 1
public AdfNode SetAttribute<T>(String name, T? value, JsonTypeInfo<T?> typeInfo) #
Returns: AdfNode

Sets a custom attribute using source-generated JSON metadata.

Type Parameters

T

Parameters

name System.String requiredposition: 0
value T? requiredposition: 1
typeInfo System.Text.Json.Serialization.Metadata.JsonTypeInfo<T?> requiredposition: 2
public static AdfNode TextNode(String text, IEnumerable<AdfMark>? marks = null) #
Returns: AdfNode

Creates a text node.

Parameters

text System.String requiredposition: 0
marks System.Collections.Generic.IEnumerable<OfficeIMO.Adf.AdfMark>? = null optionalposition: 1

Properties

public String Type { get; set; } #

Node type such as paragraph, heading, or text.

public String? Text { get; set; } #

Text payload for text nodes.

public Boolean IncludeEmptyAttributes { get; set; } #

Includes an empty attributes object when no attributes are set. Parsing retains explicit source presence.

public Boolean IncludeEmptyContent { get; set; } #

Includes an empty content array when there are no children. Parsing retains explicit source presence.

public Boolean IncludeEmptyMarks { get; set; } #

Includes an empty marks array when there are no marks. Parsing retains explicit source presence.

public List<AdfNode> Content { get; } #

Child nodes.

public List<AdfMark> Marks { get; } #

Marks applied to a text node.

public IDictionary<String, JsonElement> Attributes { get; } #

Node attributes retained as arbitrary JSON values.

public IDictionary<String, JsonElement> ExtensionData { get; } #

Unknown node properties retained during parse/write round trips.