-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from GridProtectionAlliance/TDAP-23
Tdap 23
- Loading branch information
Showing
47 changed files
with
2,870 additions
and
1,225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
//****************************************************************************************************** | ||
// ParentKeyAttribute.cs - Gbtc | ||
// | ||
// Copyright © 2021, 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: | ||
// ---------------------------------------------------------------------------------------------------- | ||
// 05/01/2024 - Gabriel Santos | ||
// Generated original version of source code. | ||
// | ||
//****************************************************************************************************** | ||
|
||
using System; | ||
|
||
namespace GSF.Data.Model | ||
{ | ||
/// <summary> | ||
/// Defines an attribute that will allow setting a custom view a modeled table. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] | ||
public sealed class CustomViewAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Gets field name to use for property. | ||
/// </summary> | ||
public string CustomView | ||
{ | ||
get; | ||
} | ||
|
||
/// <summary> | ||
/// Creates a new <see cref="CustomViewAttribute"/>. | ||
/// </summary> | ||
/// <param name="customView">SQL to generate custom view.</param> | ||
public CustomViewAttribute(string customView) | ||
{ | ||
CustomView = customView; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
//****************************************************************************************************** | ||
// ParentKeyAttribute.cs - Gbtc | ||
// | ||
// Copyright © 2021, 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: | ||
// ---------------------------------------------------------------------------------------------------- | ||
// 05/01/2024 - Gabriel Santos | ||
// Generated original version of source code. | ||
// | ||
//****************************************************************************************************** | ||
|
||
using System; | ||
|
||
namespace TrenDAP.Attributes | ||
{ | ||
/// <summary> | ||
/// Defines an attribute that will allow a foreign key in the model to point back to parent table | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] | ||
public sealed class ParentKeyAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Gets field name to use for property. | ||
/// </summary> | ||
public Type Model | ||
{ | ||
get; | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Creates a new <see cref="ParentKeyAttribute"/>. | ||
/// </summary> | ||
/// <param name="model">Type of modeled table that key points back to.</param> | ||
public ParentKeyAttribute(Type model) | ||
{ | ||
Model = model; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.