-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
Copy pathUnicodeAttribute.cs
31 lines (28 loc) · 1.14 KB
/
UnicodeAttribute.cs
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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
namespace Microsoft.EntityFrameworkCore
{
/// <summary>
/// Configures the property as capable of persisting unicode characters.
/// </summary>
/// <remarks>
/// See <see href="https://aka.ms/efcore-docs-modeling">Modeling entity types and relationships</see> for more information.
/// </remarks>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
public sealed class UnicodeAttribute : Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="UnicodeAttribute" /> class.
/// </summary>
/// <param name="unicode">A value indicating whether the property can contain unicode characters or not.</param>
public UnicodeAttribute(bool unicode = true)
{
IsUnicode = unicode;
}
/// <summary>
/// A value indicating whether the property can contain unicode characters or not.
/// </summary>
public bool IsUnicode { get; }
}
}