From 460aea6a8b64a398eb4ccc0dba82050127871231 Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Mon, 17 Aug 2015 13:30:55 -0700 Subject: [PATCH] Stub out XML parsing --- autoapi/mappers/dotnet.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/autoapi/mappers/dotnet.py b/autoapi/mappers/dotnet.py index 01ac583..13185fe 100644 --- a/autoapi/mappers/dotnet.py +++ b/autoapi/mappers/dotnet.py @@ -219,7 +219,7 @@ class DotNetPythonMapper(PythonMapperBase): # Optional self.fullname = obj.get('fullName') - self.summary = obj.get('summary', '') + self.summary = self.parse_xml(obj.get('summary', '')) self.parameters = [] self.items = obj.get('items', []) self.children_strings = obj.get('children', []) @@ -243,7 +243,7 @@ class DotNetPythonMapper(PythonMapperBase): self.parameters.append({ 'name': param.get('id'), 'type': param.get('type'), - 'desc': param.get('description', '') + 'desc': self.parse_xml(param.get('description', '')) }) self.returns = syntax.get('return', None) @@ -253,6 +253,7 @@ class DotNetPythonMapper(PythonMapperBase): self.inheritance = [DotNetClass({'uid': name, 'name': name}) for name in obj.get('inheritance', [])] + def __str__(self): return '<{cls} {id}>'.format(cls=self.__class__.__name__, id=self.id) @@ -325,6 +326,14 @@ class DotNetPythonMapper(PythonMapperBase): '''Same as above, return the truncated name instead''' return self.ref_name.split('.')[-1] + def parse_xml(self, text): + """ + Parse XML content for references and other syntax. + Ref: https://msdn.microsoft.com/en-us/library/5ast78ax.aspx + """ + # Don't do this for now + return text + class DotNetNamespace(DotNetPythonMapper): type = 'namespace'