Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / HttpListenerException.cs / 1305376 / HttpListenerException.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net { using System; using System.ComponentModel; using System.Runtime.Serialization; using System.Runtime.InteropServices; [Serializable] public class HttpListenerException : Win32Exception { public HttpListenerException() : base(Marshal.GetLastWin32Error()) { GlobalLog.Print("HttpListenerException::.ctor() " + NativeErrorCode.ToString() + ":" + Message); } public HttpListenerException(int errorCode) : base(errorCode) { GlobalLog.Print("HttpListenerException::.ctor(int) " + NativeErrorCode.ToString() + ":" + Message); } public HttpListenerException(int errorCode, string message) : base(errorCode, message) { GlobalLog.Print("HttpListenerException::.ctor(int) " + NativeErrorCode.ToString() + ":" + Message); } protected HttpListenerException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { GlobalLog.Print("HttpListenerException::.ctor(serialized) " + NativeErrorCode.ToString() + ":" + Message); } public override int ErrorCode { // // the base class returns the HResult with this property // we need the Win32 Error Code, hence the override. // get { return NativeErrorCode; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net { using System; using System.ComponentModel; using System.Runtime.Serialization; using System.Runtime.InteropServices; [Serializable] public class HttpListenerException : Win32Exception { public HttpListenerException() : base(Marshal.GetLastWin32Error()) { GlobalLog.Print("HttpListenerException::.ctor() " + NativeErrorCode.ToString() + ":" + Message); } public HttpListenerException(int errorCode) : base(errorCode) { GlobalLog.Print("HttpListenerException::.ctor(int) " + NativeErrorCode.ToString() + ":" + Message); } public HttpListenerException(int errorCode, string message) : base(errorCode, message) { GlobalLog.Print("HttpListenerException::.ctor(int) " + NativeErrorCode.ToString() + ":" + Message); } protected HttpListenerException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext) { GlobalLog.Print("HttpListenerException::.ctor(serialized) " + NativeErrorCode.ToString() + ":" + Message); } public override int ErrorCode { // // the base class returns the HResult with this property // we need the Win32 Error Code, hence the override. // get { return NativeErrorCode; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TypeDescriptionProviderAttribute.cs
- DataPagerFieldCollection.cs
- AsymmetricSignatureFormatter.cs
- figurelength.cs
- XmlILCommand.cs
- ListViewDeletedEventArgs.cs
- BaseCodeDomTreeGenerator.cs
- DefaultPropertyAttribute.cs
- MimeXmlImporter.cs
- TemplateControl.cs
- ConcurrentBag.cs
- Barrier.cs
- SourceFileBuildProvider.cs
- DrawingCollection.cs
- ObjectListSelectEventArgs.cs
- Matrix3DValueSerializer.cs
- PackageDigitalSignature.cs
- Camera.cs
- ServicesUtilities.cs
- ApplicationDirectoryMembershipCondition.cs
- ProfessionalColorTable.cs
- CodeArrayCreateExpression.cs
- MimeFormatExtensions.cs
- BasicHttpMessageSecurity.cs
- HtmlWindowCollection.cs
- IntSecurity.cs
- SessionState.cs
- dbenumerator.cs
- GB18030Encoding.cs
- DynamicMethod.cs
- UnsafeNativeMethods.cs
- Italic.cs
- TypefaceCollection.cs
- safemediahandle.cs
- AsyncPostBackTrigger.cs
- SqlMethods.cs
- StrokeCollection.cs
- HitTestFilterBehavior.cs
- ConnectionStringsSection.cs
- Attributes.cs
- ColorContext.cs
- BuildProviderCollection.cs
- PropertyContainer.cs
- ProcessHostServerConfig.cs
- ToolStripManager.cs
- PrintDialogException.cs
- Stack.cs
- ExpandSegmentCollection.cs
- TextTreeObjectNode.cs
- RowsCopiedEventArgs.cs
- configsystem.cs
- DragEvent.cs
- TextServicesManager.cs
- DoubleAnimationBase.cs
- SQLDecimalStorage.cs
- AsymmetricCryptoHandle.cs
- FontStyle.cs
- Repeater.cs
- TextServicesCompartmentContext.cs
- TabItemAutomationPeer.cs
- EventBindingService.cs
- ListViewItem.cs
- Camera.cs
- TypeLibConverter.cs
- Registry.cs
- CompiledXpathExpr.cs
- CustomValidator.cs
- GreenMethods.cs
- PeerNameRecordCollection.cs
- DataObjectFieldAttribute.cs
- Events.cs
- TrustManagerMoreInformation.cs
- SqlConnectionFactory.cs
- XmlSchemaAttribute.cs
- ToolStripEditorManager.cs
- Matrix3DStack.cs
- Scene3D.cs
- EntitySqlQueryCacheKey.cs
- JsonReader.cs
- Sequence.cs
- TextTreeTextElementNode.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- CurrentChangingEventArgs.cs
- ArraySegment.cs
- SqlNamer.cs
- GraphicsContext.cs
- WSDualHttpBindingElement.cs
- CacheChildrenQuery.cs
- ViewgenGatekeeper.cs
- EntityDataSourceContextCreatedEventArgs.cs
- Matrix3D.cs
- ReferentialConstraint.cs
- XmlCharCheckingReader.cs
- UTF32Encoding.cs
- MessageEventSubscriptionService.cs
- TableDesigner.cs
- HtmlWindow.cs
- ToolStripRendererSwitcher.cs
- DataBindingCollectionConverter.cs
- ImageAutomationPeer.cs