コード例 #1
0
 public InterfaceFigure(InterfaceNode interfacenode)
     : base(interfacenode, type)
 {
     base.color = new Cairo.Color(1.0, 1.0, 0.7, 0.3);
 }
コード例 #2
0
ファイル: RoslynRun.cs プロジェクト: pranavr93/MDClassDiagram
 private static InterfaceNode GetInterfaceNode(InterfaceDeclarationSyntax EachInterface)
 {
     InterfaceNode interfacenode = new InterfaceNode();
     interfacenode.Name = EachInterface.Identifier.ToString();
     foreach (var member in EachInterface.Members)
     {
         if (member is MethodDeclarationSyntax)
         {
             MethodDeclarationSyntax method = member as MethodDeclarationSyntax;
             interfacenode.Methods.Add(GetMethodNode(method));
         }
         else if (member is PropertyDeclarationSyntax)
         {
             PropertyDeclarationSyntax property = member as PropertyDeclarationSyntax;
             interfacenode.Properties.Add(GetPropertyNode(property));
         }
         else if (member is EventFieldDeclarationSyntax)
         {
             EventFieldDeclarationSyntax evnt = member as EventFieldDeclarationSyntax;
             interfacenode.Events.Add(GetEventNode(evnt));
         }
     }
     if (EachInterface.BaseList != null)
     {
         var res = model.GetDeclaredSymbol(EachInterface);
         foreach(var item in res.Interfaces)
         {
             interfacenode.Implementations.Add(item.ToString());
         }
     }
     return interfacenode;
 }