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
- FieldNameLookup.cs
- TextTreeRootTextBlock.cs
- OpacityConverter.cs
- ErrorHandler.cs
- EqualityComparer.cs
- HeaderedContentControl.cs
- FrameworkElementFactory.cs
- XamlFigureLengthSerializer.cs
- NamedServiceModelExtensionCollectionElement.cs
- ApplicationSecurityManager.cs
- HttpChannelListener.cs
- OptionUsage.cs
- OleDbInfoMessageEvent.cs
- SafeSecurityHandles.cs
- ButtonBase.cs
- BitmapEffectGeneralTransform.cs
- SplashScreenNativeMethods.cs
- NetworkAddressChange.cs
- AttachmentCollection.cs
- DataComponentNameHandler.cs
- PrintingPermission.cs
- MsdtcClusterUtils.cs
- ResourcesBuildProvider.cs
- COSERVERINFO.cs
- CharEntityEncoderFallback.cs
- BStrWrapper.cs
- AutomationPropertyInfo.cs
- RangeContentEnumerator.cs
- LineUtil.cs
- CompiledRegexRunner.cs
- DynamicResourceExtension.cs
- ServiceDescription.cs
- MarkupCompilePass2.cs
- SignHashRequest.cs
- ColumnWidthChangingEvent.cs
- CompressedStack.cs
- ComboBoxRenderer.cs
- EventData.cs
- CompareValidator.cs
- DrawingAttributeSerializer.cs
- InkPresenterAutomationPeer.cs
- SqlDataSourceView.cs
- Model3DCollection.cs
- NestedContainer.cs
- EnumConverter.cs
- ContainerSelectorBehavior.cs
- Compiler.cs
- InvokeProviderWrapper.cs
- DataViewListener.cs
- ComplexLine.cs
- SiteMapDataSourceView.cs
- PersistenceException.cs
- Mouse.cs
- AbandonedMutexException.cs
- UriTemplateTrieLocation.cs
- PathGeometry.cs
- XmlBinaryWriterSession.cs
- StatusBarPanel.cs
- __ConsoleStream.cs
- OraclePermission.cs
- Activity.cs
- UniqueIdentifierService.cs
- ValidationPropertyAttribute.cs
- DiagnosticsConfigurationHandler.cs
- WorkflowHostingEndpoint.cs
- MarkupExtensionReturnTypeAttribute.cs
- UserControl.cs
- ServiceObjectContainer.cs
- DataRowChangeEvent.cs
- AxisAngleRotation3D.cs
- ArrayWithOffset.cs
- AuthorizationSection.cs
- ExitEventArgs.cs
- SingleConverter.cs
- SimpleApplicationHost.cs
- ListItemsCollectionEditor.cs
- HtmlInputRadioButton.cs
- FixedSOMPageElement.cs
- FragmentQueryKB.cs
- DragCompletedEventArgs.cs
- NamespaceCollection.cs
- TaskFormBase.cs
- NetworkInformationException.cs
- WebPartTransformerAttribute.cs
- XPathPatternBuilder.cs
- SAPICategories.cs
- ActivityDesigner.cs
- Margins.cs
- EndGetFileNameFromUserRequest.cs
- Root.cs
- TextDecorations.cs
- DetailsViewPageEventArgs.cs
- CrossSiteScriptingValidation.cs
- GeneralTransform.cs
- TagMapInfo.cs
- TransactionManager.cs
- SamlSubjectStatement.cs
- TagElement.cs
- CompositionAdorner.cs
- ConsoleCancelEventArgs.cs