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//--------------------------------------------------//
5using System;
7
8namespace 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}
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 link in the info set.
Definition WinGetLink.cs:14
override object Clone()
Definition WinGetLink.cs:64
override bool Equals(WinGetLink? other)
Definition WinGetLink.cs:41
Uri Url
Gets the url.
Definition WinGetLink.cs:19