.NET Runtime

repository·main·Indexed 12 days ago

https://github.com/dotnet/runtime

The foundation for building and running applications across all supported platforms, containing the source code for the .NET runtime, class libraries, and the shared host (dotnet muxer). Includes technical documentation on CoreCLR design, garbage collection, the type system, and the IL trimmer (illink), as well as guidelines for coding, API stability, and performance.

Tokens
389.8K
Snippets
844
Records
1.7K
Agent score
96%

What's inside .NET

  1. Overview of the dotnet-pgo tool

    main

    The dotnet-pgo tool is an experimental utility used to post-process application trace data (collected via dotnet trace or perfview) into profile data files. These files are used for two primary purposes:

    1. Producing .jittrace files: These allow you to time-shift JIT compilation from later in the application process to earlier in the process.
    2. Producing .mibc files: These serve as input for the crossgen2 tool to assist in Ahead-of-Time (AOT) compilation.

    Requirement: The tool requires MethodDetails events. These are natively produced by the .NET 5.0 runtime or can be obtained by modifying the .NET Core 3 runtime to produce them.

  2. Overview of Microsoft.Extensions.Logging.Abstractions

    main

    The Microsoft.Extensions.Logging.Abstractions package provides the core interfaces and types for logging in .NET. It defines the contracts that logging implementations must follow. While this package contains the abstractions, the actual logging logic is provided by implementations found in Microsoft.Extensions.Logging or other third-party logging providers.

    Key types you will interact with include:

    • ILogger: The primary interface for logging messages.
    • ILoggerFactory: Used to create ILogger instances.
    • ILogger<TCategoryName>: A generic version of ILogger that automatically categorizes logs by the type name.
    • LogLevel: An enumeration defining the severity of the log message.
    • LoggerMessage: Used for high-performance logging.
    • NullLogger: A no-op implementation used when no logging is desired.
  3. Overview of Microsoft.Extensions.Diagnostics.Abstractions

    main

    The Microsoft.Extensions.Diagnostics.Abstractions package provides the core interfaces and abstractions for diagnostics in .NET. These abstractions allow developers to define diagnostic instrumentation that can be implemented by concrete classes in Microsoft.Extensions.Diagnostics or other specialized diagnostics packages.

    Key features include support for metrics instrumentation, allowing you to define how measurements are captured and listened to within an application.

  4. Overview of System.Security.Cryptography capabilities

    main

    The System.Security.Cryptography assembly provides the core cryptographic support for .NET. It includes implementations and wrappers for various cryptographic primitives and protocols, such as:

    • Hashing: e.g., SHA256
    • Symmetric-key message authentication: e.g., HMACSHA256
    • Symmetric-key encryption: e.g., Aes
    • Symmetric-key authenticated encryption: e.g., AesGcm
    • Asymmetric (public/private key) cryptography: e.g., RSA, ECDsa, or ECDiffieHellman
    • X.509 public-key certificates: e.g., X509Certificate2

    Detailed API documentation is available at the official Microsoft Learn sites for System.Security.Cryptography and X509Certificates.

  5. Overview of System.Security.Cryptography.Pkcs

    main

    The System.Security.Cryptography.Pkcs assembly provides support for non-primitive cryptographic operations using ASN.1 BER/CER/DER encoded values. It implements various standards from the Public Key Cryptography Standards (PKCS) specification set, as well as IETF RFC 3161 timestamp tokens.

    Key capabilities include:

    • Cryptographic Message Syntax (CMS/PKCS#7): Using SignedCms and EnvelopedCms.
    • Private Key Information Syntax (PKCS#8): Using Pkcs8PrivateKeyInfo.
    • Personal Information Exchange (PFX/PKCS#12): Using Pkcs12Info and Pkcs12Builder.
    • Object Attributes (PKCS#9): Using types derived from Pkcs9AttributeObject.
    • Timestamping: Using Rfc3161TimestampToken (RFC 3161).

    Note that basic cryptographic primitives (like PKCS#1 RSA) and certificate request formats (PKCS#10) are located in the System.Security.Cryptography and System.Security.Cryptography.X509Certificates assemblies respectively.

  6. What is cDAC (Data Contract Reader)?

    main
    cDAC is a managed implementation of the diagnostic data access layer. It allows diagnostic tools to inspect the state of a .NET runtime process by reading memory through well-defined data contracts. This approach removes the requirement for version-matched native DAC/DBI libraries, as it relies on managed contract interfaces rather than native binary compatibility.