private static StructDeclarationSyntax AddInterface(this StructDeclarationSyntax @this,
     String @interfaceTypeName)
 {
     return @this.AddInterface(
         SyntaxFactory.SimpleBaseType(
             SyntaxFactory.ParseTypeName(
                 SyntaxFactory.Identifier(@interfaceTypeName).ToFullString())));
 }
コード例 #2
0
ファイル: Namespace.cs プロジェクト: laymain/CodeDomUtils
 public static CodeNamespace AddInterface(this CodeNamespace codeNamespace, string interfaceName)
 {
     return codeNamespace.AddInterface(new CodeTypeDeclaration(interfaceName) { IsInterface = true });
 }
コード例 #3
0
 public static ClassStatement Implements(this ClassStatement classStatement, CsType interfaceType)
 {
     classStatement.AddInterface(interfaceType);
     return classStatement;
 }