ProjectLicenseSettings
public sealed class ProjectLicenseSettingsA project's explicit license choices, independent of globally shared catalog selections.
Fields
Section titled “Fields”
CurrentVersion
Section titled “CurrentVersion”public const int CurrentVersion = 1Returns
System.Int32
Methods
Section titled “Methods”
Load(string)
Section titled “Load(string)”public static ProjectLicenseSettings Load(string path = null)Loads project license choices from the supplied or default path, returning an error state for unreadable or unsupported data without rewriting the file.
Parameters
| Name | Type |
|---|---|
path |
System.String |
Returns
AssetInventory.ProjectLicenseSettings
TryGetSelection(AssetInfo, out ProjectLicenseSelection)
Section titled “TryGetSelection(AssetInfo, out ProjectLicenseSelection)”public bool TryGetSelection(AssetInfo package, out ProjectLicenseSelection selection)Looks up a recorded choice for the package in the current catalog; use ProjectLicenseSettings.GetSelectionError(AssetInfo) to check whether that choice can be applied.
Parameters
| Name | Type |
|---|---|
package |
AssetInventory.AssetInfo |
selection |
AssetInventory.ProjectLicenseSelection |
Returns
System.Boolean
GetSelectionError(AssetInfo)
Section titled “GetSelectionError(AssetInfo)”public string GetSelectionError(AssetInfo package)Returns a settings, identity, source, or catalog-context error that prevents applying the package's project choice, or null when none is detected.
Parameters
| Name | Type |
|---|---|
package |
AssetInventory.AssetInfo |
Returns
System.String
SetSelection(AssetInfo, PackageLicense, out string)
Section titled “SetSelection(AssetInfo, PackageLicense, out string)”public bool SetSelection(AssetInfo package, PackageLicense selected, out string error)Validates and saves a project-specific package choice, restoring previous project choices if saving fails.
Parameters
| Name | Type |
|---|---|
package |
AssetInventory.AssetInfo |
selected |
AssetInventory.PackageLicense |
error |
System.String |
Returns
System.Boolean
UsePackageSelection(AssetInfo, out string)
Section titled “UsePackageSelection(AssetInfo, out string)”public bool UsePackageSelection(AssetInfo package, out string error)Removes the package's project override and saves the change, restoring previous choices if saving fails.
Parameters
| Name | Type |
|---|---|
package |
AssetInventory.AssetInfo |
error |
System.String |
Returns
System.Boolean
Save(out string)
Section titled “Save(out string)”public bool Save(out string error)Atomically saves validated project choices and retains their referenced documents, refusing to overwrite settings changed elsewhere.
Parameters
| Name | Type |
|---|---|
error |
System.String |
Returns
System.Boolean
Constructors
Section titled “Constructors”
ProjectLicenseSettings()
Section titled “ProjectLicenseSettings()”public ProjectLicenseSettings()Properties
Section titled “Properties”
Version
Section titled “Version”public int Version { get; set; }Returns
System.Int32
ProjectId
Section titled “ProjectId”public string ProjectId { get; set; }Returns
System.String
Selections
Section titled “Selections”public List<ProjectLicenseSelection> Selections { get; set; }Returns
System.Collections.Generic.List{AssetInventory.ProjectLicenseSelection}
public string Error { get; }Returns
System.String
FilePath
Section titled “FilePath”public string FilePath { get; }Returns
System.String
DefaultPath
Section titled “DefaultPath”public static string DefaultPath { get; }Returns
System.String