0
|
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 }
|