A database based on .net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.1 KiB

// Author: Simon Gockner
// Created: 2020-02-08
// Copyright(c) 2020 SimonG. All Rights Reserved.
using System;
using GBase.Logging.Interfaces;
namespace GBase.Logging
{
/// <summary>
/// The <see cref="ILogComponent"/> attribute
/// </summary>
[AttributeUsage(AttributeTargets.Assembly)]
public class LogComponentAttribute : Attribute, ILogComponent
{
/// <summary>
/// <see cref="LogComponentAttribute"/> constructor
/// </summary>
/// <param name="component">The <see cref="Component"/></param>
public LogComponentAttribute(string component)
{
Component = component;
}
/// <summary>
/// The <see cref="Component"/>
/// </summary>
public string Component { get; private set; }
/// <summary>
/// Returns the <see cref="Component"/> of this <see cref="ILogComponent"/>
/// </summary>
/// <returns>The <see cref="Component"/></returns>
public override string ToString()
{
return Component;
}
}
}