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 Connected.Services;
|
|
|
|
|
|
|
|
|
|
namespace Connected.ServiceModel.Client.Net;
|
|
|
|
|
|
|
|
|
|
internal sealed class SelectUrl : ServiceFunction<ConnectedServerUrlArgs, string>
|
|
|
|
|
{
|
|
|
|
|
private const string Root = "https://localhost:61599";//"https://connected.tompit.com";
|
|
|
|
|
protected override async Task<string?> OnInvoke()
|
|
|
|
|
{
|
|
|
|
|
await Task.CompletedTask;
|
|
|
|
|
|
|
|
|
|
return Arguments.Kind switch
|
|
|
|
|
{
|
|
|
|
|
ConnectedUrlKind.Root => Root,
|
|
|
|
|
ConnectedUrlKind.FileSystem => $"{Root}/services/fileSystem",
|
|
|
|
|
ConnectedUrlKind.TableStorage => $"{Root}/services/tables",
|
|
|
|
|
_ => throw new NotImplementedException(),
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|