comparison Source/Mapping/DefaultValueAttribute.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 using System.Diagnostics.CodeAnalysis;
3
4 namespace BLToolkit.Mapping
5 {
6 [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")]
7 [AttributeUsage(
8 AttributeTargets.Class | AttributeTargets.Interface |
9 AttributeTargets.Property | AttributeTargets.Field |
10 AttributeTargets.Enum,
11 AllowMultiple=true)]
12 public class DefaultValueAttribute : Attribute
13 {
14 public DefaultValueAttribute()
15 {
16 }
17
18 public DefaultValueAttribute(object value)
19 {
20 _value = value;
21 }
22
23 public DefaultValueAttribute(Type type, object value)
24 {
25 _type = type;
26 _value = value;
27 }
28
29 private readonly object _value;
30 public object Value
31 {
32 get { return _value; }
33 }
34
35 private readonly Type _type;
36 public Type Type
37 {
38 get { return _type; }
39 }
40 }
41 }