Exemple #1
0
        public void InitLabelCache(UnityEngine.Object[] assets)
        {
            HashSet <UnityEngine.Object> objectSet = new HashSet <UnityEngine.Object>((IEnumerable <UnityEngine.Object>)assets);

            if (this.m_CurrentAssetsSet == null || !this.m_CurrentAssetsSet.SetEquals((IEnumerable <UnityEngine.Object>)objectSet))
            {
                List <string> all;
                List <string> partial;
                this.GetLabelsForAssets(assets, out all, out partial);
                this.m_AssetLabels = new PopupList.InputData()
                {
                    m_CloseOnSelection   = false,
                    m_AllowCustom        = true,
                    m_OnSelectCallback   = new PopupList.OnSelectCallback(this.AssetLabelListCallback),
                    m_MaxCount           = 15,
                    m_SortAlphabetically = true
                };
                Dictionary <string, float> allLabels = AssetDatabase.GetAllLabels();
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                LabelGUI.\u003CInitLabelCache\u003Ec__AnonStorey92 cacheCAnonStorey92 = new LabelGUI.\u003CInitLabelCache\u003Ec__AnonStorey92();
                using (Dictionary <string, float> .Enumerator enumerator = allLabels.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        // ISSUE: reference to a compiler-generated field
                        cacheCAnonStorey92.pair = enumerator.Current;
                        // ISSUE: reference to a compiler-generated field
                        PopupList.ListElement listElement = this.m_AssetLabels.NewOrMatchingElement(cacheCAnonStorey92.pair.Key);
                        // ISSUE: reference to a compiler-generated field
                        if ((double)listElement.filterScore < (double)cacheCAnonStorey92.pair.Value)
                        {
                            // ISSUE: reference to a compiler-generated field
                            listElement.filterScore = cacheCAnonStorey92.pair.Value;
                        }
                        // ISSUE: reference to a compiler-generated method
                        listElement.selected = all.Any <string>(new Func <string, bool>(cacheCAnonStorey92.\u003C\u003Em__164));
                        // ISSUE: reference to a compiler-generated method
                        listElement.partiallySelected = partial.Any <string>(new Func <string, bool>(cacheCAnonStorey92.\u003C\u003Em__165));
                    }
                }
            }
            this.m_CurrentAssetsSet = objectSet;
            this.m_CurrentChanged   = false;
        }
 public void InitLabelCache(UnityEngine.Object[] assets)
 {
   HashSet<UnityEngine.Object> objectSet = new HashSet<UnityEngine.Object>((IEnumerable<UnityEngine.Object>) assets);
   if (this.m_CurrentAssetsSet == null || !this.m_CurrentAssetsSet.SetEquals((IEnumerable<UnityEngine.Object>) objectSet))
   {
     List<string> all;
     List<string> partial;
     this.GetLabelsForAssets(assets, out all, out partial);
     this.m_AssetLabels = new PopupList.InputData()
     {
       m_CloseOnSelection = false,
       m_AllowCustom = true,
       m_OnSelectCallback = new PopupList.OnSelectCallback(this.AssetLabelListCallback),
       m_MaxCount = 15,
       m_SortAlphabetically = true
     };
     Dictionary<string, float> allLabels = AssetDatabase.GetAllLabels();
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     LabelGUI.\u003CInitLabelCache\u003Ec__AnonStorey92 cacheCAnonStorey92 = new LabelGUI.\u003CInitLabelCache\u003Ec__AnonStorey92();
     using (Dictionary<string, float>.Enumerator enumerator = allLabels.GetEnumerator())
     {
       while (enumerator.MoveNext())
       {
         // ISSUE: reference to a compiler-generated field
         cacheCAnonStorey92.pair = enumerator.Current;
         // ISSUE: reference to a compiler-generated field
         PopupList.ListElement listElement = this.m_AssetLabels.NewOrMatchingElement(cacheCAnonStorey92.pair.Key);
         // ISSUE: reference to a compiler-generated field
         if ((double) listElement.filterScore < (double) cacheCAnonStorey92.pair.Value)
         {
           // ISSUE: reference to a compiler-generated field
           listElement.filterScore = cacheCAnonStorey92.pair.Value;
         }
         // ISSUE: reference to a compiler-generated method
         listElement.selected = all.Any<string>(new Func<string, bool>(cacheCAnonStorey92.\u003C\u003Em__164));
         // ISSUE: reference to a compiler-generated method
         listElement.partiallySelected = partial.Any<string>(new Func<string, bool>(cacheCAnonStorey92.\u003C\u003Em__165));
       }
     }
   }
   this.m_CurrentAssetsSet = objectSet;
   this.m_CurrentChanged = false;
 }