// IconHost is optional so that we don't fail if we're in tests
 public UnityYamlExtraGroupingRulesProvider(UnitySceneProcessor sceneProcessor = null, UnitySolutionTracker unitySolutionTracker = null, IconHost iconHost = null)
 {
     if (unitySolutionTracker != null && unitySolutionTracker.IsUnityProject.HasValue() && unitySolutionTracker.IsUnityProject.Value &&
         iconHost != null && sceneProcessor != null)
     {
         ExtraRules = new IRiderUsageGroupingRule[]
         {
             new GameObjectUsageGroupingRule(sceneProcessor, iconHost),
             new ComponentUsageGroupingRule(iconHost)
         };
     }
     else
     {
         ExtraRules = new IRiderUsageGroupingRule[0];
     }
 }
Exemplo n.º 2
0
 // IconHost is optional so that we don't fail if we're in tests
 public UnityYamlExtraGroupingRulesProvider(MetaFileGuidCache metaFileGuidCache = null, UnitySolutionTracker unitySolutionTracker = null, IconHost iconHost = null)
 {
     if (unitySolutionTracker != null && unitySolutionTracker.IsUnityProject.HasValue() && unitySolutionTracker.IsUnityProject.Value &&
         iconHost != null && metaFileGuidCache != null)
     {
         ExtraRules = new IRiderUsageGroupingRule[]
         {
             new GameObjectUsageGroupingRule(iconHost),
             new ComponentUsageGroupingRule(metaFileGuidCache, iconHost)
         };
     }
     else
     {
         ExtraRules = new IRiderUsageGroupingRule[0];
     }
 }