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
- EntityCodeGenerator.cs
- VariableQuery.cs
- CircleHotSpot.cs
- DirectionalLight.cs
- TextEffect.cs
- HttpCookiesSection.cs
- TemplateBindingExtensionConverter.cs
- RegexInterpreter.cs
- ClientEventManager.cs
- ObjectSpanRewriter.cs
- ScriptControlDescriptor.cs
- LinqDataSourceUpdateEventArgs.cs
- TableStyle.cs
- LingerOption.cs
- LinqDataSourceInsertEventArgs.cs
- TraceSection.cs
- PersonalizableAttribute.cs
- IssuanceTokenProviderState.cs
- SkipQueryOptionExpression.cs
- TextLine.cs
- SystemIPAddressInformation.cs
- IsolatedStorageFileStream.cs
- FirstMatchCodeGroup.cs
- Hashtable.cs
- ProxyHelper.cs
- UnaryQueryOperator.cs
- LineServicesCallbacks.cs
- PathStreamGeometryContext.cs
- QueuePropertyVariants.cs
- TableCellAutomationPeer.cs
- DispatcherHookEventArgs.cs
- UniformGrid.cs
- SpeechSynthesizer.cs
- TreeViewCancelEvent.cs
- SpecialNameAttribute.cs
- PeerPresenceInfo.cs
- VisualProxy.cs
- ToolStripRendererSwitcher.cs
- FileSystemWatcher.cs
- RootAction.cs
- RegisteredExpandoAttribute.cs
- NativeActivityMetadata.cs
- AttributeUsageAttribute.cs
- _SslState.cs
- DesignerTextViewAdapter.cs
- Win32SafeHandles.cs
- PropertyGrid.cs
- ColorConvertedBitmapExtension.cs
- GeneralTransform3DGroup.cs
- TypeConverterHelper.cs
- ValidatorCompatibilityHelper.cs
- ImageAttributes.cs
- HttpContextServiceHost.cs
- WinEventHandler.cs
- WebException.cs
- DependencyPropertyChangedEventArgs.cs
- remotingproxy.cs
- IsolatedStorageFile.cs
- DataGridCommandEventArgs.cs
- AnnouncementEventArgs.cs
- LinqDataSourceEditData.cs
- MexHttpBindingCollectionElement.cs
- ReachPageContentSerializer.cs
- ReadingWritingEntityEventArgs.cs
- TagMapCollection.cs
- XmlSchemaSimpleTypeUnion.cs
- ScriptResourceInfo.cs
- KeyNotFoundException.cs
- MarkupExtensionParser.cs
- SelectionProviderWrapper.cs
- CellParagraph.cs
- RequestQueryParser.cs
- RelatedImageListAttribute.cs
- MediaCommands.cs
- ClientUtils.cs
- OleDbError.cs
- GPPOINTF.cs
- OdbcConnectionHandle.cs
- Script.cs
- wmiprovider.cs
- XmlIlTypeHelper.cs
- Timer.cs
- AstTree.cs
- XmlSchemaInclude.cs
- _WinHttpWebProxyDataBuilder.cs
- HttpChannelHelper.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- CodeTryCatchFinallyStatement.cs
- KeyInstance.cs
- XmlnsDefinitionAttribute.cs
- BasicKeyConstraint.cs
- RegistrationServices.cs
- MenuRenderer.cs
- GradientSpreadMethodValidation.cs
- AdobeCFFWrapper.cs
- ProviderConnectionPoint.cs
- OleDbDataReader.cs
- ConditionBrowserDialog.cs
- IndentedWriter.cs
- ImageMapEventArgs.cs