module sphinxext.csharp_parser

Inheritance diagram of pyensae.sphinxext.csharp_parser

Short summary

module pyensae.sphinxext.csharp_parser

Parses :epkg:`C# `.

source on GitHub

Classes

class

truncated documentation

CSharpClass

:epkg:`C#` class.

CSharpDomain

Base class of a :epkg:`C#` domaon.

CSharpElement

Base class of a :epkg:`C#` element.

CSharpMethod

:epkg:`C#` function.

CSharpParser

Parses :epkg:`C#`.

CSharpParserListenerSignatures

:epkg:`C#` Listener

CSharpType

:epkg:`C#` type

CSharpVariable

:epkg:`C#` variables

Methods

method

truncated documentation

__init__

__init__

__init__

__init__

__init__

__init__

constructor

__init__

__init__

__str__

usual

__str__

usual

__str__

usual

__str__

usual

__str__

usual

__str__

usual

enter_body

Adds an element.

enterNamespace_body

enterNamespace_declaration

enterNamespace_or_type_name

enumerate_all_children

Enumerate all children.

exit_body

Adds an element.

exitNamespace_body

exitNamespace_declaration

exitNamespace_or_type_name

get_code

parse

Returns all elements of codes inside a string.

stack_element

Adds an element.

Documentation

Parses :epkg:`C# `.

source on GitHub

class pyensae.sphinxext.csharp_parser.CSharpClass(domain, name, methods=None, constants=None, params=None, private='public', static=False, doc=None, source=None, code=None, **kwargs)[source]

Bases: pyensae.sphinxext.csharp_parser.CSharpElement

:epkg:`C#` class.

source on GitHub

Parameters
  • domain – domain

  • name – name

  • methods – methods

  • constants – constants

  • private – private, public or protected

  • static – static or not

  • doc – documentation

  • source – source file

  • code – code

source on GitHub

__init__(domain, name, methods=None, constants=None, params=None, private='public', static=False, doc=None, source=None, code=None, **kwargs)[source]
Parameters
  • domain – domain

  • name – name

  • methods – methods

  • constants – constants

  • private – private, public or protected

  • static – static or not

  • doc – documentation

  • source – source file

  • code – code

source on GitHub

__str__()[source]

usual

source on GitHub

class pyensae.sphinxext.csharp_parser.CSharpDomain(domain, name, doc=None, source=None, code=None, **kwargs)[source]

Bases: pyensae.sphinxext.csharp_parser.CSharpElement

Base class of a :epkg:`C#` domaon.

source on GitHub

Parameters
  • domain – domain

  • name – name

  • doc – documentation

  • source – source file

  • code – code

source on GitHub

__init__(domain, name, doc=None, source=None, code=None, **kwargs)[source]
Parameters
  • domain – domain

  • name – name

  • doc – documentation

  • source – source file

  • code – code

source on GitHub

__str__()[source]

usual

source on GitHub

class pyensae.sphinxext.csharp_parser.CSharpElement(domain, name, doc=None, source=None, code=None, **kwargs)[source]

Bases: object

Base class of a :epkg:`C#` element.

source on GitHub

Parameters
  • domain – domain

  • name – name

  • doc – documentation

  • source – source file

  • code – code

source on GitHub

__init__(domain, name, doc=None, source=None, code=None, **kwargs)[source]
Parameters
  • domain – domain

  • name – name

  • doc – documentation

  • source – source file

  • code – code

source on GitHub

__str__()[source]

usual

source on GitHub

_kinds = {'class', 'domain', 'method', 'type'}
_privates = {'private', 'protected', 'public'}
class pyensae.sphinxext.csharp_parser.CSharpMethod(domain, name, rtype, params=None, private='public', static=False, doc=None, source=None, code=None, **kwargs)[source]

Bases: pyensae.sphinxext.csharp_parser.CSharpElement

:epkg:`C#` function.

source on GitHub

Parameters
  • domain – domain

  • name – name

  • rtype – return type

  • private – private, public or protected

  • static – static or not

  • parameters – parameters

  • doc – documentation

  • code – code

source on GitHub

__init__(domain, name, rtype, params=None, private='public', static=False, doc=None, source=None, code=None, **kwargs)[source]
Parameters
  • domain – domain

  • name – name

  • rtype – return type

  • private – private, public or protected

  • static – static or not

  • parameters – parameters

  • doc – documentation

  • code – code

source on GitHub

__str__()[source]

usual

source on GitHub

class pyensae.sphinxext.csharp_parser.CSharpParser[source]

Bases: object

Parses :epkg:`C#`.

source on GitHub

source on GitHub

__init__()[source]

source on GitHub

parse(code, source=None)[source]

Returns all elements of codes inside a string.

Parameters
  • code – string

  • source – source

Returns

list of CSharpElement

source on GitHub

class pyensae.sphinxext.csharp_parser.CSharpParserListenerSignatures(parser, source)[source]

Bases: pyensae.languages.CSharpParserListener.CSharpParserListener

:epkg:`C#` Listener

source on GitHub

constructor

Parameters

parser – parser used to parse the code

source on GitHub

__init__(parser, source)[source]

constructor

Parameters

parser – parser used to parse the code

source on GitHub

enter_body()[source]

Adds an element.

source on GitHub

enumerate_all_children(ctx)[source]

Enumerate all children.

Parameters

ctx – context

Returns

iterator

source on GitHub

exit_body()[source]

Adds an element.

source on GitHub

stack_element(el)[source]

Adds an element.

source on GitHub

class pyensae.sphinxext.csharp_parser.CSharpType(domain, name, typ, doc=None, source=None, code=None, **kwargs)[source]

Bases: pyensae.sphinxext.csharp_parser.CSharpVariable

:epkg:`C#` type

source on GitHub

Parameters
  • domain – domain

  • name – name

  • typ – type

  • source – source file

  • code – code

source on GitHub

__init__(domain, name, typ, doc=None, source=None, code=None, **kwargs)[source]
Parameters
  • domain – domain

  • name – name

  • typ – type

  • source – source file

  • code – code

source on GitHub

__str__()[source]

usual

source on GitHub

class pyensae.sphinxext.csharp_parser.CSharpVariable(domain, name, typ, value=None, doc=None, source=None, code=None, **kwargs)[source]

Bases: pyensae.sphinxext.csharp_parser.CSharpElement

:epkg:`C#` variables

source on GitHub

Parameters
  • domain – domain

  • name – name

  • typ – type

  • value – default value if it exists

  • doc – documentation

  • source – source file

  • code – code

source on GitHub

__init__(domain, name, typ, value=None, doc=None, source=None, code=None, **kwargs)[source]
Parameters
  • domain – domain

  • name – name

  • typ – type

  • value – default value if it exists

  • doc – documentation

  • source – source file

  • code – code

source on GitHub

__str__()[source]

usual

source on GitHub