WGet.NET
4.4.1
A WinGet wrapper library for .Net.
Loading...
Searching...
No Matches
WinGetInfoEntry.cs
1
//--------------------------------------------------//
2
// Created by basicx-StrgV //
3
// https://github.com/basicx-StrgV/ //
4
//--------------------------------------------------//
5
using
System;
6
7
namespace
WGetNET.Abstractions
8
{
15
public
abstract
class
WinGetInfoEntry
<T> :
IWinGetObject
, IEquatable<T>, ICloneable where T :
WinGetInfoEntry
<T>
16
{
20
public
string
EntryName
21
{
22
get
23
{
24
return
_entryName;
25
}
26
}
27
31
public
string
RawContent
32
{
33
get
34
{
35
return
_rawContent;
36
}
37
}
38
42
public
bool
HasShortenedContent
43
{
44
get
45
{
46
return
_hasShortenedContent;
47
}
48
}
49
53
public
virtual
bool
IsEmpty
54
{
55
get
56
{
57
if
(
string
.IsNullOrWhiteSpace(_entryName) &&
string
.IsNullOrWhiteSpace(_rawContent))
58
{
59
return
true
;
60
}
61
return
false
;
62
}
63
}
64
65
// \cond PRIVATE
66
private
protected
readonly
string
_entryName;
67
private
protected
readonly
string
_rawContent;
68
private
protected
readonly
bool
_hasShortenedContent;
69
76
private
protected
WinGetInfoEntry
(
string
entryName,
string
rawContent,
bool
hasShortenedContent)
77
{
78
_entryName = entryName;
79
_rawContent = rawContent;
80
_hasShortenedContent = hasShortenedContent;
81
}
82
// \endcond
83
85
public
override
string
ToString
()
86
{
87
return
_entryName;
88
}
89
91
public
abstract
bool
Equals
(T? other);
92
94
public
abstract
object
Clone
();
95
}
96
}
WGetNET.Abstractions
Definition
WinGetInfoEntry.cs:8
WGetNET.Abstractions.WinGetInfoEntry
Represents a basic winget info entry.
Definition
WinGetInfoEntry.cs:16
WGetNET.Abstractions.WinGetInfoEntry.Clone
object Clone()
WGetNET.Abstractions.WinGetInfoEntry.HasShortenedContent
bool HasShortenedContent
Gets if content of the package is shortened.
Definition
WinGetInfoEntry.cs:43
WGetNET.Abstractions.WinGetInfoEntry.Equals
bool Equals(T? other)
WGetNET.Abstractions.WinGetInfoEntry.IsEmpty
virtual bool IsEmpty
Gets if the object is empty.
Definition
WinGetInfoEntry.cs:54
WGetNET.Abstractions.WinGetInfoEntry.RawContent
string RawContent
Gets the raw content of the info entry.
Definition
WinGetInfoEntry.cs:32
WGetNET.Abstractions.WinGetInfoEntry.EntryName
string EntryName
Gets the name of the info entry.
Definition
WinGetInfoEntry.cs:21
WGetNET.Abstractions.WinGetInfoEntry.ToString
override string ToString()
Definition
WinGetInfoEntry.cs:85
WGetNET.IWinGetObject
Interface for all winget related objects.
Definition
IWinGetObject.cs:11