Exemplo n.º 1
0
            public BuildResultFile ExtractSymbolsFile()
            {
                if (IsLocalDependency)
                {
                    string LocalDependencyPathSym = ToSymbolsPathFromLibraryPath(LocalDependencyPath);
                    return(new BuildResultFile {
                        Name = Path.GetFileName(LocalDependencyPathSym), Data = File.ReadAllBytes(LocalDependencyPathSym)
                    });
                }
                string           prefile = ToSymbolsPathFromLibraryPath(art.FileName);
                AssemblyArtifact symart  = pckg.FindArtefactByName(prefile);

                if (symart == null)
                {
                    prefile = ToSymbolsPathFromLibraryPath(art.FileName, "mdb");
                    symart  = pckg.FindArtefactByName(prefile);
                    if (symart == null)
                    {
                        return(null);
                    }
                }
                return(new BuildResultFile {
                    Name = prefile, Data = pckg.ExtractArtefact(symart)
                });
            }
Exemplo n.º 2
0
        private void RegisterWorkingDirAssemblys()
        {
            string[] files = Directory.GetFiles(Environment.CurrentDirectory);
            foreach (string fpath in files)
            {
                AssemblyArtifact art = AssemblyArtifact.Get(fpath);
                if (art.IsAssembly)
                {
                    if (AssemblyControlList.ContainsKey(art.Name))
                    {
                        if (AssemblyControlList[art.Name].art.Version != art.Version)// this can't be happen
                        {
                            throw new Exception();
                        }
                    }
                    else
                    {
                        PackageAndArtefactLibLinked l = new PackageAndArtefactLibLinked
                        {
                            IsLocalDependency = true,
                            art = art,
                            LocalDependencyPath = fpath
                        };

                        AssemblyControlList.Add(art.Name, l);
                    }
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// This check for conflicts between all modules references <br/>
        ///     this thing about that you don't have isolation to make sure all modules are up to date
        /// </summary>
        /// <param name="binPackage"></param>
        public void RegisterAssets(AssemblyVersionPackage binPackage)
        {
            for (int i = 0; i < binPackage.Version.Artefacts.Count; i++)
            {
                AssemblyArtifact art = binPackage.Version.Artefacts[i];
                if (art.IsAssembly)
                {
                    if (AssemblyControlList.ContainsKey(art.Name))
                    {
                        if (AssemblyControlList[art.Name].art.Version != art.Version)
                        {
                            throw new Exception(string.Format("The module {0} has incosistent dependency '{1}'({2}) with other modules - '{3}'({4}): {5}",
                                                              binPackage.ContainerName, art.Name, art.Version,
                                                              AssemblyControlList[art.Name].art.Name, AssemblyControlList[art.Name].art.Version,
                                                              AssemblyControlList[art.Name].IsLocalDependency ? "WorkingDir Dependency" : "Module dependency"));
                        }
                    }
                    else
                    {
                        PackageAndArtefactLibLinked l = new PackageAndArtefactLibLinked
                        {
                            art  = art,
                            pckg = binPackage
                        };

                        AssemblyControlList.Add(art.Name, l);
                    }
                }
            }
        }