Skip to content

Disunity Managment

scottbot95 edited this page Sep 1, 2019 · 3 revisions

Disunity.Management

Overview

Contents

Crypto type

Namespace

Disunity.Management.Util

CalculateManagedPath(target,hashLength) method

Summary

Calculate the managed path for a target by hashing the target's executable path

Returns
Parameters
Name Type Description
target Disunity.Management.Managers.ITarget
hashLength System.Nullable{System.Int32}

DisunityDistroIdentifier type

Namespace

Disunity.Management.Models

Version property

Summary

The version segment parsed out of the Id

IPackage type

Namespace

Disunity.Management.Models

Summary

Represents a resolved

IPackageStore type

Namespace

Disunity.Management.PackageStores

Summary

A general interface for handling downloading and storing the various online archives (mods, disunity distro, etc)

Clear() method

Summary

Wipes the store and removes all downloaded entities

Returns
Parameters

This method has no parameters.

DownloadPackage(fullPackageName,force,cancellationToken) method

Summary

Download the specified package into the package store.

Returns

The absolute path to the downloaded package

Parameters
Name Type Description
fullPackageName System.String The full package name (ie owner_mod_version or disunity_version)
force System.Boolean When true, will always download, even if the specified mod is already downloaded
cancellationToken System.Threading.CancellationToken
Remarks

Will skip download by default if the specified package has already been downloaded

GarbageCollect() method

Summary

Run the garbage collector

Parameters

This method has no parameters.

Remarks

Checks for and removes the following:

GetPackagePath(fullPackageName) method

Summary

Get the absolute path for a given package

Returns

The absolute path to the package specified, or null if not found

Parameters
Name Type Description
fullPackageName System.String The full package name (ie owner_mod_version or disunity_version)

IProfile type

Namespace

Disunity.Management.Managers

Summary

Contains management features for Profiles

ModVersions property

Summary

A dictionary containing the mods and version restrictions.

ProfileMeta property

Summary

The metadata for the managed profile.

ProfilePath property

Summary

Absolute path to this profile's directory

Delete() method

Summary

Delete this profile's backing files and cleanup meta data from the internal db

Parameters

This method has no parameters.

IResolver type

Namespace

Disunity.Management.Util

Summary

A utility for resolving version requirements into concrete VersionSets

ITarget type

Namespace

Disunity.Management.Managers

Summary

Contains management features for targets

ActiveProfile property

Summary

The currently active profile.

Remarks

Setting this property will cause the active profile to be altered in the internal db, however it is up to the caller to synchronize the filesystem after the change

Profiles property

Summary

A set of all profiles associated with this target.

Remarks

Modifying this set will automatically adjust the internal db, however it is up to the caller to synchronize the filesystem after changes are made

TargetMeta property

Summary

The meta data for this managed target

Delete() method

Summary

Removes the target from the internal db

Parameters

This method has no parameters.

Remarks

Be aware that it is up to the caller to synchronize the filesystem after calling this method

ITargetManager type

Namespace

Disunity.Management.Managers

Targets property

Summary

A list of all managed targets

InitTarget(executablePath,disunityVersion) method

Summary

Configure a new target with the given disunity version or latest available version

Returns

The newly created Target or null

Parameters
Name Type Description
executablePath System.String The path to the target executable
disunityVersion System.String The desired disunity version to install in the default profile. Null for latest compatible version
Exceptions
Name Description
System.ArgumentException

LoadTargets() method

Summary

Find and parse all managed target directories within

Returns

A List`1 of all the found Targets.

Parameters

This method has no parameters.

Management type

Namespace

Disunity.Management

Summary

Entry point into the Disunity.Management layer.

Remarks

Please use the static Create method to get instances of the Management class.

Create(config) method

Summary

Configures all internal services and creates an instances of Management

Returns
Parameters
Name Type Description
config Microsoft.Extensions.Configuration.IConfiguration The configuration to use for this instance

ManagementOptions type

Namespace

Disunity.Management.Options

RootPath property

Summary

Root path for all files managed by disunity.

Remarks

Defaults to `ApplicationData/disunity`

ModIdentifier type

Namespace

Disunity.Management.Models

ModSlug property

Summary

The mod segment parsed out of the Id

OwnerSlug property

Summary

The owner segment parsed out of the Id

Version property

Summary

The version segment parsed out of the Id

ObservableDictionary`2 type

Namespace

