| File: System\Net\ProtocolViolationException.cs | Web Access |
| Project: src\runtime\src\libraries\System.Net.Requests\src\System.Net.Requests.csproj (System.Net.Requests) |
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; using System.Runtime.Serialization; namespace System.Net { /// <devdoc> /// <para> /// An exception class used when an attempt is made to use an invalid /// protocol. /// </para> /// </devdoc> [Serializable] [System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public class ProtocolViolationException : InvalidOperationException, ISerializable { /// <devdoc> /// <para> /// Creates a new instance of the <see cref='System.Net.ProtocolViolationException'/>class. /// </para> /// </devdoc> public ProtocolViolationException() : base() { } /// <devdoc> /// <para> /// Creates a new instance of the <see cref='System.Net.ProtocolViolationException'/> /// class with the specified message. /// </para> /// </devdoc> public ProtocolViolationException(string? message) : base(message) { } [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [EditorBrowsable(EditorBrowsableState.Never)] protected ProtocolViolationException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { } [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); } [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)] [EditorBrowsable(EditorBrowsableState.Never)] public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) { base.GetObjectData(serializationInfo, streamingContext); } } }