Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b393ee5

Browse files
author
Barton Cline
committed
* Added DocStringAttribute in order to be able to tag Methods, Delegates and Properties for __doc__ creation in ClassManager.CreateClass()
1 parent 927bbf1 commit b393ee5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pythonnet/src/runtime/interop.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ namespace Python.Runtime {
2121
// when moving to new Python versions.
2222
//=======================================================================
2323

24+
[Serializable()]
25+
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Delegate | AttributeTargets.Property)]
26+
public class DocStringAttribute : Attribute {
27+
public DocStringAttribute(string docStr) {
28+
DocString = docStr;
29+
}
30+
public string DocString {
31+
get { return docStr; }
32+
set { docStr = value; }
33+
}
34+
private string docStr;
35+
}
36+
2437
[Serializable()]
2538
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Delegate)]
2639
internal class PythonMethodAttribute : Attribute {

0 commit comments

Comments
 (0)