diff --git a/tools/metadoc.py b/tools/metadoc.py
index eb4b6e9d2..670341ca3 100644
--- a/tools/metadoc.py
+++ b/tools/metadoc.py
@@ -80,5 +80,5 @@ class DoxygenCppTranslator(Translator):
class SandcastleCSharpTranslator(Translator):
def _tag_as_brief(self, lines):
if len(lines) > 0:
- lines[0] = '' + lines[0]
- lines[-1] = lines[-1] + ''
+ lines.insert(0, '')
+ lines.append('')
diff --git a/wrappers/csharp/abstractapi.py b/wrappers/csharp/abstractapi.py
index 15b412484..2757c62a4 100644
--- a/wrappers/csharp/abstractapi.py
+++ b/wrappers/csharp/abstractapi.py
@@ -455,8 +455,8 @@ class CParser(object):
'linphone_vcard_get_belcard'] # manualy wrapped
self.classBl = ['LpConfig',
- 'LinphonePlayer',
- 'LinphoneCoreVTable',] # temporarly blacklisted
+ 'LinphoneCoreVTable',
+ 'LinphonePlayer'] # temporarly blacklisted
# list of classes that must be concidered as refcountable even if
# they are no ref()/unref() methods
@@ -585,6 +585,7 @@ class CParser(object):
name = EnumName()
name.from_camel_case(nameStr, namespace=self.namespace.name)
enum = Enum(name)
+ enum.briefDescription = cenum.briefDoc
self.namespace.add_child(enum)
for cEnumValue in cenum.values:
@@ -618,6 +619,7 @@ class CParser(object):
name = ClassName()
name.from_camel_case(cclass.name, namespace=self.namespace.name)
_class = Class(name)
+ _class.briefDescription = cclass.briefDoc
_class.refcountable = self._class_is_refcountable(cclass)
for cproperty in cclass.properties.values():
@@ -685,6 +687,7 @@ class CParser(object):
raise Error('{0} is not a listener'.format(cclass.name))
listener = Interface(name)
+ listener.briefDescription = cclass.briefDoc
for property in cclass.properties.values():
if property.name != 'user_data':
@@ -732,6 +735,7 @@ class CParser(object):
raise BlacklistedException('{0} is blacklisted'.format(name.to_c()));
method = Method(name, type=type)
+ method.briefDescription = cfunction.briefDoc
method.deprecated = cfunction.deprecated
method.returnType = self.parse_type(cfunction.returnArgument)
diff --git a/wrappers/csharp/genwrapper.py b/wrappers/csharp/genwrapper.py
index d9d17727a..4f8e85d4b 100644
--- a/wrappers/csharp/genwrapper.py
+++ b/wrappers/csharp/genwrapper.py
@@ -25,10 +25,12 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', 'tools'))
print sys.path
import genapixml as CApi
import abstractapi as AbsApi
+import metadoc
class CsharpTranslator(object):
def __init__(self):
self.ignore = []
+ self.docTranslator = metadoc.SandcastleCSharpTranslator()
def init_method_dict(self):
methodDict = {}
@@ -180,6 +182,8 @@ 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['has_impl'] = genImpl
if genImpl:
methodDict['impl'] = {}
@@ -427,6 +431,7 @@ 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['values'] = []
i = 0
lastValue = None
diff --git a/wrappers/csharp/wrapper_impl.mustache b/wrappers/csharp/wrapper_impl.mustache
index 404f1d579..9d3f4ae88 100644
--- a/wrappers/csharp/wrapper_impl.mustache
+++ b/wrappers/csharp/wrapper_impl.mustache
@@ -191,6 +191,11 @@ namespace Linphone
#region Enums
{{#enums}}
{{#enum}}
+ {{#doc}}
+ {{#lines}}
+ /// {{{line}}}
+ {{/lines}}
+ {{/doc}}
public enum {{enumName}}
{
{{#values}}
@@ -273,6 +278,11 @@ namespace Linphone
{{/has_second_prototype}}
{{#has_property}}
+ {{#doc}}
+ {{#lines}}
+ /// {{{line}}}
+ {{/lines}}
+ {{/doc}}
{{property_static}}public {{{property_return}}} {{property_name}}
{
{{#has_getter}}
@@ -340,6 +350,11 @@ namespace Linphone
{{/has_property}}
{{#has_impl}}
{{#impl}}
+ {{#doc}}
+ {{#lines}}
+ /// {{{line}}}
+ {{/lines}}
+ {{/doc}}
public {{static}}{{override}}{{{type}}} {{name}}({{{args}}})
{
{{#is_string}}