forked from npgsql/npgsql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPgNameAttribute.cs
More file actions
31 lines (28 loc) · 954 Bytes
/
PgNameAttribute.cs
File metadata and controls
31 lines (28 loc) · 954 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
30
31
using System;
// ReSharper disable once CheckNamespace
namespace NpgsqlTypes;
/// <summary>
/// Indicates that this property or field correspond 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; private set; }
/// <summary>
/// Indicates that this property or field correspond 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;
}
}