-
Notifications
You must be signed in to change notification settings - Fork 874
Expand file tree
/
Copy pathPgNameAttribute.cs
More file actions
29 lines (26 loc) · 935 Bytes
/
PgNameAttribute.cs
File metadata and controls
29 lines (26 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
// ReSharper disable once CheckNamespace
namespace NpgsqlTypes;
/// <summary>
/// Indicates that this property or field corresponds to a PostgreSQL field with the specified name
/// </summary>
[AttributeUsage(
AttributeTargets.Enum |
AttributeTargets.Class |
AttributeTargets.Struct |
AttributeTargets.Field |
AttributeTargets.Property |
AttributeTargets.Parameter)]
public class PgNameAttribute : Attribute
{
/// <summary>
/// The name of PostgreSQL field that corresponds to this CLR property or field
/// </summary>
public string PgName { get; }
/// <summary>
/// Indicates that this property or field corresponds to a PostgreSQL field with the specified name
/// </summary>
/// <param name="pgName">The name of PostgreSQL field that corresponds to this CLR property or field</param>
public PgNameAttribute(string pgName)
=> PgName = pgName;
}