Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Net / System / Net / HttpListenerException.cs / 1 / 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
- ObjectDisposedException.cs
- HttpValueCollection.cs
- ZipIOCentralDirectoryFileHeader.cs
- Selection.cs
- COSERVERINFO.cs
- InfoCardListRequest.cs
- WSDualHttpSecurityElement.cs
- CodeSubDirectoriesCollection.cs
- PersonalizationEntry.cs
- IdentityHolder.cs
- RtfFormatStack.cs
- Menu.cs
- CustomAttributeFormatException.cs
- XmlSchemaCollection.cs
- HttpModulesSection.cs
- XmlSchemaAnyAttribute.cs
- ScalarConstant.cs
- ExpressionBuilder.cs
- WebPartZoneBase.cs
- LongCountAggregationOperator.cs
- VisualCollection.cs
- EntityFunctions.cs
- LogStore.cs
- LayoutEngine.cs
- PerfProviderCollection.cs
- SchemaCollectionCompiler.cs
- AbstractDataSvcMapFileLoader.cs
- ContextProperty.cs
- mediaeventargs.cs
- DeploymentSectionCache.cs
- AsynchronousChannel.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- SystemEvents.cs
- TrailingSpaceComparer.cs
- SoapProtocolImporter.cs
- PropertyStore.cs
- CollectionType.cs
- LabelEditEvent.cs
- OpenFileDialog.cs
- XmlSerializationWriter.cs
- CustomCredentialPolicy.cs
- TopClause.cs
- MetafileHeaderEmf.cs
- SafeThreadHandle.cs
- ViewManagerAttribute.cs
- DiscoveryServiceExtension.cs
- DragEvent.cs
- PreviewControlDesigner.cs
- BaseValidatorDesigner.cs
- DeploymentSection.cs
- NativeMethodsOther.cs
- PriorityQueue.cs
- HtmlInputPassword.cs
- Collection.cs
- DBSqlParserTableCollection.cs
- SqlDataSourceSelectingEventArgs.cs
- SelectionUIHandler.cs
- WinFormsSpinner.cs
- CryptoApi.cs
- WindowsFormsSynchronizationContext.cs
- HtmlHead.cs
- SpoolingTask.cs
- DoWorkEventArgs.cs
- KnownTypesProvider.cs
- AuthorizationRuleCollection.cs
- SingleKeyFrameCollection.cs
- infer.cs
- relpropertyhelper.cs
- SingletonChannelAcceptor.cs
- ClientRuntimeConfig.cs
- SqlGenerator.cs
- BindingMAnagerBase.cs
- xdrvalidator.cs
- StrongName.cs
- RadioButtonFlatAdapter.cs
- WebSysDefaultValueAttribute.cs
- ResourceSet.cs
- ContentElement.cs
- ModelItemDictionary.cs
- Tracer.cs
- TokenFactoryCredential.cs
- DrawingServices.cs
- TaskFileService.cs
- ConnectionManager.cs
- ConnectionProviderAttribute.cs
- GridItemProviderWrapper.cs
- AssociationEndMember.cs
- InheritanceContextChangedEventManager.cs
- KeyValueSerializer.cs
- FrameworkTextComposition.cs
- TextBox.cs
- DesignBinding.cs
- WithParamAction.cs
- PolicyLevel.cs
- SystemWebSectionGroup.cs
- WindowsScroll.cs
- Stacktrace.cs
- Operand.cs
- HttpWebResponse.cs
- NativeMethods.cs