Table of Contents

Class CompositeASType

Namespace
ActivityPub.Types.Internal
Assembly
ActivityPub.Types.dll

Represents the AS type name of a composite object. More-specific subtypes will "shadow" (replace) more-generic base types.

internal class CompositeASType : IEnumerable<string>, IEnumerable
Inheritance
CompositeASType
Implements
Inherited Members

Fields

_allASTypes

private readonly HashSet<string> _allASTypes

Field Value

HashSet<string>

_flatASTypes

private readonly HashSet<string> _flatASTypes

Field Value

HashSet<string>

_replacedASTypes

private readonly HashSet<string> _replacedASTypes

Field Value

HashSet<string>

Properties

AllTypes

AS type names that are represented by this object, including those that have been shadowed. The returned object is a live, read-only view of the collection. Changes will be reflected immediately.

public IReadOnlySet<string> AllTypes { get; }

Property Value

IReadOnlySet<string>

Types

AS type names that are represented by this object, excluding those that have been shadowed. The returned object is a live, read-only view of the collection. Changes will be reflected immediately.

public IReadOnlySet<string> Types { get; }

Property Value

IReadOnlySet<string>

Methods

Add(string, string?)

Adds a new type.

public void Add(string type, string? replacedType = null)

Parameters

type string

Name of the type to add

replacedType string

Optional, name of the type that is replaced by this one

AddRange(IEnumerable<string>)

Adds a collection of type names. These are assumed to to not shadow anything, but may be shadowed by existing types.

public void AddRange(IEnumerable<string> asTypes)

Parameters

asTypes IEnumerable<string>

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<string> GetEnumerator()

Returns

IEnumerator<string>

An enumerator that can be used to iterate through the collection.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

IEnumerator IEnumerable.GetEnumerator()

Returns

IEnumerator

An IEnumerator object that can be used to iterate through the collection.