init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
30
Kreta.Core/CustomAttributes/ColumnNameAttribute.cs
Normal file
30
Kreta.Core/CustomAttributes/ColumnNameAttribute.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
|
||||
namespace Kreta.Core.CustomAttributes
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public class ColumnNameAttribute : Attribute
|
||||
{
|
||||
public string[] ColumnName { get; private set; }
|
||||
|
||||
public ColumnNameAttribute(params string[] columnNames)
|
||||
{
|
||||
if (columnNames == null || columnNames.Length == 0)
|
||||
{
|
||||
throw new BlException(BlExceptionType.ListaNemTartalmazElemet);
|
||||
}
|
||||
|
||||
foreach (string columnName in columnNames)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(columnName))
|
||||
{
|
||||
throw new BlException(BlExceptionType.ValtozoErtekeNemLehetNull);
|
||||
}
|
||||
}
|
||||
|
||||
ColumnName = columnNames;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue