Members on this page
ChannelChangedFollowChangedSyncStatusChangedTimelineChangedChannelManager(ClientOptions, DatabaseOptions, RelayClientPool, DeviceManager)CloseChannelAsync(ChannelRef, CancellationToken)CreateChannelAsync(string, string, string, IReadOnlyList<string>, CancellationToken)DeletePostAsync(ChannelPostRef, CancellationToken)EditPostAsync(ChannelPostRef, ChannelPostUpdate, CancellationToken)FollowAsync(ChannelRef, CancellationToken)GetChannelAsync(ChannelRef, CancellationToken)GetFollowedAsync(string, CancellationToken)GetPostsAsync(string, string, HistoryRange, CancellationToken)GetPostsAsync(string, string, CancellationToken)GetSyncStatusAsync(string, CancellationToken)LoadChannelHistoryAsync(ChannelRef, PageRequest, CancellationToken)PublishPostAsync(ChannelRef, ChannelPostDraft, CancellationToken)RefreshChannelAsync(ChannelRef, CancellationToken)ReportPostAsync(ChannelPostRef, string, CancellationToken)SynchronizeAsync(ChannelRef, CancellationToken)UnfollowAsync(ChannelRef, CancellationToken)UpdateChannelAsync(ChannelRef, ChannelUpdate, CancellationToken)
Meshline.Sdk
Meshline.Components
ChannelManager Class
Manages public channel metadata, posts, follows, and local timeline synchronization.
public sealed class ChannelManager : Meshline.Components.ClientComponent
Inheritance System.Object → ClientComponent → ChannelManager
Exceptions
System.ArgumentNullException
The network context in options is null. The options argument is null.
System.ArgumentException
The configured account identifier is invalid.
System.NotSupportedException
The configured account identifier uses an unsupported account namespace.
Constructors
ChannelManager(ClientOptions, DatabaseOptions, RelayClientPool, DeviceManager) Constructor
Manages public channel metadata, posts, follows, and local timeline synchronization.
public ChannelManager(Meshline.Models.Client.ClientOptions options, Meshline.Storage.DatabaseOptions databaseOptions, Meshline.Transport.RelayClientPool relayClients, Meshline.Components.DeviceManager deviceManager);
Parameters
options ClientOptions
The network and account configuration for this component.
databaseOptions DatabaseOptions
The SQLite database configuration; create its parent directory and apply migrations before initialization.
relayClients RelayClientPool
The shared relay pool. The application owns it and must dispose it after all dependent components.
deviceManager DeviceManager
The device component sharing this network, account, database, and relay pool.
Exceptions
System.ArgumentNullException
The network context in options is null. The options argument is null.
System.ArgumentException
The configured account identifier is invalid.
System.NotSupportedException
The configured account identifier uses an unsupported account namespace.
Methods
ChannelManager.CloseChannelAsync(ChannelRef, CancellationToken) Method
Publishes a closed channel descriptor as the channel owner.
public System.Threading.Tasks.Task CloseChannelAsync(Meshline.Models.Client.ChannelRef channel, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
channel ChannelRef
The channel identifier and hosting relay.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task
A task that completes when the operation finishes.
Exceptions
System.OperationCanceledException
The caller cancels the operation or a component or relay lifetime ends.
System.TimeoutException
An SDK request deadline expires. Data contains operation and timeoutSeconds; InnerException preserves the cancellation cause.
System.InvalidOperationException
This component or a required component has not completed initialization. The local device or its signing keys are unavailable, or no active relay can provide the required session. The channel is closed, a previous operation is unfinished, or the accepted post or expected descriptor revision is no longer available.
System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.
System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.
RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.
System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.
System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.
System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.
Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.
Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.
System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.
System.NotSupportedException
The hosting relay does not advertise channel hosting.
System.ArgumentException
The channel metadata, post content, or field update violates protocol constraints.
System.UnauthorizedAccessException
The current account is not permitted to publish or modify this channel resource.
System.OverflowException
Incrementing the known descriptor revision exceeds the range of a signed 64-bit integer.
ChannelManager.CreateChannelAsync(string, string, string, IReadOnlyList<string>, CancellationToken) Method
Creates a signed public channel on a relay that supports channel hosting.
public System.Threading.Tasks.Task<Meshline.Models.Client.ChannelInfo> CreateChannelAsync(string relayId, string name, string? description=null, System.Collections.Generic.IReadOnlyList<string>? moderators=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
relayId System.String
The relay's canonical lowercase Neo script-hash identifier.
name System.String
The resource's display name.
description System.String
An optional resource description.
moderators System.Collections.Generic.IReadOnlyList<System.String>
Optional account identifiers permitted to moderate the channel.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task<ChannelInfo>
The created channel's descriptor, reference, and local following state.
Exceptions
System.OperationCanceledException
The caller cancels the operation or a component or relay lifetime ends.
System.TimeoutException
An SDK request deadline expires. Data contains operation and timeoutSeconds; InnerException preserves the cancellation cause.
System.InvalidOperationException
Initialization or the local signing device is unavailable, the relay is inactive, or the new channel has a pending operation or conflicting descriptor revision.
System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.
System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.
RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.
System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.
System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.
System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.
Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.
Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.
System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.
System.NotSupportedException
The hosting relay does not advertise channel hosting.
System.ArgumentException
The relay identifier, channel name, description, or moderator list violates protocol constraints.
ChannelManager.DeletePostAsync(ChannelPostRef, CancellationToken) Method
Publishes a signed deletion for the referenced channel post.
public System.Threading.Tasks.Task DeletePostAsync(Meshline.Models.Client.ChannelPostRef post, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
post ChannelPostRef
The channel and original timeline sequence identifying the post.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task
A task that completes when the operation finishes.
Exceptions
System.OperationCanceledException
The caller cancels the operation or a component or relay lifetime ends.
System.TimeoutException
An SDK request deadline expires. Data contains operation and timeoutSeconds; InnerException preserves the cancellation cause.
System.InvalidOperationException
This component or a required component has not completed initialization. The local device or its signing keys are unavailable, or no active relay can provide the required session. The channel is closed, a previous operation is unfinished, or the accepted post or expected descriptor revision is no longer available.
System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.
System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.
RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.
System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.
System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.
System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.
Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.
Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.
System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.
System.NotSupportedException
The hosting relay does not advertise channel hosting.
System.ArgumentException
The channel metadata, post content, or field update violates protocol constraints.
System.UnauthorizedAccessException
The current account is not permitted to publish or modify this channel resource.
ChannelManager.EditPostAsync(ChannelPostRef, ChannelPostUpdate, CancellationToken) Method
Publishes signed field updates to an existing channel post and returns its updated local content.
public System.Threading.Tasks.Task<Meshline.Models.Client.ChannelPostInfo> EditPostAsync(Meshline.Models.Client.ChannelPostRef post, Meshline.Models.Client.ChannelPostUpdate edit, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
post ChannelPostRef
The channel and original timeline sequence identifying the post.
edit ChannelPostUpdate
The body and attachment changes to apply to the referenced post.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task<ChannelPostInfo>
The post's locally materialized content after the edit.
Exceptions
System.OperationCanceledException
The caller cancels the operation or a component or relay lifetime ends.
System.TimeoutException
An SDK request deadline expires. Data contains operation and timeoutSeconds; InnerException preserves the cancellation cause.
System.InvalidOperationException
This component or a required component has not completed initialization. The local device or its signing keys are unavailable, or no active relay can provide the required session. The channel is closed, a previous operation is unfinished, or the accepted post or expected descriptor revision is no longer available.
System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.
System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.
RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.
System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.
System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.
System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.
Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.
Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.
System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.
System.NotSupportedException
The hosting relay does not advertise channel hosting.
System.ArgumentException
The channel metadata, post content, or field update violates protocol constraints.
System.UnauthorizedAccessException
The current account is not permitted to publish or modify this channel resource.
ChannelManager.FollowAsync(ChannelRef, CancellationToken) Method
Resolves a channel, records it as locally followed, and requests subscription refresh.
public System.Threading.Tasks.Task FollowAsync(Meshline.Models.Client.ChannelRef channel, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
channel ChannelRef
The channel identifier and hosting relay.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task
A task that completes when the operation finishes.
Exceptions
System.OperationCanceledException
The caller cancels the operation or a component or relay lifetime ends.
System.TimeoutException
An SDK request deadline expires. Data contains operation and timeoutSeconds; InnerException preserves the cancellation cause.
System.InvalidOperationException
This component or a required component has not completed initialization. The local device or its signing keys are unavailable, or no active relay can provide the required session.
System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.
System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.
RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.
System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.
System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.
System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.
Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.
Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.
System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.
System.NotSupportedException
The hosting relay does not advertise channel hosting.
Remarks
Following is local to this database. Background subscriptions and synchronization run while the component is started.
ChannelManager.GetChannelAsync(ChannelRef, CancellationToken) Method
Returns verified channel information, refreshing its descriptor in the background when due.
public System.Threading.Tasks.Task<Meshline.Models.Client.ChannelInfo> GetChannelAsync(Meshline.Models.Client.ChannelRef channel, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
channel ChannelRef
The channel identifier and hosting relay.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task<ChannelInfo>
The resolved channel information and local following state.
Exceptions
System.OperationCanceledException
The caller cancels the operation or a component or relay lifetime ends.
System.TimeoutException
An SDK request deadline expires. Data contains operation and timeoutSeconds; InnerException preserves the cancellation cause.
System.InvalidOperationException
This component or a required component has not completed initialization. The local device or its signing keys are unavailable, or no active relay can provide the required session.
System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.
System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.
RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.
System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.
System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.
System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.
Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.
Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.
System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.
System.NotSupportedException
The hosting relay does not advertise channel hosting.
ChannelManager.GetFollowedAsync(string, CancellationToken) Method
Opens a snapshot reader for locally followed channels, optionally restricted to one relay.
public System.Threading.Tasks.Task<Meshline.Storage.QueryReader<Meshline.Models.Client.ChannelInfo>> GetFollowedAsync(string? relayId=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
relayId System.String
An optional hosting relay filter; null includes all values.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task<Meshline.Storage.QueryReader<ChannelInfo>>
A snapshot reader for the matching local results. The caller must dispose the reader after use.
Exceptions
System.OperationCanceledException
The operation observes cancellation of cancellationToken. Disposal of the component or relay session can also cancel pending work.
System.InvalidOperationException
This component or a required component has not completed initialization.
System.ObjectDisposedException
This component or a component used by the operation has been disposed.
Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.
Remarks
This query reads local storage without fetching missing relay history. Its snapshot is fixed when opened; dispose the reader promptly and open a new reader to observe later changes.
ChannelManager.GetPostsAsync(string, string, HistoryRange, CancellationToken) Method
Opens a snapshot reader for locally stored, undeleted channel posts matching the supplied filters.
public System.Threading.Tasks.Task<Meshline.Storage.QueryReader<Meshline.Models.Client.ChannelPostInfo>> GetPostsAsync(string? channelId=null, string? author=null, Meshline.Models.Client.HistoryRange? range=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
channelId System.String
An optional channel identifier filter; null includes all values.
author System.String
An optional author account filter; null includes all authors.
range HistoryRange
The optional exclusive local sequence bounds, copied when this method is called. Null means unbounded.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task<Meshline.Storage.QueryReader<ChannelPostInfo>>
A snapshot reader for the matching local results. The caller must dispose the reader after use.
Exceptions
System.OperationCanceledException
The operation observes cancellation of cancellationToken. Disposal of the component or relay session can also cancel pending work.
System.InvalidOperationException
This component or a required component has not completed initialization.
System.ObjectDisposedException
This component or a component used by the operation has been disposed.
Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.
System.ArgumentException
The history bounds or resource scope are invalid.
Remarks
This query reads local storage without fetching missing relay history. Its snapshot is fixed when opened; dispose the reader promptly and open a new reader to observe later changes.
Each batch is returned in ascending sequence order. With before, successive batches move toward older messages; otherwise they move toward newer messages.
When reopening, use the first item of a backward batch as before, or the last item of a forward batch as after.
Sequence bounds must be nonnegative safe integers; when both are supplied, after must be less than before and before determines the direction.
Supply channelId when using sequence bounds.
ChannelManager.GetPostsAsync(string, string, CancellationToken) Method
Opens a snapshot reader for locally stored, undeleted channel posts matching the supplied filters.
public System.Threading.Tasks.Task<Meshline.Storage.QueryReader<Meshline.Models.Client.ChannelPostInfo>> GetPostsAsync(string? channelId, string? author, System.Threading.CancellationToken cancellationToken);
Parameters
channelId System.String
An optional channel identifier filter; null includes all values.
author System.String
An optional author account filter; null includes all authors.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task<Meshline.Storage.QueryReader<ChannelPostInfo>>
A snapshot reader for the matching local results. The caller must dispose the reader after use.
Exceptions
System.OperationCanceledException
The operation observes cancellation of cancellationToken. Disposal of the component or relay session can also cancel pending work.
System.InvalidOperationException
This component or a required component has not completed initialization.
System.ObjectDisposedException
This component or a component used by the operation has been disposed.
Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.
Remarks
This overload retains the original parameter list for binary compatibility. Optional arguments are provided by the HistoryRange overload.
This query reads local storage without fetching missing relay history. Its snapshot is fixed when opened; dispose the reader promptly and open a new reader to observe later changes.
ChannelManager.GetSyncStatusAsync(string, CancellationToken) Method
Returns the current local synchronization snapshot for the channel, without network access.
public System.Threading.Tasks.Task<Meshline.Models.Client.ResourceSyncStatus> GetSyncStatusAsync(string channelId, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
channelId System.String
The canonical resource identifier.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task<ResourceSyncStatus>
An immutable runtime snapshot, initially Idle with no successful completion time.
Exceptions
System.ArgumentException
The resource identifier is invalid.
System.InvalidOperationException
This component has not been initialized.
System.ObjectDisposedException
This component has been disposed.
System.OperationCanceledException
The operation was canceled.
ChannelManager.LoadChannelHistoryAsync(ChannelRef, PageRequest, CancellationToken) Method
Loads and verifies a backward page of channel events and returns the available posts materialized from that page.
public System.Threading.Tasks.Task<Meshline.Models.Client.Page<Meshline.Models.Client.ChannelPostInfo>> LoadChannelHistoryAsync(Meshline.Models.Client.ChannelRef channel, Meshline.Models.Client.PageRequest? page=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
channel ChannelRef
The channel identifier and hosting relay.
page PageRequest
The requested page size and previous continuation cursor, or null for the first default-sized page.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task<Meshline.Models.Client.Page<ChannelPostInfo>>
The available posts from the event page and a cursor for earlier events when more remain.
Exceptions
System.OperationCanceledException
The caller cancels the operation or a component or relay lifetime ends.
System.TimeoutException
An SDK request deadline expires. Data contains operation and timeoutSeconds; InnerException preserves the cancellation cause.
System.InvalidOperationException
This component or a required component has not completed initialization. The local device or its signing keys are unavailable, or no active relay can provide the required session.
System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.
System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.
RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.
System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.
System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.
System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.
Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.
Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.
System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.
System.NotSupportedException
The hosting relay does not advertise channel hosting.
System.ArgumentException
The history cursor is not a nonnegative safe integer.
Remarks
Pass the returned NextCursor in the next request to continue toward older events. Deleted posts and non-post events are omitted, so a page can contain fewer posts than requested or no posts while still exposing a next cursor.
ChannelManager.PublishPostAsync(ChannelRef, ChannelPostDraft, CancellationToken) Method
Signs and publishes a public channel post, then returns its locally materialized content.
public System.Threading.Tasks.Task<Meshline.Models.Client.ChannelPostInfo> PublishPostAsync(Meshline.Models.Client.ChannelRef channel, Meshline.Models.Client.ChannelPostDraft draft, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
channel ChannelRef
The channel identifier and hosting relay.
draft ChannelPostDraft
The public post body and attachment references to publish.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task<ChannelPostInfo>
The accepted post's locally materialized content and original sequence.
Exceptions
System.OperationCanceledException
The caller cancels the operation or a component or relay lifetime ends.
System.TimeoutException
An SDK request deadline expires. Data contains operation and timeoutSeconds; InnerException preserves the cancellation cause.
System.InvalidOperationException
This component or a required component has not completed initialization. The local device or its signing keys are unavailable, or no active relay can provide the required session. The channel is closed, a previous operation is unfinished, or the accepted post or expected descriptor revision is no longer available.
System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.
System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.
RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.
System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.
System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.
System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.
Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.
Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.
System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.
System.NotSupportedException
The hosting relay does not advertise channel hosting.
System.ArgumentException
The channel metadata, post content, or field update violates protocol constraints.
System.UnauthorizedAccessException
The current account is not permitted to publish or modify this channel resource.
ChannelManager.RefreshChannelAsync(ChannelRef, CancellationToken) Method
Awaits channel descriptor refresh, bypassing the success interval but retaining the one-minute failure cooldown.
public System.Threading.Tasks.Task<Meshline.Models.Client.ChannelInfo> RefreshChannelAsync(Meshline.Models.Client.ChannelRef channel, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
channel ChannelRef
The channel identifier and hosting relay.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task<ChannelInfo>
The resolved channel information and local following state.
Exceptions
System.OperationCanceledException
The caller cancels the operation or a component or relay lifetime ends.
System.TimeoutException
An SDK request deadline expires. Data contains operation and timeoutSeconds; InnerException preserves the cancellation cause.
System.InvalidOperationException
This component or a required component has not completed initialization. The local device or its signing keys are unavailable, or no active relay can provide the required session.
System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.
System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.
RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.
System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.
System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.
System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.
Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.
Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.
System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.
System.NotSupportedException
The hosting relay does not advertise channel hosting.
ChannelManager.ReportPostAsync(ChannelPostRef, string, CancellationToken) Method
Reports a channel post to its hosting relay with a supplied reason.
public System.Threading.Tasks.Task ReportPostAsync(Meshline.Models.Client.ChannelPostRef post, string reason, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
post ChannelPostRef
The channel and original timeline sequence identifying the post.
reason System.String
The reason for reporting the post.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task
A task that completes when the operation finishes.
Exceptions
System.OperationCanceledException
The caller cancels the operation or a component or relay lifetime ends.
System.TimeoutException
An SDK request deadline expires. Data contains operation and timeoutSeconds; InnerException preserves the cancellation cause.
System.InvalidOperationException
This component or a required component has not completed initialization. The local device or its signing keys are unavailable, or no active relay can provide the required session.
System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.
System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.
RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.
System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.
System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.
System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.
Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.
System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.
System.NotSupportedException
The hosting relay does not advertise channel hosting.
System.ArgumentException
The post reference or report reason violates protocol constraints.
ChannelManager.SynchronizeAsync(ChannelRef, CancellationToken) Method
Performs and awaits one incremental synchronization pass for the specified channel's descriptor and forward timeline.
public System.Threading.Tasks.Task<Meshline.Models.Client.ResourceSyncStatus> SynchronizeAsync(Meshline.Models.Client.ChannelRef channel, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
channel ChannelRef
The resource to synchronize.
cancellationToken System.Threading.CancellationToken
Cancels this call, including queued work; already committed data is retained.
Returns
System.Threading.Tasks.Task<ResourceSyncStatus>
This pass's completion snapshot, including any processing block such as missing group keys.
Exceptions
System.ArgumentException
The resource identifier is invalid.
System.InvalidOperationException
This component or a required component is not initialized, or authorization is unavailable.
System.ObjectDisposedException
The component has been disposed.
System.OperationCanceledException
The call, component lifetime, or relay request was canceled.
System.Net.Http.HttpRequestException
Relay discovery or a network request fails.
RelayException
The relay rejects synchronization.
System.IO.InvalidDataException
Remote or stored data fails validation.
Microsoft.Data.Sqlite.SqliteException
Local storage cannot be accessed.
Microsoft.EntityFrameworkCore.DbUpdateException
Persisting synchronized data fails.
Remarks
Requires initialization and usable authorization, but not StartAsync. Every call performs a fresh pass,
serialized with background synchronization. Reads forward from local progress until the relay reports no more pages;
this does not freeze a remote sequence at call time or guarantee complete historical data.
Transport and storage failures update synchronization status and propagate to the caller.
ChannelManager.UnfollowAsync(ChannelRef, CancellationToken) Method
Clears a channel's local following state and requests subscription refresh.
public System.Threading.Tasks.Task UnfollowAsync(Meshline.Models.Client.ChannelRef channel, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
channel ChannelRef
The channel identifier and hosting relay.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task
A task that completes when the operation finishes.
Exceptions
System.OperationCanceledException
The operation observes cancellation of cancellationToken. Disposal of the component or relay session can also cancel pending work.
System.InvalidOperationException
This component or a required component has not completed initialization.
System.ObjectDisposedException
This component or a component used by the operation has been disposed.
Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.
Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.
Remarks
Unfollowing stops future followed-channel synchronization after refresh; it does not delete retained local posts.
ChannelManager.UpdateChannelAsync(ChannelRef, ChannelUpdate, CancellationToken) Method
Publishes a new channel descriptor revision with the supplied field updates as the channel owner.
public System.Threading.Tasks.Task<Meshline.Models.Client.ChannelInfo> UpdateChannelAsync(Meshline.Models.Client.ChannelRef channel, Meshline.Models.Client.ChannelUpdate update, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
channel ChannelRef
The channel identifier and hosting relay.
update ChannelUpdate
The field assignments and deletions to apply; unspecified fields remain unchanged.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Returns
System.Threading.Tasks.Task<ChannelInfo>
The channel information after publishing the descriptor update.
Exceptions
System.OperationCanceledException
The caller cancels the operation or a component or relay lifetime ends.
System.TimeoutException
An SDK request deadline expires. Data contains operation and timeoutSeconds; InnerException preserves the cancellation cause.
System.InvalidOperationException
This component or a required component has not completed initialization. The local device or its signing keys are unavailable, or no active relay can provide the required session. The channel is closed, a previous operation is unfinished, or the accepted post or expected descriptor revision is no longer available.
System.ObjectDisposedException
This component, a required component, or the shared relay pool has been disposed.
System.Net.Http.HttpRequestException
Relay discovery, authentication, or the HTTP request fails at the transport layer.
RelayException
The relay rejects the operation with a structured protocol error that is not handled by this method.
System.IO.InvalidDataException
Relay evidence or returned state is missing, inconsistent, or fails protocol validation.
System.Text.Json.JsonException
A stored or received protocol document cannot be serialized or deserialized.
System.Text.DecoderFallbackException
A relay response contains bytes that are not valid UTF-8.
Microsoft.Data.Sqlite.SqliteException
The SQLite database cannot be opened or a database command fails, for example because the schema is not migrated or the file is locked.
Microsoft.EntityFrameworkCore.DbUpdateException
Persisting local changes fails, including database constraint or optimistic-concurrency failures.
System.Security.Cryptography.CryptographicException
The local device key cannot be validated against its certificate, or cryptographic signing or verification fails.
System.NotSupportedException
The hosting relay does not advertise channel hosting.
System.ArgumentException
The channel metadata, post content, or field update violates protocol constraints.
System.UnauthorizedAccessException
The current account is not permitted to publish or modify this channel resource.
System.OverflowException
Incrementing the known descriptor revision exceeds the range of a signed 64-bit integer.
Events
ChannelManager.ChannelChanged Event
Occurs when a channel's locally known descriptor changes.
public event EventHandler<ChannelInfo>? ChannelChanged;
Event Type
System.EventHandler<ChannelInfo>
ChannelManager.FollowChanged Event
Occurs when a channel's local following state changes.
public event EventHandler<ChannelFollowChangedEventArgs>? FollowChanged;
Event Type
System.EventHandler<ChannelFollowChangedEventArgs>
ChannelManager.SyncStatusChanged Event
Occurs after the local synchronization snapshot changes. Handlers must not synchronously wait for component operations.
public event EventHandler<ResourceSyncStatus>? SyncStatusChanged;
Event Type
System.EventHandler<ResourceSyncStatus>
ChannelManager.TimelineChanged Event
Occurs when channel post changes are committed to the local timeline.
public event EventHandler<ChannelTimelineChangedEventArgs>? TimelineChanged;