private static PropertyDeclarationSyntax CreatePropertyDeclaration_Group(GroupEntry group) { var type = group.Type; var identifier = group.Identifier; var comment = SyntaxFactoryUtils.Comment("// Group: {0}", group.Name); return(SyntaxFactoryUtils.PropertyDeclaration(type, identifier, SyntaxFactoryUtils.ObjectCreationExpression(type)).WithTrailingTrivia(comment)); }
private static PropertyDeclarationSyntax CreatePropertyDeclaration_Module(ModuleEntry module) { var type = module.Type; var identifier = module.Identifier; var comment = SyntaxFactoryUtils.Comment("// Module: {0}", module.Name); return(SyntaxFactoryUtils.PropertyDeclaration(type, identifier, SyntaxFactoryUtils.ObjectCreationExpression(type)).WithTrailingTrivia(comment)); }
private static PropertyDeclarationSyntax CreatePropertyDeclaration_Namespace(NamespaceEntry @namespace) { var type = @namespace.Type; var identifier = @namespace.Identifier; var comment = SyntaxFactoryUtils.Comment("// Namespace: {0}", @namespace.Name); return(SyntaxFactoryUtils.PropertyDeclaration(type, identifier, SyntaxFactoryUtils.ObjectCreationExpression(type)).WithTrailingTrivia(comment)); }
private static PropertyDeclarationSyntax CreatePropertyDeclaration_Type(TypeEntry type) { var type_ = type.Type; var identifier = type.Identifier; var comment = SyntaxFactoryUtils.Comment("// Type: {0}", type.Name); return(SyntaxFactoryUtils.PropertyDeclaration("TypeArchNode", identifier, SyntaxFactoryUtils.TypeOfExpression(type_)).WithTrailingTrivia(comment)); }