Disunity.Management.Util

Summary

Provides a dictionary for use with data binding.

Generic Types
Name Description
TKey Specifies the type of the keys in this collection.
TValue Specifies the type of the values in this collection.

#ctor() constructor

Summary

Initializes an instance of the class.

Parameters

This constructor has no parameters.

#ctor() constructor

Summary

Initializes an instance of the class using another dictionary as the key/value store.

Parameters

This constructor has no parameters.

Item property

Summary

Gets or sets the element with the specified key.

Returns
Parameters
Name Type Description
key `0 The key.

Keys property

Summary

Gets an ICollection`1 containing the keys of the IDictionary`2.

Returns

An ICollection`1 containing the keys of the object that implements IDictionary`2.

Values property

Summary

Gets an ICollection`1 containing the values in the IDictionary`2.

Returns

An ICollection`1 containing the values in the object that implements IDictionary`2.

Add(key,value) method

Summary

Adds an element with the provided key and value to the IDictionary`2.

Parameters
Name Type Description
key `0 The object to use as the key of the element to add.
value `1 The object to use as the value of the element to add.

ContainsKey(key) method

Summary

Determines whether the IDictionary`2 contains an element with the specified key.

Returns

true if the IDictionary`2 contains an element with the key; otherwise, false.

Parameters
Name Type Description
key `0 The key to locate in the IDictionary`2.

RaisePropertyChanged() method

Summary

Allows derived classes to raise custom property changed events.

Parameters

This method has no parameters.

Remove(key) method

Summary

Removes the element with the specified key from the IDictionary`2.

Returns

true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original IDictionary`2.

Parameters
Name Type Description
key `0 The key of the element to remove.

TryGetValue(key,value) method

Summary

Gets the value associated with the specified key.

Returns

true if the object that implements IDictionary`2 contains an element with the specified key; otherwise, false.

Parameters
Name Type Description
key `0 The key whose value to get.
value `1@ When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

PackageIdentifier type

Namespace

Disunity.Management.Models

Summary

Represents a unique identifier for generic packages

Id property

Summary

Id string for this package. Should be the minimal string necessary to uniquely identify this package

Validate() method

Summary

Check whether the stored Id is validate. Default implementation always returns true

Returns
Parameters

This method has no parameters.

PackageStoreExtensions type

Namespace

Disunity.Management.Extensions

GetPackagePath(store,packageName,versionNumber) method

Summary

A helper method for GetPackagePath to provide the package name and version number separately

Returns
Parameters
Name Type Description
store Disunity.Management.PackageStores.IPackageStore
packageName System.String The package name (either owner_mod or disunity)
versionNumber System.String The version number to use

GetPackagePath(store,owner,modName,versionNumber) method

Summary

A helper method for GetPackagePath to provide the owner, mod and version number separately

Returns
Parameters
Name Type Description
store Disunity.Management.PackageStores.IPackageStore
owner System.String
modName System.String
versionNumber System.String

ProfileMeta type

Namespace

Disunity.Management.Models

DisunityDistro property

Summary

The disunity distro installed into this profile

Id property

Summary

Internal id of this profile.

Remarks

Used to generate a unique directory for each profile

Mods property

Summary

The mod requirements of this profile

Targets property

Summary

A list of all targets that are using this profile, either active or in-active

SymbolicLinkReparseData type

Namespace

Disunity.Management.Util

TargetMeta type

Namespace

Disunity.Management.Models

ActiveProfile property

Summary

The currently active profile on this target

DisplayName property

Summary

Display name to use for this target when showing to the user. Defaults to name of target as reported by disunity.io

ExecutablePath property

Summary

Absolute path to the target executable

Id property

Summary

Internal Id for this target. Used mostly for linking references

LatestHash property

Summary

The most recent hash calculated by the management layer for the target

Remarks

Used mostly for detecting and validating target versions

ManagedPath property

Summary

Relative path from the root of managed target dirs to this target's dir

Profiles property

Summary

All profiles associated with this target

Slug property

Summary

The unique slug for the target to use when looking up data from disunity.io

VersionSet type

Namespace

Disunity.Management.Models

Id property

Summary

Internal id of the version set. Used only for reference linking

Packages property

Summary

A list of all packages. For now, to add or remove a package, make a new list and assign to to this property

VersionSetPackages property

Summary

Internal list of packages used by the database system. There is not need to modify this list directly

Clone this wiki locally