-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdvancedLicense.cs
30 lines (27 loc) · 988 Bytes
/
AdvancedLicense.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace LicenseMe;
/// <summary>
/// Advanced Informations from the Inherited Basic license
/// </summary>
public class AdvancedLicense : BasicLicense
{
[JsonPropertyName("html_url")]
public string HtmlUrl { get; set; }
public string Description { get; set; }
public string Implementation { get; set; }
public IEnumerable<string> Permissions { get; set; }
public IEnumerable<string> Conditions { get; set; }
public IEnumerable<string> Limitations { get; set; }
public string Body { get; set; }
public bool Featured { get; set; }
/// <summary>
/// Replaces the Placeholder in the "Body" Property with data
/// </summary>
/// <param name="fullUsername">The User's name</param>
public void Personalize(string fullUsername)
{
Body = Body.Replace("[year]", DateTime.Now.Year.ToString()).Replace("[fullname]", fullUsername);
}
}