コード例 #1
0
 public NonMemberSymbol(INonMemberEntityDeclarationSyntax declaration)
 {
     InCurrentPackage    = true;
     ContainingNamespace = declaration.ContainingNamespaceName;
     Name   = declaration.Name;
     Symbol = declaration.Symbol;
 }
コード例 #2
0
 private static INonMemberDeclaration BuildNonMemberDeclaration(INonMemberEntityDeclarationSyntax entity)
 {
     return(entity switch
     {
         IClassDeclarationSyntax syn => BuildClass(syn),
         IFunctionDeclarationSyntax syn => BuildFunction(syn),
         _ => throw ExhaustiveMatch.Failed(entity)
     });