Browse Source

Fixed "insert ctor" refactoring to only show fields and properties of current class (not from base classes).

addin-manager-package-subdirectories
Andreas Weizel 12 years ago
parent
commit
9e7455d212
  1. 2
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/InsertCtorDialog.xaml.cs

2
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/InsertCtorDialog.xaml.cs

@ -64,6 +64,7 @@ namespace CSharpBinding.Refactoring @@ -64,6 +64,7 @@ namespace CSharpBinding.Refactoring
foreach (var f in sourceType.GetFields().Where(field => !field.IsConst
&& field.IsStatic == sourceType.GetDefinition().IsStatic
&& field.DeclaringType.FullName == sourceType.FullName
&& field.ReturnType != null)) {
yield return new PropertyOrFieldWrapper(f) { Index = i };
i++;
@ -72,6 +73,7 @@ namespace CSharpBinding.Refactoring @@ -72,6 +73,7 @@ namespace CSharpBinding.Refactoring
foreach (var p in sourceType.GetProperties().Where(prop => prop.CanSet && !prop.IsIndexer
&& prop.IsAutoImplemented()
&& prop.IsStatic == sourceType.GetDefinition().IsStatic
&& prop.DeclaringType.FullName == sourceType.FullName
&& prop.ReturnType != null)) {
yield return new PropertyOrFieldWrapper(p) { Index = i };
i++;

Loading…
Cancel
Save