Mercurial > pub > bltoolkit
comparison Source/DataAccess/ParamNullValue.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.ComponentModel; | |
3 | |
4 namespace BLToolkit.DataAccess | |
5 { | |
6 [AttributeUsage(AttributeTargets.Parameter)] | |
7 public class ParamNullValueAttribute : Attribute | |
8 { | |
9 public ParamNullValueAttribute(object value) | |
10 { | |
11 _value = value; | |
12 } | |
13 | |
14 public ParamNullValueAttribute(Type type, string value) | |
15 { | |
16 _value = TypeDescriptor.GetConverter(type).ConvertFromInvariantString(value); | |
17 } | |
18 | |
19 private readonly object _value; | |
20 public object Value | |
21 { | |
22 get { return _value; } | |
23 } | |
24 } | |
25 } |