Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

AdfNode

OfficeIMO.Adf

Namespace
OfficeIMO.Adf
Assembly
OfficeIMO.Adf
Source revision
ba882f6b0d07 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 string required

Methods

public int? GetInt32Attribute(string name) #

Gets an integer attribute when present.

Parameters

name string required

Returns

int?
public string? GetStringAttribute(string name) #

Gets a string attribute when present.

Parameters

name string required

Returns

string?
SetAttribute``1 2 overloads
public AdfNode SetAttribute<T>(string name, T? value) #

Sets a JSON-compatible attribute value.

Type Parameters

T

Parameters

name string required
value T? required

Returns

AdfNode
public AdfNode SetAttribute<T>(string name, T? value, JsonTypeInfo<T?> typeInfo) #

Sets a custom attribute using source-generated JSON metadata.

Type Parameters

T

Parameters

name string required
value T? required
typeInfo System.Text.Json.Serialization.Metadata.JsonTypeInfo<T?> required

Returns

AdfNode
public static AdfNode TextNode(string text, IEnumerable<AdfMark>? marks = null) #

Creates a text node.

Parameters

text string required
marks System.Collections.Generic.IEnumerable<OfficeIMO.Adf.AdfMark>? = null optional

Returns

AdfNode

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 bool IncludeEmptyAttributes { get; set; } #

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

public bool IncludeEmptyContent { get; set; } #

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

public bool 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.