public SqlUserDefinedTypeAttribute(Microsoft.SqlServer.Server.Format format)
        {
            switch (format)
            {
            case Microsoft.SqlServer.Server.Format.Unknown:
                throw ADP.NotSupportedUserDefinedTypeSerializationFormat(format, "format");

            case Microsoft.SqlServer.Server.Format.Native:
            case Microsoft.SqlServer.Server.Format.UserDefined:
                this.m_format = format;
                return;
            }
            throw ADP.InvalidUserDefinedTypeSerializationFormat(format);
        }
        public SqlUserDefinedAggregateAttribute(Microsoft.SqlServer.Server.Format format)
        {
            switch (format)
            {
                case Microsoft.SqlServer.Server.Format.Unknown:
                    throw ADP.NotSupportedUserDefinedTypeSerializationFormat(format, "format");

                case Microsoft.SqlServer.Server.Format.Native:
                case Microsoft.SqlServer.Server.Format.UserDefined:
                    this.m_format = format;
                    return;
            }
            throw ADP.InvalidUserDefinedTypeSerializationFormat(format);
        }
Esempio n. 3
0
 internal static ArgumentOutOfRangeException NotSupportedUserDefinedTypeSerializationFormat(Microsoft.SqlServer.Server.Format value, string method)
 {
     return(NotSupportedEnumerationValue(typeof(Microsoft.SqlServer.Server.Format), value.ToString(), method));
 }
Esempio n. 4
0
 internal static ArgumentOutOfRangeException InvalidUserDefinedTypeSerializationFormat(Microsoft.SqlServer.Server.Format value)
 {
     return(InvalidEnumerationValue(typeof(Microsoft.SqlServer.Server.Format), (int)value));
 }
Esempio n. 5
0
        static internal ArgumentOutOfRangeException InvalidUserDefinedTypeSerializationFormat(Microsoft.SqlServer.Server.Format value)
        {
#if DEBUG
            switch (value)
            {
            case Microsoft.SqlServer.Server.Format.Unknown:
            case Microsoft.SqlServer.Server.Format.Native:
            case Microsoft.SqlServer.Server.Format.UserDefined:
                Debug.Assert(false, "valid UserDefinedTypeSerializationFormat " + value.ToString());
                break;
            }
#endif
            return(InvalidEnumerationValue(typeof(Microsoft.SqlServer.Server.Format), (int)value));
        }