Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Support of .NET 8.0 Features Including Primary Constructors and File-Scoped Namespaces #2361

Open
DLozanoNavas opened this issue Apr 12, 2024 · 1 comment
Labels
A-Highlighting Area: Code colored syntax highlighting C-enhancement Category: Enhancement or feature request

Comments

@DLozanoNavas
Copy link

Problem

Hello MDBook Team,

I hope this message finds you well. I am currently utilizing MDBook for documenting our .NET projects and have recently started exploring the new features available in .NET 8.0. Notably, the introduction of Primary Constructors and File-Scoped Namespaces offers a streamlined and concise syntax that enhances the readability and maintainability of .NET applications.

However, I've encountered an issue where MDBook does not seem to support these new .NET 8.0 syntax features. Specifically, the Primary Constructors allow defining classes with a much cleaner syntax, and File-Scoped Namespaces reduce the nesting within files, both of which are beneficial for code clarity and organization.

Example

Here's an example demonstrating the new syntax:

using FenixAlliance.ABM.Models.DTOs.Components.Global.Currencies;
using FenixAlliance.ABM.SeedWork.ValueTypes;
using Microsoft.JSInterop;

namespace FenixAlliance.ABS.SDK.Clients;

public class ForexServiceClient(IJSRuntime jsRuntime) : PortalClient(jsRuntime)
{
    // Methods implementation
}

This syntax simplifies class definitions significantly and is something we are adopting widely within our projects.

Request

Could the MDBook team consider adding support for these .NET 8.0 features? This enhancement would greatly benefit .NET developers who are using MDBook for their documentation needs, allowing them to utilize all the latest language features without compatibility issues in their documentation workflow.

Thank you for considering this request. I am looking forward to your positive response and am happy to assist with testing or providing further examples if needed.

Best regards,

Daniel Lozano

Proposed Solution

No response

Notes

No response

@DLozanoNavas DLozanoNavas added the C-enhancement Category: Enhancement or feature request label Apr 12, 2024
@ehuss
Copy link
Contributor

ehuss commented Apr 12, 2024

Unfortunately we are stuck on an older version of the syntax highlighting library we use. We'll either need to resolve #1622 or switch to a new library such as #1652.

@ehuss ehuss added the A-Highlighting Area: Code colored syntax highlighting label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Highlighting Area: Code colored syntax highlighting C-enhancement Category: Enhancement or feature request
Projects
None yet
Development

No branches or pull requests

2 participants