0
|
1 using System;
|
|
2
|
|
3 namespace BLToolkit.Mapping
|
|
4 {
|
|
5 [AttributeUsage(
|
|
6 AttributeTargets.Property | AttributeTargets.Field |
|
|
7 AttributeTargets.Class | AttributeTargets.Interface)]
|
|
8 public class NullableAttribute : Attribute
|
|
9 {
|
|
10 public NullableAttribute()
|
|
11 {
|
|
12 IsNullable = true;
|
|
13 }
|
|
14
|
|
15 public NullableAttribute(bool isNullable)
|
|
16 {
|
|
17 IsNullable = isNullable;
|
|
18 }
|
|
19
|
|
20 public NullableAttribute(Type type)
|
|
21 {
|
|
22 Type = type;
|
|
23 IsNullable = true;
|
|
24 }
|
|
25
|
|
26 public NullableAttribute(Type type, bool isNullable)
|
|
27 {
|
|
28 Type = type;
|
|
29 IsNullable = isNullable;
|
|
30 }
|
|
31
|
|
32 public bool IsNullable { get; set; }
|
|
33 public Type Type { get; private set; }
|
|
34 }
|
|
35 }
|