Browse Source

fixed the example

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1982 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Markus Palme 19 years ago
parent
commit
fa229d846e
  1. 9
      samples/NRefactoryExample/WrapperGeneratorVisitor.cs

9
samples/NRefactoryExample/WrapperGeneratorVisitor.cs

@ -56,10 +56,11 @@ namespace NRefactoryExample @@ -56,10 +56,11 @@ namespace NRefactoryExample
(method.Name.StartsWith("Is") || method.Name.StartsWith("Get")))
{
// replace the method with a property
PropertyDeclaration prop = new PropertyDeclaration(method.Name,
method.TypeReference,
method.Modifier,
method.Attributes);
PropertyDeclaration prop = new PropertyDeclaration(method.Modifier,
method.Attributes,
method.Name,
null);
prop.TypeReference = method.TypeReference;
prop.GetRegion = new PropertyGetRegion(method.Body, null);
typeDeclaration.Children[i] = prop;
}

Loading…
Cancel
Save