1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-25 14:52:21 -05:00
bitwarden/src/Core/Tools/Entities/IReferenceable.cs
✨ Audrey ✨ 98c12d3f41
Tools - Make Entities and Repositories nullable (#3313)
* support nullability in tools' entities and repositories

* enables C# nullability checks in these files
* includes documentation for affected files

* refine documentation per code review

* improve comments on SendFileData structure

* fix ReferenceEvent.MaxAccessCount documentation

* add value notation to SendFileData.FileName
2023-11-22 15:44:25 -05:00

30 lines
740 B
C#

#nullable enable
using Bit.Core.Tools.Models.Business;
namespace Bit.Core.Tools.Entities;
/// <summary>
/// An entity that can be referenced by a <see cref="ReferenceEvent"/>.
/// </summary>
public interface IReferenceable
{
/// <summary>
/// Identifies the entity that generated the event.
/// </summary>
Guid Id { get; set; }
/// <summary>
/// Contextual information included in the event.
/// </summary>
/// <remarks>
/// Do not store secrets in this field.
/// </remarks>
string? ReferenceData { get; set; }
/// <summary>
/// Returns <see langword="true" /> when the entity is a user.
/// Otherwise returns <see langword="false" />.
/// </summary>
bool IsUser();
}