You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System.Collections.Immutable;
|
|
|
|
|
using Connected.Annotations;
|
|
|
|
|
using Connected.Net.Endpoints;
|
|
|
|
|
|
|
|
|
|
namespace Connected.Net.Server;
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
[ServiceUrl(Routes.Server)]
|
|
|
|
|
public interface IEndpointServer
|
|
|
|
|
{
|
|
|
|
|
event EventHandler<ServerChangedArgs>? Changed;
|
|
|
|
|
event EventHandler Initialized;
|
|
|
|
|
|
|
|
|
|
Task Initialize(ImmutableList<IEndpoint> endpoints, CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
|
|
[ServiceMethod(ServiceMethodVerbs.Post)]
|
|
|
|
|
Task NotifyServerChange(ServerProposalArgs args);
|
|
|
|
|
|
|
|
|
|
[ServiceMethod(ServiceMethodVerbs.Get)]
|
|
|
|
|
Task<bool> IsServer();
|
|
|
|
|
|
|
|
|
|
string ServerUrl { get; }
|
|
|
|
|
}
|