예제 #1
0
 public IEnumerable<IAssemblyReferenceExportItem> GetAssemblyReferences(WrapDescriptor descriptor, IWrapRepository repository, IWrapAssemblyClient client)
 {
     return (from dependency in descriptor.Dependencies
             let package = repository.Find(dependency)
             where package != null
             let items = package.Load().GetExport("bin", client.Environment).Items.OfType<IAssemblyReferenceExportItem>()
             select items).SelectMany(x => x);
 }
예제 #2
0
        void NotifyClient(string wrapPath, IWrapAssemblyClient client)
        {
            if (!_notificationClients.ContainsKey(wrapPath))
                return;
            var d = _notificationClients[wrapPath];

            var parsedDescriptor = new WrapDescriptorParser().ParseFile(wrapPath);

            client.WrapAssembliesUpdated(_resolver.GetAssemblyReferences(parsedDescriptor, d.Repository, client));
        }
        void NotifyClient(IFile wrapPath, IWrapAssemblyClient client)
        {
            if (!_notificationClients.ContainsKey(wrapPath.Path))
                return;
            var d = _notificationClients[wrapPath.Path];
            d.Repository.Refresh();
            var parsedDescriptor = new PackageDescriptorReaderWriter().Read(wrapPath);

            client.WrapAssembliesUpdated(_resolver.GetAssemblyReferences(parsedDescriptor, d.Repository, client));
        }
예제 #4
0
        public void ProcessWrapDescriptor(string wrapPath, IWrapRepository wrapsDirectory, IWrapAssemblyClient client)
        {
            if (!File.Exists(wrapPath))
                return;

            var descriptor = GetDescriptor(wrapPath, wrapsDirectory);
            if (client.IsLongRunning)
                descriptor.Clients.Add(client);

            NotifyClient(wrapPath, client);
        }
        public void ProcessWrapDescriptor(IFile wrapFile, IPackageRepository packageRepository, IWrapAssemblyClient client)
        {
            if (!wrapFile.Exists)
                return;

            var descriptor = GetDescriptor(wrapFile, packageRepository);
            if (client.IsLongRunning)
                descriptor.Clients.Add(client);

            NotifyClient(wrapFile, client);
        }
        public void ProcessWrapDescriptor(IFile wrapFile, IPackageRepository packageRepository, IWrapAssemblyClient client)
        {
            if (!wrapFile.Exists)
                return;

            if (packageRepository == null) throw new ArgumentNullException("packageRepository");
            if (client == null) throw new ArgumentNullException("client");

            var descriptor = GetDescriptor(wrapFile, packageRepository);
            if (client.IsLongRunning)
                descriptor.Clients.Add(client);

            NotifyClient(wrapFile, client);
        }