Ejemplo n.º 1
0
        // Any interdependency between catalog resource is handled like CFIR (for complex ones) or CTPT (for simple ones)
        private void Catlg_removeRefdCatlgs(List <IResourceConnection> connections)
        {
            Diagnostics.Log("Catlg_removeRefdCatlgs");
            IList <TGIBlock> ltgi = (IList <TGIBlock>)base.Resource["TGIBlocks"].Value;
            AResourceKey     rk;
            int i, j, index, count = ltgi.Count;

            for (i = 0; i < count; i++)
            {
                rk = ltgi[i];
                if (Enum.IsDefined(typeof(CatalogType), rk.ResourceType) && rk.Instance != base.originalKey.Instance)
                {
                    index = -1;
                    for (j = 0; j < connections.Count && index < 0; j++)
                    {
                        if (connections[j].OriginalChildKey.Equals(rk))
                        {
                            index = j;
                        }
                    }
                    if (index >= 0)
                    {
                        string key = ResourceGraph.PrintRKRef(connections[index].OriginalChildKey,
                                                              connections[index].AbsolutePath);
                        Diagnostics.Log("Catlg_removeRefdCatlgs: Removed " + key);
                        connections.RemoveAt(index);
                    }
                }
            }
        }