internal static InvalidUdtException Create(Type udtType, string resourceReason) { string str2 = Res.GetString(resourceReason); InvalidUdtException e = new InvalidUdtException(Res.GetString("SqlUdt_InvalidUdtMessage", new object[] { udtType.FullName, str2 })); ADP.TraceExceptionAsReturnValue(e); return e; }
internal static InvalidUdtException Create(Type udtType, string resourceReason) { string reason = Res.GetString(resourceReason); string message = Res.GetString(Res.SqlUdt_InvalidUdtMessage, udtType.FullName, reason); InvalidUdtException e = new InvalidUdtException(message); ADP.TraceExceptionAsReturnValue(e); return e; }
/// <include file='../../doc/snippets/Microsoft.SqlServer.Server/InvalidUdtException.xml' path='docs/members[@name="InvalidUdtException"]/Create/*' /> public static InvalidUdtException Create(Type udtType, string resourceReason = "SqlUdtReason_NoUdtAttribute") { string reason = StringsHelper.GetString(resourceReason); string message = StringsHelper.GetString(Strings.SqlUdt_InvalidUdtMessage, udtType.FullName, reason); InvalidUdtException e = new InvalidUdtException(message); return(e); }
internal static InvalidUdtException Create(Type udtType, string resourceReason) { string str2 = Res.GetString(resourceReason); InvalidUdtException e = new InvalidUdtException(Res.GetString("SqlUdt_InvalidUdtMessage", new object[] { udtType.FullName, str2 })); ADP.TraceExceptionAsReturnValue(e); return(e); }
internal static SqlUserDefinedTypeAttribute GetUdtAttribute(Type t) { object[] customAttributes = GetCustomAttributes(t); if ((customAttributes == null) || (customAttributes.Length != 1)) { throw InvalidUdtException.Create(t, "SqlUdtReason_NoUdtAttribute"); } return((SqlUserDefinedTypeAttribute)customAttributes[0]); }
internal static InvalidUdtException Create(Type udtType, string resourceReason) { string reason = SR.GetString(resourceReason); string message = SR.GetString(SR.SqlUdt_InvalidUdtMessage, udtType.FullName, reason); InvalidUdtException e = new InvalidUdtException(message); ADP.TraceExceptionAsReturnValue(e); return(e); }
internal static SqlUserDefinedTypeAttribute GetUdtAttribute(Type t) { SqlUserDefinedTypeAttribute udtAttr = null; object[] attr = GetCustomAttributes(t); if (attr != null && attr.Length == 1) { udtAttr = (SqlUserDefinedTypeAttribute)attr[0]; } else { throw InvalidUdtException.Create(t, SR.SqlUdtReason_NoUdtAttribute); } return(udtAttr); }