MetaBrainz.Common 3.0.0

This package has a SemVer 2.0.0 package version: 3.0.0+github.37.1.
dotnet add package MetaBrainz.Common --version 3.0.0                
NuGet\Install-Package MetaBrainz.Common -Version 3.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MetaBrainz.Common" Version="3.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MetaBrainz.Common --version 3.0.0                
#r "nuget: MetaBrainz.Common, 3.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MetaBrainz.Common as a Cake Addin
#addin nuget:?package=MetaBrainz.Common&version=3.0.0

// Install MetaBrainz.Common as a Cake Tool
#tool nuget:?package=MetaBrainz.Common&version=3.0.0                

MetaBrainz.Common Build Status NuGet Package Version

General helper classes, for use by the other MetaBrainz.* packages.

Debugging

The HttpUtils class provides a TraceSource that can be used to configure debug output; its name is MetaBrainz.Common.HttpUtils.

Configuration

In Code

In code, you can enable tracing like follows:

// Use the default switch, turning it on.
HttpUtils.TraceSource.Switch.Level = SourceLevels.All;

// Alternatively, use your own switch so multiple things can be
// enabled/disabled at the same time.
var mySwitch = new TraceSwitch("MyAppDebugSwitch", "All");
HttpUtils.TraceSource.Switch = mySwitch;

// By default, there is a single listener that writes trace events to
// the debug output (typically only seen in an IDE's debugger). You can
// add (and remove) listeners as desired.
var listener = new ConsoleTraceListener {
  Name = "MyAppConsole",
  TraceOutputOptions = TraceOptions.DateTime | TraceOptions.ProcessId,
};
HttpUtils.TraceSource.Listeners.Clear();
HttpUtils.TraceSource.Listeners.Add(listener);
In Configuration

Starting from .NET 7 your application can also be set up to read tracing configuration from the application configuration file. To do so, the application needs to add the following to its startup code:

System.Diagnostics.TraceConfiguration.Register();

(Provided by the System.Configuration.ConfigurationManager package.)

The application config file can then have a system.diagnostics section where sources, switches and listeners can be configured.

<configuration>
  <system.diagnostics>
    <sharedListeners>
      <add name="console" type="System.Diagnostics.ConsoleTraceListener" traceOutputOptions="DateTime,ProcessId" />
    </sharedListeners>
    <sources>
      <source name="MetaBrainz.Common.HttpUtils" switchName="MetaBrainz.Common.HttpUtils">
        <listeners>
          <add name="console" />
          <add name="http-log" type="System.Diagnostics.TextWriterTraceListener" initializeData="http-utils.log" />
        </listeners>
      </source>
    </sources>
    <switches>
      <add name="MetaBrainz.Common.HttpUtils" value="All" />
    </switches>
  </system.diagnostics>
</configuration>

Release Notes

These are available on GitHub.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on MetaBrainz.Common:

Package Downloads
MetaBrainz.MusicBrainz

This package provides classes for accessing the MusicBrainz web services (lookup, search and OAuth2).

MetaBrainz.Common.Json

This package provides JSON-related utility classes used by other MetaBrainz packages.

MetaBrainz.MusicBrainz.CoverArt

This package provides classes for accessing the CoverArt Archive (CAA), enabling the retrieval of cover art for music releases based on their MusicBrainz ID.

MetaBrainz.ListenBrainz

This package provides classes for accessing the ListenBrainz API (v1).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0 65,741 12/18/2023
2.1.0 126 12/15/2023
2.0.0 134 12/9/2023
1.0.0 86,126 1/27/2022