mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
33 lines
889 B
C#
33 lines
889 B
C#
using System;
|
|
using Kyoo.Abstractions.Controllers;
|
|
|
|
namespace Kyoo.Abstractions.Models.Attributes
|
|
{
|
|
|
|
/// <summary>
|
|
/// The targeted relation can be loaded via a call to <see cref="ILibraryManager.Load"/>.
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Property)]
|
|
public class LoadableRelationAttribute : Attribute
|
|
{
|
|
/// <summary>
|
|
/// The name of the field containing the related resource's ID.
|
|
/// </summary>
|
|
public string RelationID { get; }
|
|
|
|
/// <summary>
|
|
/// Create a new <see cref="LoadableRelationAttribute"/>.
|
|
/// </summary>
|
|
public LoadableRelationAttribute() { }
|
|
|
|
/// <summary>
|
|
/// Create a new <see cref="LoadableRelationAttribute"/> with a baking relationID field.
|
|
/// </summary>
|
|
/// <param name="relationID">The name of the RelationID field.</param>
|
|
public LoadableRelationAttribute(string relationID)
|
|
{
|
|
RelationID = relationID;
|
|
}
|
|
}
|
|
}
|