Mercurial > pub > bltoolkit
comparison Source/Mapping/NullableAttribute.cs @ 0:f990fcb411a9
Копия текущей версии из github
| author | cin |
|---|---|
| date | Thu, 27 Mar 2014 21:46:09 +0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:f990fcb411a9 |
|---|---|
| 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 } |
