Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

InventoryHelper.FindObjectByGuid can't find libraries #429

@AlexandrSurkov

Description

@AlexandrSurkov

Hello!

In 2010 I and Igor Kiselev made PKStudio - IDE for exploreing .NetMF porting kit.

Main features that it allows now are:

  • View Solution as Tree;
  • Edit source files;
  • Compile projects from IDE without any console manipulations;
  • Jump from compile errors to their possitions in source file editor;
  • View Libraries, Library Categories, Features, Processors, Assemblies as Trees;
  • View it's properties in Property Grid and in Forms;
  • Search Libraries, Library Categories and Features by Name;
  • Verify components references and GUIDs;
  • View realtionships between components in graphic diagrams;
  • Convert MFProjects to fully compiling and linking Keil uVision project

I move it to GitHub and now trying to update it to support .NetMF 4.4 repo.

I found that code into netmf-interpreter\CLR\Tools\PlatformDesigner\ComponentObjectModel\InventoryHelper.cs in line 188 leeds that FindObjectByGuid method can't find any librar:

 private object FindObjectByGuid(string guid, IList list)
        {
            string key = guid.ToLower();
            if (m_guidToObjectHash.ContainsKey(key))
            {
                object o = m_guidToObjectHash[key];

                if (!list.Contains(o))
                {
                    Console.WriteLine("Warning the list does not contain a global libary");
                }

                return o;
            }

            if (!(list is List<Library>))
            {
                foreach (object o in list)
                {
                    try
                    {
                        string g = (o.GetType().GetProperty("Guid").GetValue(o, null) as string).ToLower();

                        if (0 == string.Compare(g, key, true))
                        {
                            m_guidToObjectHash[key] = o;
                            return o;
                        }
                    }
                    catch
                    {
                    }
                }
            }

            return null;
        }

InventoryHelper.cs was changed in 4.2 comm brunch. But changes was not moved to dev.

So can InventoryHelper.cs be changed like in in 4.2 comm brunch?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions