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.

21 lines
556 B

2 years ago
using Connected.Services;
namespace Connected.ServiceModel.Client.Net;
internal sealed class SelectUrl : ServiceFunction<ConnectedServerUrlArgs, string>
{
private const string Root = "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(),
};
}
}