GetLibraryAutoCreate() приватный Метод

private GetLibraryAutoCreate ( string name ) : ILibrary
name string
Результат ILibrary
Пример #1
0
        private static IEnumerable <string> LoadPaoFileIntoRepositoryRaw(XilinxRepository repository, string filepath, string libraryName)
        {
            List <PaoFileModuleElement> fileElements      = LoadInPaoFile(filepath);
            HashSet <string>            librariesToExpand = new HashSet <string>();
            ILibrary libraryLoading = repository.GetLibraryAutoCreate(libraryName);

            // Expand File Elements
            while (fileElements.Count != 0)
            {
                PaoFileModuleElement element = fileElements[0];
                fileElements.RemoveAt(0);

                // Handles libraries outside of current pao library
                // When creating a library, the library needs to be manually loaded also, add it to the manual load collection
                // This check here ensures the library is only ever loaded once
                if (!repository.LibraryExists(element.Library) && string.Compare(libraryName, element.Library) != 0)
                {
                    librariesToExpand.Add(element.Library);
                }
                ILibrary library = repository.GetLibraryAutoCreate(element.Library);

                if (element.LibraryAllReference)
                {
                    // Collect Expected Libraries to Expand
                    libraryLoading.AddReference(repository.GetLibraryAutoCreate(element.Library));
                    if (repository.VerboseOutput)
                    {
                        Console.WriteLine("Library '{0}' referenced into library '{1}'", element.Library, libraryLoading.Name);
                    }
                }
                else
                {
                    IModule module = new GenericModule(library, element.ModuleType, element.Module);
                    module.Execution = element.ExecutionType;
                    library.AddModule(module);

                    // Check non-specific references
                    if (library != libraryLoading)
                    {
                        libraryLoading.AddReference(library);
                        if (repository.VerboseOutput)
                        {
                            Console.WriteLine("Library '{0}' referenced into library '{1}'", library.Name, libraryLoading.Name);
                        }
                    }
                    if (repository.VerboseOutput)
                    {
                        Console.WriteLine("Module loaded into library '{0}', with module name '{1}'", library.Name, module.RelativeLocation);
                    }
                }
            }

            return(librariesToExpand);
        }
Пример #2
0
        private static IEnumerable<string> LoadPaoFileIntoRepositoryRaw(XilinxRepository repository, string filepath, string libraryName)
        {
            List<PaoFileModuleElement> fileElements = LoadInPaoFile(filepath);
            HashSet<string> librariesToExpand = new HashSet<string>();
            ILibrary libraryLoading = repository.GetLibraryAutoCreate(libraryName);

            // Expand File Elements
            while (fileElements.Count != 0)
            {
                PaoFileModuleElement element = fileElements[0];
                fileElements.RemoveAt(0);

                // Handles libraries outside of current pao library
                // When creating a library, the library needs to be manually loaded also, add it to the manual load collection
                // This check here ensures the library is only ever loaded once
                if (!repository.LibraryExists(element.Library) && string.Compare(libraryName, element.Library) != 0)
                {
                    librariesToExpand.Add(element.Library);
                }
                ILibrary library = repository.GetLibraryAutoCreate(element.Library);

                if (element.LibraryAllReference)
                {
                    // Collect Expected Libraries to Expand
                    libraryLoading.AddReference(repository.GetLibraryAutoCreate(element.Library));
                    if (repository.VerboseOutput)
                    {
                        Console.WriteLine("Library '{0}' referenced into library '{1}'", element.Library, libraryLoading.Name);
                    }
                }
                else
                {
                    IModule module = new GenericModule(library, element.ModuleType, element.Module);
                    module.Execution = element.ExecutionType;
                    library.AddModule(module);

                    // Check non-specific references
                    if (library != libraryLoading)
                    {
                        libraryLoading.AddReference(library);
                        if (repository.VerboseOutput)
                        {
                            Console.WriteLine("Library '{0}' referenced into library '{1}'", library.Name, libraryLoading.Name);
                        }
                    }
                    if (repository.VerboseOutput)
                    {
                        Console.WriteLine("Module loaded into library '{0}', with module name '{1}'", library.Name, module.RelativeLocation);
                    }
                }
            }

            return librariesToExpand;
        }