WGet.NET
4.4.1
A WinGet wrapper library for .Net.
Loading...
Searching...
No Matches
WinGetLink.cs
1
//--------------------------------------------------//
2
// Created by basicx-StrgV //
3
// https://github.com/basicx-StrgV/ //
4
//--------------------------------------------------//
5
using
System;
6
using
WGetNET.Abstractions
;
7
8
namespace
WGetNET
9
{
13
public
sealed
class
WinGetLink
:
WinGetInfoEntry
<WinGetLink>
14
{
18
public
Uri
Url
19
{
20
get
21
{
22
return
_url;
23
}
24
}
25
26
private
readonly Uri _url;
27
35
internal
WinGetLink
(
string
entryName,
string
rawContent,
bool
hasShortenedContent, Uri url) : base(entryName, rawContent, hasShortenedContent)
36
{
37
_url = url;
38
}
39
41
public
override
bool
Equals
(
WinGetLink
? other)
42
{
43
if
(other ==
null
)
44
{
45
return
false
;
46
}
47
48
if
(ReferenceEquals(
this
, other))
49
{
50
return
true
;
51
}
52
53
if
(_entryName.Equals(other.
EntryName
) && _rawContent.Equals(other.
RawContent
) &&
54
_hasShortenedContent.Equals(other.
HasShortenedContent
) &&
55
_url.Equals(other.
Url
))
56
{
57
return
true
;
58
}
59
60
return
false
;
61
}
62
64
public
override
object
Clone
()
65
{
66
return
new
WinGetLink
(
67
_entryName,
68
_rawContent,
69
_hasShortenedContent,
70
_url
71
);
72
}
73
}
74
}
WGetNET
Definition
WinGetInfoEntry.cs:8
WGetNET.Abstractions
Definition
WinGetInfoEntry.cs:8
WGetNET.Abstractions.WinGetInfoEntry
Represents a basic winget info entry.
Definition
WinGetInfoEntry.cs:16
WGetNET.Abstractions.WinGetInfoEntry.HasShortenedContent
bool HasShortenedContent
Gets if content of the package is shortened.
Definition
WinGetInfoEntry.cs:43
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.WinGetLink
Represents a winget link in the info set.
Definition
WinGetLink.cs:14
WGetNET.WinGetLink.Clone
override object Clone()
Definition
WinGetLink.cs:64
WGetNET.WinGetLink.Equals
override bool Equals(WinGetLink? other)
Definition
WinGetLink.cs:41
WGetNET.WinGetLink.Url
Uri Url
Gets the url.
Definition
WinGetLink.cs:19