The Labs \ Source Viewer \ SSCLI \ System.Net \ ProtocolViolationException

  1. //------------------------------------------------------------------------------
  2. // <copyright file="ProtocolViolationException.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.Net
  16. {
  17.     using System.Runtime.Serialization;
  18.     using System.Security.Permissions;
  19.    
  20.     /// <devdoc>
  21.     /// <para>
  22.     /// An exception class used when an attempt is made to use an invalid
  23.     /// protocol.
  24.     /// </para>
  25.     /// </devdoc>
  26.     [Serializable()]
  27.     public class ProtocolViolationException : InvalidOperationException, ISerializable
  28.     {
  29.         /// <devdoc>
  30.         /// <para>
  31.         /// Creates a new instance of the <see cref='System.Net.ProtocolViolationException'/>class.
  32.         /// </para>
  33.         /// </devdoc>
  34.         public ProtocolViolationException() : base()
  35.         {
  36.         }
  37.        
  38.         /// <devdoc>
  39.         /// <para>
  40.         /// Creates a new instance of the <see cref='System.Net.ProtocolViolationException'/>
  41.         /// class with the specified message.
  42.         /// </para>
  43.         /// </devdoc>
  44.         public ProtocolViolationException(string message) : base(message)
  45.         {
  46.         }
  47.        
  48.         protected ProtocolViolationException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext)
  49.         {
  50.         }
  51.        
  52.         /// <internalonly/>
  53.        
  54.         [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter, SerializationFormatter = true)]
  55.         void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
  56.         {
  57.             base.GetObjectData(serializationInfo, streamingContext);
  58.         }
  59.        
  60.        
  61.         [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
  62.         public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
  63.         {
  64.             base.GetObjectData(serializationInfo, streamingContext);
  65.         }
  66.     }
  67.     // class ProtocolViolationException
  68.    
  69. }
  70. // namespace System.Net

Developer Fusion