shinyorg / shiny

.NET Framework for Backgrounding & Device Hardware Services (iOS, Android, & Catalyst)
https://shinylib.net
MIT License
1.43k stars 227 forks source link

[Feature Request]:HttpTransferStore not Found in MAUI #1480

Closed Parthu11 closed 2 months ago

Parthu11 commented 2 months ago

Summary

in xamarinforms i am using HttpTransferStore for store file in remote server but in .NET MAUI not found this library in shiny

What should I use instead of HttpTransferStore? add on this one not found in shiny IsDirectConnect What should I use instead of ?

public async Task Run(JobInfo jobInfo, CancellationToken cancelToken) { var request = await repository.Get(jobInfo.Identifier); if (null == request) { await StopJob(jobInfo); return; }

API Changes

public async Task Run(JobInfo jobInfo, CancellationToken cancelToken) { var request = await repository.Get(jobInfo.Identifier); if (null == request) { await StopJob(jobInfo); return; }

    if (request.UseMeteredConnection || this.connectivity.IsDirectConnect())
    {
        var transfer = request.IsUpload ? await this.Upload(request, cancelToken) : await this.Download(request, cancelToken);
        switch (transfer.Status)
        {
            case HttpTransferState.Completed:
                await this.StopJob(jobInfo);
                await this.tdelegate.OnCompleted(transfer);
                break;

            case HttpTransferState.Error:
                await this.StopJob(jobInfo);
                if (transfer.Exception != null)
                {
                    await this.tdelegate.OnError(transfer, transfer.Exception);
                }
                else
                {
                    await this.tdelegate.OnError(transfer, new NotImplementedException());
                }
                break;
        }
    }
}

async Task StopJob(JobInfo jobInfo)
{
    jobInfo.Repeat = false;
     repository.Remove<HttpTransferStore>(jobInfo.Identifier);
}

Intended Use Case

using for datastore in maui

Code of Conduct

aritchie commented 2 months ago

Do not flood both the forum and issues trying to get something.

I don't have a single clue what you're asking for here?

Parthu11 commented 2 months ago

why not found in shiny.net.http ( HttpTransferStore) file in MAUI

aritchie commented 2 months ago

Because it is an internal class that I didn't need anymore in v3. Why are you even working with the internals like this?

Parthu11 commented 2 months ago

HttpTransferStore need used for store files on a remote server

aritchie commented 2 months ago

HttpTransferStore need used for store files on a remote server

No. It is not.

THIS IS NOT A SUPPORT FORUM.

SAMPLES: https://github.com/shinyorg/shiny/tree/dev/samples/Sample.Maui/HttpTransfers DOCS: https://shinylib.net/client/httptransfers/