WGet.NET 4.4.1
A WinGet wrapper library for .Net.
Loading...
Searching...
No Matches
WinGetAdminSetting.cs
1//--------------------------------------------------//
2// Created by basicx-StrgV //
3// https://github.com/basicx-StrgV/ //
4//--------------------------------------------------//
6
7namespace WGetNET
8{
12 public sealed class WinGetAdminSetting : WinGetInfoEntry<WinGetAdminSetting>
13 {
17 public bool IsEnabled
18 {
19 get
20 {
21 return _isEnabled;
22 }
23 }
24
25 private readonly bool _isEnabled;
26
34 internal WinGetAdminSetting(string entryName, string rawContent, bool hasShortenedContent, bool isEnabled) : base(entryName, rawContent, hasShortenedContent)
35 {
36 _isEnabled = isEnabled;
37 }
38
40 public override bool Equals(WinGetAdminSetting? other)
41 {
42 if (other == null)
43 {
44 return false;
45 }
46
47 if (ReferenceEquals(this, other))
48 {
49 return true;
50 }
51
52 if (_entryName.Equals(other.EntryName) && _rawContent.Equals(other.RawContent) &&
53 _hasShortenedContent.Equals(other.HasShortenedContent) &&
54 _isEnabled.Equals(other.IsEnabled))
55 {
56 return true;
57 }
58
59 return false;
60 }
61
63 public override object Clone()
64 {
65 return new WinGetAdminSetting(
66 _entryName,
67 _rawContent,
68 _hasShortenedContent,
69 _isEnabled
70 );
71 }
72 }
73}
Represents a basic winget info entry.
bool HasShortenedContent
Gets if content of the package is shortened.
string RawContent
Gets the raw content of the info entry.
string EntryName
Gets the name of the info entry.
Represents a winget admin settings entry.
override bool Equals(WinGetAdminSetting? other)
bool IsEnabled
Gets if the admin option is enabled.