Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- UnsafeNativeMethodsMilCoreApi.cs
- LinqDataSourceStatusEventArgs.cs
- BufferedOutputStream.cs
- Win32KeyboardDevice.cs
- Annotation.cs
- AspProxy.cs
- PrivilegedConfigurationManager.cs
- ComponentEvent.cs
- EditorPartChrome.cs
- MatrixAnimationBase.cs
- VisualTreeHelper.cs
- ThumbButtonInfo.cs
- FactoryMaker.cs
- BeginEvent.cs
- _TransmitFileOverlappedAsyncResult.cs
- milexports.cs
- DetailsView.cs
- MetaTable.cs
- AssemblyAttributes.cs
- DataControlButton.cs
- PinnedBufferMemoryStream.cs
- OutputCacheSettings.cs
- EnumerableCollectionView.cs
- Listen.cs
- RijndaelManagedTransform.cs
- AudioStateChangedEventArgs.cs
- ErrorLog.cs
- CacheVirtualItemsEvent.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- HtmlElementEventArgs.cs
- WebBrowserUriTypeConverter.cs
- FilteredXmlReader.cs
- CustomCategoryAttribute.cs
- ToolStripControlHost.cs
- Variable.cs
- DateTimeSerializationSection.cs
- EndOfStreamException.cs
- EdmScalarPropertyAttribute.cs
- EventData.cs
- __FastResourceComparer.cs
- AssociationSet.cs
- ToggleButtonAutomationPeer.cs
- OleDbConnectionInternal.cs
- SqlProfileProvider.cs
- SortedDictionary.cs
- WindowAutomationPeer.cs
- JournalEntryStack.cs
- documentation.cs
- OdbcHandle.cs
- GridItemProviderWrapper.cs
- ListenerSingletonConnectionReader.cs
- Font.cs
- DateTimeValueSerializer.cs
- Invariant.cs
- HtmlEmptyTagControlBuilder.cs
- ResourceProviderFactory.cs
- Point3DAnimation.cs
- QuaternionAnimationUsingKeyFrames.cs
- SingleStorage.cs
- AppSettingsExpressionBuilder.cs
- PathSegmentCollection.cs
- ParameterCollection.cs
- InvokeHandlers.cs
- AuthenticationModuleElementCollection.cs
- PersistenceMetadataNamespace.cs
- ProfileBuildProvider.cs
- StreamUpgradeProvider.cs
- BridgeDataRecord.cs
- DispatchChannelSink.cs
- IdnElement.cs
- IntSecurity.cs
- FormattedText.cs
- XmlKeywords.cs
- LocatorPartList.cs
- DateTimeOffsetConverter.cs
- TextEvent.cs
- MinimizableAttributeTypeConverter.cs
- RootBrowserWindow.cs
- EntityModelSchemaGenerator.cs
- AttachedPropertyDescriptor.cs
- SqlClientFactory.cs
- ImageFormat.cs
- Queue.cs
- ResourcePart.cs
- StorageMappingItemCollection.cs
- InternalBufferManager.cs
- TypeEnumerableViewSchema.cs
- LocalizationParserHooks.cs
- CustomErrorCollection.cs
- CacheChildrenQuery.cs
- DesignerActionMethodItem.cs
- SqlConnectionString.cs
- SharedStatics.cs
- BuildDependencySet.cs
- ListenerServiceInstallComponent.cs
- Point4D.cs
- XmlSchemaAny.cs
- GACIdentityPermission.cs
- DataGridView.cs
- NetworkInterface.cs