Пример #1
0
		private async Task SynchronizeAsync(string localSigName, string localSigSigName, string remoteSigName,
											string remoteSigSigName, CancellationToken token)
		{
			using (var needListGenerator = new NeedListGenerator(localSignatureRepository, remoteCacheSignatureRepository))
			{
				var source = new RemoteSignaturePartialAccess(synchronizationServerClient, remoteSigName);
				var seed = new SignaturePartialAccess(localSigName, localSignatureRepository);
				var needList = needListGenerator.CreateNeedsList(SignatureInfo.Parse(localSigSigName),
																 SignatureInfo.Parse(remoteSigSigName), token);

				using (var output = remoteCacheSignatureRepository.CreateContent(remoteSigName))
				{
					await NeedListParser.ParseAsync(source, seed, output, needList, token);
				}
			}
		}
Пример #2
0
        private async Task SynchronizeAsync(string localSigName, string localSigSigName, string remoteSigName,
                                            string remoteSigSigName, CancellationToken token)
        {
            using (var needListGenerator = new NeedListGenerator(localSignatureRepository, remoteCacheSignatureRepository))
            {
                var source   = new RemoteSignaturePartialAccess(synchronizationServerClient, remoteSigName);
                var seed     = new SignaturePartialAccess(localSigName, localSignatureRepository);
                var needList = needListGenerator.CreateNeedsList(SignatureInfo.Parse(localSigSigName),
                                                                 SignatureInfo.Parse(remoteSigSigName), token);

                using (var output = remoteCacheSignatureRepository.CreateContent(remoteSigName))
                {
                    await NeedListParser.ParseAsync(source, seed, output, needList, token);
                }
            }
        }