本文整理汇总了C#中Link.GetAllRequiredObjects方法的典型用法代码示例。如果您正苦于以下问题:C# Link.GetAllRequiredObjects方法的具体用法?C# Link.GetAllRequiredObjects怎么用?C# Link.GetAllRequiredObjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Link
的用法示例。
在下文中一共展示了Link.GetAllRequiredObjects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: m_worker_DoWork
void m_worker_DoWork(object sender, DoWorkEventArgs e)
{
//if (Directory.Exists(uVisionProjectPath)) Directory.Delete(uVisionProjectPath, true);
OnLogText("start analize");
//ObjectList.Clear();
Directory.CreateDirectory(uVisionProjectPath);
WorkerParams pars = (WorkerParams)e.Argument;
PKParser.Arg.PKArgParser ArgParser = new PKParser.Arg.PKArgParser();
//string DefaultWorkingDir = Directory.GetCurrentDirectory();
//List<UsedItem> LibList = new List<UsedItem>();
//List<UsedItem> SourceList = new List<UsedItem>();
Link Link = new Link("Link", null);
//Собираем дерево проекта
foreach (LogQueueItem item in pars.messages.Values)
{
if (item.Message.ToLower().Contains(ARMLINKPath))
{
Link.ConsoleString = item.Message;
ParamCollection par = ArgParser.Add(item.Message);
if (par == null) throw new Exception(KeilWizardStrings);
Link.ParamCollection = par;
ProjectCollection LocalProjColl = new ProjectCollection();
Project MSBProj = LocalProjColl.LoadProject(item.ProjectBuildContext[item.ProjectBuildContext.Count - 1]);
string LIB_EXT = MSBProj.GetPropertyValue("LIB_EXT");
string OBJ_EXT = MSBProj.GetPropertyValue("OBJ_EXT");
foreach (ArgCollection arg in par.Values)
{
if (arg.Name == "--output")
{
Link.Name = arg[0];
}
}
foreach (string file in par.Files.Values)
{
RequiredLibrary lib = null;
RequiredObject obj = null;
if (Path.GetExtension(file).ToLower() == "." + LIB_EXT.ToLower())
{
lib =new RequiredLibrary(file, Link);
Link.InputLibraries.Add(Link.InputLibraries.Count + 1, lib);
}
if (Path.GetExtension(file).ToLower() == "." + OBJ_EXT.ToLower())
{
obj = new RequiredObject(file, Link);
Link.InputObjects.Add(Link.InputObjects.Count + 1, obj);
}
if (lib != null) Link.AllInputs.Add(Link.AllInputs.Count + 1, lib);
if (obj != null) Link.AllInputs.Add(Link.AllInputs.Count + 1, obj);
}
}
}
ArgParser.Clear();
//Идем по требуемым библиотекам
this.AnalizeInputLibraries(Link.InputLibraries, pars.messages.Values);
//Проверка Crypto.Lib
this.CheckCryptoLib(Link.InputLibraries, pars.messages.Values);
//Идем по всем требуемым файлам
SortedList<int, RequiredObject> ReqObjs = Link.GetAllRequiredObjects();
this.AnalizeInputObjects(ReqObjs, pars.messages.Values);
if (!Link.CheckItems())
{
throw new Exception("Not all Link Items founded");
}
//Собираем необходимые для проекта файлы
List<RequiredLibrary> ReqLib = Link.GetAllSubRequiredLibraries();
foreach (RequiredObject obj in ReqObjs.Values)
{
this.AddObjFile(obj);
}
foreach (RequiredLibrary lib in ReqLib)
{
uVisionProject.AddFile(lib.OutputFileuVision, Path.GetFileNameWithoutExtension(lib.Parent.Name));
}
//Сортируем группы
uVisionProject.SortGroups();
foreach (RequiredLibrary lib in Link.InputLibraries.Values)
{
//.........这里部分代码省略.........