Files
PowerToys/src/modules/launcher/Wox.Plugin/PluginMetadata.cs
Heiko 602a3ff090 [PTRun][Enterprise]GPO for plugin enabled state (#27468)
* try code for gpo with pluginID param

* fix typo

* fixes

* update admx

* Add second policy to admx

* spelling fixes

* admx clean up

* add gpo code

* small fixes

* fixes

* fix cast

* update settings code

* bug fixes

* fix plugins disabled warning

* Info bar in settings

* settings ui fixes

* code clean up

* fix spelling

* fix spelling

* code optimization

* changes

* fix code

* switch to char*

* update comments

* validate plugin ID

* spell fixes

* spell fixes

* fix IPlugin interface

* Update Directory.Packages.props

hopefully fixes unit tests

* revert change of nuget pkg

* fixes

* fix spell check

* add todo comment

* improve gpo.h

* improve gpo.h

* update gpo.h

* clean up code in gpo.h

* fix build

* try to fix build

* xaml fix

* Fix getting string value from the registry

* communicate policy state suing settings.json

* various changes and gpo docs

* spell fixes

* PT Run: Policy handling

* spell fix

* fix logging

* fix admx revision

* revision fix 2

* review feedback 1

* review feedback 2

* dev docs update

* fix typo
2023-10-11 15:37:15 +01:00

86 lines
2.1 KiB
C#

// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.IO.Abstractions;
using System.Text.Json.Serialization;
namespace Wox.Plugin
{
public class PluginMetadata : BaseModel
{
private static readonly IFileSystem FileSystem = new FileSystem();
private static readonly IPath Path = FileSystem.Path;
private string _pluginDirectory;
public PluginMetadata()
{
}
public string ID { get; set; }
public string Name { get; set; }
public string Author { get; set; }
public string Version { get; set; }
public string Language { get; set; }
public string Website { get; set; }
public bool Disabled { get; set; }
// This property is used in PT Run only to decide whether to updated the Disabled property or not.
[JsonIgnore]
public bool IsEnabledPolicyConfigured { get; set; }
[JsonInclude]
public string ExecuteFilePath { get; private set; }
public string ExecuteFileName { get; set; }
public string PluginDirectory
{
get
{
return _pluginDirectory;
}
internal set
{
_pluginDirectory = value;
ExecuteFilePath = Path.Combine(value, ExecuteFileName);
}
}
public string ActionKeyword { get; set; }
public int WeightBoost { get; set; }
public bool IsGlobal { get; set; }
public string IcoPathDark { get; set; }
public string IcoPathLight { get; set; }
public override string ToString()
{
return Name;
}
/// <summary>
/// Gets or sets init time include both plugin load time and init time
/// </summary>
[JsonIgnore]
public long InitTime { get; set; }
[JsonIgnore]
public long AvgQueryTime { get; set; }
[JsonIgnore]
public int QueryCount { get; set; }
}
}