public MemberOptionTree(IEnumerable <Type> types, MemberFilter memberFilter, TypeFilter memberTypeFilter, ActionDirection direction) : base(new GUIContent("Member")) { favorites = new Favorites(this); codebase = Codebase.Subset(types, memberFilter.Configured(), memberTypeFilter?.Configured(false)); this.direction = direction; expectingBoolean = memberTypeFilter?.ExpectsBoolean ?? false; }
private static IEnumerable <object> FindAllSettingsStubs() { // Include all custom operators for the formula unit and generic math units // Also include all user defined conversion operators for the conversion utility var codebaseSubset = Codebase.Subset(Codebase.settingsTypes, TypeFilter.Any.Configured(), MemberFilter.Any.Configured()); codebaseSubset.Cache(); return(codebaseSubset.members .Select(m => m.info) .OfType <MethodInfo>() .Where(m => m.IsOperator() || m.IsUserDefinedConversion()) .Cast <object>()); }