From 0e6e919cf229172d79bf5fb95c1b26a32cbdb74b Mon Sep 17 00:00:00 2001 From: Christoph Lackner Date: Sat, 18 Oct 2025 12:46:47 -0400 Subject: [PATCH] Added EventType Attribute used for EventDetails --- src/Gemstone.Data/Model/EventTypeAttribute.cs | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/Gemstone.Data/Model/EventTypeAttribute.cs diff --git a/src/Gemstone.Data/Model/EventTypeAttribute.cs b/src/Gemstone.Data/Model/EventTypeAttribute.cs new file mode 100644 index 000000000..0d2a041b1 --- /dev/null +++ b/src/Gemstone.Data/Model/EventTypeAttribute.cs @@ -0,0 +1,48 @@ +//****************************************************************************************************** +// EventTypeAttribute.cs - Gbtc +// +// Copyright © 2025, Grid Protection Alliance. All Rights Reserved. +// +// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See +// the NOTICE file distributed with this work for additional information regarding copyright ownership. +// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may +// not use this file except in compliance with the License. You may obtain a copy of the License at: +// +// http://opensource.org/licenses/MIT +// +// Unless agreed to in writing, the subject software distributed under the License is distributed on an +// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the +// License for the specific language governing permissions and limitations. +// +// Code Modification History: +// ---------------------------------------------------------------------------------------------------- +// 10/18/2025 - C. Lackner +// Generated original version of source code. +// +//****************************************************************************************************** + +using System; + +namespace Gemstone.Data.Model; + +/// +/// Defines an attribute that will mark a class as a JSON construct in +/// the property name. +/// +[AttributeUsage(AttributeTargets.Class)] +public sealed class EventTypeAttribute : Attribute +{ + /// + /// Gets the EventType name to use in the database. + /// + public string Name { get; } + + /// + /// Creates a new . + /// + /// Name to use for database entry. + public EventTypeAttribute(string name) + { + Name = name; + } +}