Exemplo n.º 1
0
 /// <summary>
 /// Clears all static cached data
 /// </summary>
 private static void ClearCache()
 {
     ContextToUnfoldedComponents.Clear();
     ContextToComponentMemberSearch.Clear();
     ContextToColoredBoxStyles.Clear();
     ContextToComponentInfos.Clear();
 }
Exemplo n.º 2
0
        internal static bool[] GetUnfoldedComponents(string contextName, int totalNumberOfComponents)
        {
            if (!ContextToUnfoldedComponents.TryGetValue(contextName, out var unfoldedComponents))
            {
                unfoldedComponents = new bool[totalNumberOfComponents];
                for (var i = 0; i < unfoldedComponents.Length; i++)
                {
                    unfoldedComponents[i] = true;
                }

                ContextToUnfoldedComponents.Add(contextName, unfoldedComponents);
            }

            return(unfoldedComponents);
        }
        private static bool[] GetUnfoldedComponents(IEntity entity)
        {
            if (!ContextToUnfoldedComponents.TryGetValue(entity.ContextInfo.name, out var unfoldedComponents))
            {
                unfoldedComponents = new bool[entity.TotalComponents];
                for (var i = 0; i < unfoldedComponents.Length; i++)
                {
                    unfoldedComponents[i] = true;
                }

                ContextToUnfoldedComponents.Add(entity.ContextInfo.name, unfoldedComponents);
            }

            return(unfoldedComponents);
        }