本文整理汇总了C#中MemberDeclarationSyntax.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# MemberDeclarationSyntax.GetType方法的具体用法?C# MemberDeclarationSyntax.GetType怎么用?C# MemberDeclarationSyntax.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MemberDeclarationSyntax
的用法示例。
在下文中一共展示了MemberDeclarationSyntax.GetType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: procMemberDeclarationSyntax
private void procMemberDeclarationSyntax(MemberDeclarationSyntax syntax, int indentCount)
{
if (syntax is NamespaceDeclarationSyntax)
{
procNamespaceDeclarationSyntax((NamespaceDeclarationSyntax)syntax, indentCount);
}
else if (syntax is EnumDeclarationSyntax)
{
ProcEnumDeclarationSyntax(syntax as EnumDeclarationSyntax, indentCount);
}
else if (syntax is EnumMemberDeclarationSyntax)
{
ProcEnumMemberDeclarationSyntax(syntax as EnumMemberDeclarationSyntax, indentCount);
}
else if (syntax is StructDeclarationSyntax)
{
ProcStructDeclarationSyntax(syntax as StructDeclarationSyntax, indentCount);
}
else if (syntax is InterfaceDeclarationSyntax)
{
ProcInterfaceDeclarationSyntax(syntax as InterfaceDeclarationSyntax, indentCount);
}
else if (syntax is ClassDeclarationSyntax)
{
procClassDeclarationSyntax((ClassDeclarationSyntax)syntax, indentCount);
}
else if (syntax is ConstructorDeclarationSyntax)
{
procConstructorDeclarationSyntax(syntax as ConstructorDeclarationSyntax, indentCount);
}
else if (syntax is MethodDeclarationSyntax)
{
procMethodDeclarationSyntax(syntax as MethodDeclarationSyntax, indentCount);
}
else if (syntax is PropertyDeclarationSyntax)
{
procPropertyDeclarationSyntax(syntax as PropertyDeclarationSyntax, indentCount);
}
else if (syntax is FieldDeclarationSyntax)
{
ProcFieldDeclarationSyntax(syntax as FieldDeclarationSyntax, indentCount);
}
else
{
throw new Exception("Unknown type : " + syntax.GetType());
}
}