Commit eaa9e7b1 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Added doc on each enum value in C# wrapper

parent 2b0db027
......@@ -182,7 +182,7 @@ class CsharpTranslator(object):
methodDict = {}
methodDict['prototype'] = "static extern {return} {name}({params});".format(**methodElems)
methodDict['doc'] = self.docTranslator.translate(method.briefDescription) if method.briefDescription is not None else None
methodDict['doc'] = self.docTranslator.translate(method.briefDescription)
methodDict['has_impl'] = genImpl
if genImpl:
......@@ -431,13 +431,14 @@ class CsharpTranslator(object):
def translate_enum(self, enum):
enumDict = {}
enumDict['enumName'] = enum.name.to_camel_case()
enumDict['doc'] = self.docTranslator.translate(enum.briefDescription) if enum.briefDescription is not None else None
enumDict['doc'] = self.docTranslator.translate(enum.briefDescription)
enumDict['values'] = []
i = 0
lastValue = None
for enumValue in enum.values:
enumValDict = {}
enumValDict['name'] = enumValue.name.to_camel_case()
enumValDict['doc'] = self.docTranslator.translate(enumValue.briefDescription)
if type(enumValue.value) is int:
lastValue = enumValue.value
enumValDict['value'] = str(enumValue.value)
......@@ -460,7 +461,7 @@ class CsharpTranslator(object):
classDict = {}
classDict['className'] = _class.name.to_camel_case()
classDict['isLinphoneFactory'] = _class.name.to_camel_case() == "Factory"
classDict['doc'] = self.docTranslator.translate(_class.briefDescription) if _class.briefDescription is not None else None
classDict['doc'] = self.docTranslator.translate(_class.briefDescription)
classDict['dllImports'] = []
islistenable = _class.listenerInterface is not None
......
......@@ -218,6 +218,11 @@ namespace Linphone
public enum {{enumName}}
{
{{#values}}
{{#doc}}
{{#lines}}
/// {{{line}}}
{{/lines}}
{{/doc}}
{{name}} = {{value}},
{{/values}}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment