invalidudtexception.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / Sql / invalidudtexception.cs / 1305376 / invalidudtexception.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// [....] 
// [....]
//----------------------------------------------------------------------------- 
 
using System;
using System.Data; 
using System.Data.Common;
using System.Runtime.Serialization;

namespace Microsoft.SqlServer.Server { 

    [Serializable] 
    public sealed class InvalidUdtException : SystemException { 

        internal InvalidUdtException() : base() { 
            HResult = HResults.InvalidUdt;
        }

        internal InvalidUdtException(String message) : base(message) { 
            HResult = HResults.InvalidUdt;
        } 
 
        internal InvalidUdtException(String message, Exception innerException) : base(message, innerException) {
            HResult = HResults.InvalidUdt; 
        }

        private InvalidUdtException(SerializationInfo si, StreamingContext sc) : base(si, sc) {
        } 

        [System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Flags=System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] 
        public override void GetObjectData(SerializationInfo si, StreamingContext context) { 
            base.GetObjectData(si, context);
        } 

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

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// [....] 
// [....]
//----------------------------------------------------------------------------- 
 
using System;
using System.Data; 
using System.Data.Common;
using System.Runtime.Serialization;

namespace Microsoft.SqlServer.Server { 

    [Serializable] 
    public sealed class InvalidUdtException : SystemException { 

        internal InvalidUdtException() : base() { 
            HResult = HResults.InvalidUdt;
        }

        internal InvalidUdtException(String message) : base(message) { 
            HResult = HResults.InvalidUdt;
        } 
 
        internal InvalidUdtException(String message, Exception innerException) : base(message, innerException) {
            HResult = HResults.InvalidUdt; 
        }

        private InvalidUdtException(SerializationInfo si, StreamingContext sc) : base(si, sc) {
        } 

        [System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Flags=System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] 
        public override void GetObjectData(SerializationInfo si, StreamingContext context) { 
            base.GetObjectData(si, context);
        } 

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

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK