MattEqualsCoder.MSURandomizer.Library 1.2.4

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package MattEqualsCoder.MSURandomizer.Library --version 1.2.4
NuGet\Install-Package MattEqualsCoder.MSURandomizer.Library -Version 1.2.4
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="MattEqualsCoder.MSURandomizer.Library" Version="1.2.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MattEqualsCoder.MSURandomizer.Library --version 1.2.4
#r "nuget: MattEqualsCoder.MSURandomizer.Library, 1.2.4"
#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 MattEqualsCoder.MSURandomizer.Library as a Cake Addin
#addin nuget:?package=MattEqualsCoder.MSURandomizer.Library&version=1.2.4

// Install MattEqualsCoder.MSURandomizer.Library as a Cake Tool
#tool nuget:?package=MattEqualsCoder.MSURandomizer.Library&version=1.2.4

MSU Randomizer Library

This is a library which can be included in other .NET projects for looking up MSUs and randomly selecting them or shuffling the tracks.

Instructions

Step 1. Create an settings file

The application uses a YAML settings file to manage base application settings. You can find the base YAML file here. These are loaded by default, and you provide another YAMl file with overrides. You can view all possible settings here.

Step 2. Add Services to the Service Collection

The MSU Randomizer utilizes DependencyInjection. You'll need to configure a logger, then add both the UI and regular Library services to your Service Collection.

_host = Host.CreateDefaultBuilder(e.Args)
.ConfigureLogging(...})
.ConfigureServices(services =>
{
    services.AddMsuRandomizerServices();
})
.Start();

Step 3. Initialize the MSU Randomizer Library

You can use the IMsuRandomizerInitialization service to setup all required services. Create a MsuRandomizerInitializationRequest, giving it either a stream or path to your settings YAML file from step 1, then call the IMsuRandomizerInitializationService's Initialize function.

var settingsStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("MSURandomizer.settings.yaml");
if (settingsStream == null)
{
    throw new InvalidOperationException("Missing RandomizerSettings stream");
}

var msuInitializationRequest = new MsuRandomizerInitializationRequest
{
    MsuAppSettingsStream = settingsStream,
};

_host.Services.GetRequiredService<IMsuRandomizerInitializationService>().Initialize(msuInitializationRequest);

Step 4. Use any of the serviices as you'd like

Once setup, you can use any of the MSU Randomizer library services to look up MSUs, randomize MSUs, and more.

  • IMsuRandomizerInitializationService - Service used to initialize the most critical services for loading the app settings and MSU types.
  • IMsuAppSettingsService - Used to load the MSU Randomizer app settings for global options.
  • IMsuUserOptionsService - Used to load and save options for the user, such as the MSU directories and MSU overrides.
  • IMsuTypeService - Loads MSU types from a folder of JSON configs or a single JSON config.
  • IMsuLookupService - Scans folders for MSUs and automatically determines the correct MSU type for them.
  • IMsuDetailsService - Loads or saves the MSU details for a given MSU from YAML or JSON.
  • IMsuSelectorService - Used for randomly selecting/shuffling MSUs and saving them.
  • IMsuUiFactory - Factory for generating UI elements to display to the user.
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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 was computed.  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.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on MattEqualsCoder.MSURandomizer.Library:

Package Downloads
MattEqualsCoder.MSURandomizer.UI

UI library with windows and controls for randomizing MSUs.

MattEqualsCoder.MSURandomizer.Avalonia

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.0-rc.3 110 5/8/2024
2.1.0-rc.2 67 5/6/2024
2.0.1-rc.2 53 5/1/2024
2.0.0-rc.15 63 4/30/2024
2.0.0-rc.14 112 4/24/2024
2.0.0-rc.13 80 4/22/2024
2.0.0-rc.10 67 4/4/2024
2.0.0-rc.9 56 4/4/2024
2.0.0-rc.8 56 4/3/2024
2.0.0-rc.3 46 4/2/2024
2.0.0-beta.1 109 3/12/2024
1.2.4 134 1/19/2024
1.2.2 423 10/31/2023
1.2.1 242 9/24/2023
1.2.0 208 8/29/2023
1.1.6 93 8/29/2023
1.1.5 108 8/29/2023
1.1.4 125 8/27/2023
1.1.3 130 8/27/2023
1.1.2 117 8/27/2023
1.1.0 125 8/25/2023
1.0.1 138 8/21/2023
1.0.1-rc.1 58 8/21/2023
1.0.0 114 8/21/2023
0.9.8 121 8/1/2023