Skip to content

Commit

Permalink
rename inherited members to base members
Browse files Browse the repository at this point in the history
  • Loading branch information
miloush committed Sep 12, 2023
1 parent bf76abf commit f7b9bb5
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
16 changes: 8 additions & 8 deletions ILSpy/FilterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FilterSettings : INotifyPropertyChanged
public FilterSettings(XElement element)
{
this.ShowApiLevel = (ApiVisibility?)(int?)element.Element("ShowAPILevel") ?? ApiVisibility.PublicAndInternal;
this.ShowApiInherited = (bool?)element.Element("ShowAPIInherited") ?? false;
this.ShowBaseApi = (bool?)element.Element("ShowBaseAPI") ?? false;
this.Language = Languages.GetLanguage((string)element.Element("Language"));
this.LanguageVersion = Language.LanguageVersions.FirstOrDefault(v => v.Version == (string)element.Element("LanguageVersion"));
if (this.LanguageVersion == default(LanguageVersion))
Expand All @@ -59,7 +59,7 @@ public XElement SaveAsXml()
return new XElement(
"FilterSettings",
new XElement("ShowAPILevel", (int)this.ShowApiLevel),
new XElement("ShowAPIInherited", this.ShowApiInherited),
new XElement("ShowBaseAPI", this.ShowBaseApi),
new XElement("Language", this.Language.Name),
new XElement("LanguageVersion", this.LanguageVersion?.Version)
);
Expand Down Expand Up @@ -144,15 +144,15 @@ public bool ApiVisAll {
}
}

bool showApiInherited;
bool showBaseApi;

public bool ShowApiInherited {
get { return showApiInherited; }
public bool ShowBaseApi {
get { return showBaseApi; }
set {
if (showApiInherited != value)
if (showBaseApi != value)
{
showApiInherited = value;
OnPropertyChanged(nameof(ShowApiInherited));
showBaseApi = value;
OnPropertyChanged(nameof(ShowBaseApi));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ILSpy/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<MenuItem Header="{x:Static properties:Resources.Show_publiconlyTypesMembers}" IsCheckable="True" IsChecked="{Binding Workspace.ActiveTabPage.FilterSettings.ApiVisPublicOnly}" />
<MenuItem Header="{x:Static properties:Resources.Show_internalTypesMembers}" IsCheckable="True" IsChecked="{Binding Workspace.ActiveTabPage.FilterSettings.ApiVisPublicAndInternal}" />
<MenuItem Header="{x:Static properties:Resources.Show_allTypesAndMembers}" IsCheckable="True" IsChecked="{Binding Workspace.ActiveTabPage.FilterSettings.ApiVisAll}" />
<MenuItem Header="{x:Static properties:Resources.Show_inheritedMembers}" IsCheckable="True" IsChecked="{Binding Workspace.ActiveTabPage.FilterSettings.ShowApiInherited}" />
<MenuItem Header="{x:Static properties:Resources.Show_baseMembers}" IsCheckable="True" IsChecked="{Binding Workspace.ActiveTabPage.FilterSettings.ShowBaseApi}" />
<Separator/>
<MenuItem Header="{x:Static properties:Resources.Theme}" ItemsSource="{x:Static themes:ThemeManager.AllThemes}">
<MenuItem.ItemContainerStyle>
Expand Down
6 changes: 3 additions & 3 deletions ILSpy/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ILSpy/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -901,8 +901,8 @@ Do you want to continue?</value>
<data name="Show_allTypesAndMembers" xml:space="preserve">
<value>Show _all types and members</value>
</data>
<data name="Show_inheritedMembers" xml:space="preserve">
<value>Show in_herited members</value>
<data name="Show_baseMembers" xml:space="preserve">
<value>Show _base members</value>
</data>
<data name="Show_internalTypesMembers" xml:space="preserve">
<value>Show public, private and _internal</value>
Expand Down
4 changes: 2 additions & 2 deletions ILSpy/Properties/Resources.zh-Hans.resx
Original file line number Diff line number Diff line change
Expand Up @@ -872,8 +872,8 @@
<data name="Show_allTypesAndMembers" xml:space="preserve">
<value>显示所有类型和成员(_A)</value>
</data>
<data name="Show_inheritedMembers" xml:space="preserve">
<value>显示继承成员(_H)</value>
<data name="Show_baseMembers" xml:space="preserve">
<value>显示基成员(_B)</value>
</data>
<data name="Show_internalTypesMembers" xml:space="preserve">
<value>显示内部类型和成员(_I)</value>
Expand Down
14 changes: 7 additions & 7 deletions ILSpy/TreeNodes/TypeTreeNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public override FilterResult Filter(FilterSettings settings)
protected override void OnFilterSettingsChanged()
{
base.OnFilterSettingsChanged();
if (loadedInheritedMembers != null && loadedInheritedMembers != FilterSettings.ShowApiInherited)
if (loadedInheritedMembers != null && loadedInheritedMembers != FilterSettings.ShowBaseApi)
{
this.Children.Clear();
if (IsVisible)
Expand All @@ -106,12 +106,12 @@ protected override void LoadChildren()
this.Children.Add(new BaseTypesTreeNode(ParentAssemblyNode.LoadedAssembly.GetPEFileOrNull(), TypeDefinition));
if (!TypeDefinition.IsSealed)
this.Children.Add(new DerivedTypesTreeNode(ParentAssemblyNode.AssemblyList, TypeDefinition));
loadedInheritedMembers = FilterSettings.ShowApiInherited;
IEnumerable<ITypeDefinition> nestedTypes = GetMembers(TypeDefinition, t => t.NestedTypes, FilterSettings.ShowApiInherited);
IEnumerable<IField> fields = GetMembers(TypeDefinition, t => t.Fields, FilterSettings.ShowApiInherited);
IEnumerable<IProperty> properties = GetMembers(TypeDefinition, t => t.Properties, FilterSettings.ShowApiInherited);
IEnumerable<IEvent> events = GetMembers(TypeDefinition, t => t.Events, FilterSettings.ShowApiInherited);
IEnumerable<IMethod> methods = GetMembers(TypeDefinition, t => t.Methods, FilterSettings.ShowApiInherited);
loadedInheritedMembers = FilterSettings.ShowBaseApi;
IEnumerable<ITypeDefinition> nestedTypes = GetMembers(TypeDefinition, t => t.NestedTypes, FilterSettings.ShowBaseApi);
IEnumerable<IField> fields = GetMembers(TypeDefinition, t => t.Fields, FilterSettings.ShowBaseApi);
IEnumerable<IProperty> properties = GetMembers(TypeDefinition, t => t.Properties, FilterSettings.ShowBaseApi);
IEnumerable<IEvent> events = GetMembers(TypeDefinition, t => t.Events, FilterSettings.ShowBaseApi);
IEnumerable<IMethod> methods = GetMembers(TypeDefinition, t => t.Methods, FilterSettings.ShowBaseApi);
foreach (var nestedType in nestedTypes.OrderBy(t => t.Name, NaturalStringComparer.Instance))
{
this.Children.Add(new TypeTreeNode(nestedType, ParentAssemblyNode));
Expand Down

0 comments on commit f7b9bb5

Please sign in to comment.