Migrated Documentation library from NetFlow.DocumentationHelper.Library
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
|
||||
namespace OmegaLeo.HelperLib.Shared.Attributes
|
||||
{
|
||||
[Changelog("1.0.0", "Created ChangelogAttribute to be used to register changes in the code.")]
|
||||
[Documentation(nameof(ChangelogAttribute), "Attribute to annotate classes, methods, or properties with changelog information.")]
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = true)]
|
||||
public class ChangelogAttribute : Attribute
|
||||
{
|
||||
public string Version { get; }
|
||||
public string Description { get; }
|
||||
|
||||
public string Date { get; set; }
|
||||
|
||||
public ChangelogAttribute(string version, string description, string date = "")
|
||||
{
|
||||
Version = version;
|
||||
Description = description;
|
||||
Date = date;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
|
||||
namespace OmegaLeo.HelperLib.Shared.Attributes
|
||||
{
|
||||
[System.AttributeUsage(AttributeTargets.All, AllowMultiple = false)]
|
||||
public class DocumentationAttribute : Attribute
|
||||
{
|
||||
public string Title;
|
||||
public string Description;
|
||||
public string[] Args;
|
||||
public string CodeExample = string.Empty;
|
||||
|
||||
public DocumentationAttribute(string title, string description, string[] args = null, string codeExample = "")
|
||||
{
|
||||
Title = title;
|
||||
Description = description;
|
||||
Args = args ?? Array.Empty<string>();
|
||||
CodeExample = codeExample;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user