Exemplo n.º 1
0
        public void LoadState(B2SaveState state)
        {
            AccountId = state.AccountId;
            AuthorizationToken = state.AuthorizationToken;
            MinimumPartSize = state.MinimumPartSize;

            ApiUri = state.ApiUrl;
            DownloadUri = state.DownloadUrl;

            BucketCache.LoadState(state.BucketCache);
        }
Exemplo n.º 2
0
        public void CopyTo(B2SaveState other)
        {
            other.AccountId = AccountId;
            other.AuthorizationToken = AuthorizationToken;
            other.MinimumPartSize = MinimumPartSize;

            other.ApiUrl = ApiUrl;
            other.DownloadUrl = DownloadUrl;

            other.BucketCache = BucketCache.ToList();
        }
Exemplo n.º 3
0
        public B2SaveState SaveState()
        {
            B2SaveState res = new B2SaveState();

            res.AccountId = AccountId;
            res.AuthorizationToken = AuthorizationToken;
            res.MinimumPartSize = MinimumPartSize;

            res.ApiUrl = ApiUri;
            res.DownloadUrl = DownloadUri;

            res.BucketCache = BucketCache.GetState();

            return res;
        }