Files
DP44/Common/DTS.Common.Storage/.svn/pristine/31/311e97f77c7877bfacceb1d97ecebfc9cc873ab3.svn-base

31 lines
824 B
Plaintext
Raw Permalink Normal View History

2026-04-17 14:55:32 -04:00

using System;
namespace DTS.Storage
{
public class DbTypeAttr : Attribute
{
public string DbType { get; private set; }
internal DbTypeAttr(string attr)
{
DbType = attr;
}
public static string GetDbType(object o)
{
if (o != null)
{
System.Reflection.MemberInfo[] mi = o.GetType().GetMember(o.ToString());
if (mi != null && mi.Length > 0)
{
DbTypeAttr attr = Attribute.GetCustomAttribute(mi[0], typeof(DbTypeAttr)) as DbTypeAttr;
if (null != attr)
{
return attr.DbType;
}
}
}
return null;
}
}
}