Add %csattributes for adding C# attributes to enum values, see docs for example.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11691 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4ebb9b0db2
commit
5eeab68e21
4 changed files with 34 additions and 0 deletions
|
|
@ -15,6 +15,8 @@ public:
|
|||
int GlobalFunction(int myInt) { return myInt; }
|
||||
%}
|
||||
|
||||
//%include "enumsimple.swg"
|
||||
//%include "enumtypesafe.swg"
|
||||
|
||||
// Test the attributes feature
|
||||
%csattributes MoreStations::MoreStations() "[InterCity1]"
|
||||
|
|
@ -25,6 +27,8 @@ int GlobalFunction(int myInt) { return myInt; }
|
|||
%csattributes Wales "[InterCity6]"
|
||||
%csattributes Paddington() "[InterCity7]"
|
||||
%csattributes DidcotParkway "[InterCity8]"
|
||||
%csattributes MoreStations::Cardiff "[System.ComponentModel.Description(\"Cardiff city station\")]"
|
||||
%csattributes Swansea "[System.ComponentModel.Description(\"Swansea city station\")]"
|
||||
|
||||
%typemap(csattributes) MoreStations "[Eurostar1]"
|
||||
%typemap(csattributes) MoreStations::Wales "[Eurostar2]"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue