protected override void GenerateMethod (CodeMemberMethod method,
CodeTypeDeclaration declaration)
{
if (IsCurrentDelegate || IsCurrentEnum) {
return;
}
TextWriter output = Output;
OutputAttributes (method.CustomAttributes, null, false);
OutputAttributes (method.ReturnTypeCustomAttributes,
"return: ", false);
MemberAttributes attributes = method.Attributes;
if (!IsCurrentInterface) {
if (method.PrivateImplementationType == null) {
OutputMemberAccessModifier (attributes);
OutputVTableModifier (attributes);
OutputMemberScopeModifier (attributes);
}
} else {
OutputVTableModifier (attributes);
}
OutputType (method.ReturnType);
output.Write (' ');
CodeTypeReference privateType = method.PrivateImplementationType;
if (privateType != null) {
output.Write (privateType.BaseType);
output.Write ('.');
}
output.Write (GetSafeName (method.Name));
#if NET_2_0
GenerateGenericsParameters (method.TypeParameters);
#endif
output.Write ('(');
OutputParameters (method.Parameters);
output.Write (')');
#if NET_2_0
GenerateGenericsConstraints (method.TypeParameters);
#endif
if (IsAbstract (attributes) || declaration.IsInterface)
output.WriteLine (';');
else {
OutputStartBrace ();
++Indent;
GenerateStatements (method.Statements);
--Indent;
output.WriteLine ('}');
}
}