Example #1
0
 /// <summary>
 /// Clears all static cached data
 /// </summary>
 private static void ClearCache()
 {
     ContextToUnfoldedComponents.Clear();
     ContextToComponentMemberSearch.Clear();
     ContextToColoredBoxStyles.Clear();
     ContextToComponentInfos.Clear();
 }
Example #2
0
        internal static string[] GetComponentMemberSearch(string contextName, int totalNumberOfComponents)
        {
            if (!ContextToComponentMemberSearch.TryGetValue(contextName, out var componentMemberSearch))
            {
                componentMemberSearch = new string[totalNumberOfComponents];
                for (var i = 0; i < componentMemberSearch.Length; i++)
                {
                    componentMemberSearch[i] = string.Empty;
                }

                ContextToComponentMemberSearch.Add(contextName, componentMemberSearch);
            }

            return(componentMemberSearch);
        }
        private static string[] GetComponentMemberSearch(IEntity entity)
        {
            if (!ContextToComponentMemberSearch.TryGetValue(entity.ContextInfo.name, out var componentMemberSearch))
            {
                componentMemberSearch = new string[entity.TotalComponents];
                for (var i = 0; i < componentMemberSearch.Length; i++)
                {
                    componentMemberSearch[i] = string.Empty;
                }

                ContextToComponentMemberSearch.Add(entity.ContextInfo.name, componentMemberSearch);
            }

            return(componentMemberSearch);
        }