Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataWeb / Server / System / Data / Services / HandleExceptionArgs.cs / 1 / HandleExceptionArgs.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Provides a class to provide data to the exception handling // process. // // // @owner [....] //--------------------------------------------------------------------- namespace System.Data.Services { using System; ///Use this class to customize how exceptions are handled. public class HandleExceptionArgs { #region Private fields. ///Whether the response has already been written out. private readonly bool responseWritten; ///The MIME type used to write the response. private readonly string responseContentType; ///The private Exception exception; ///being handled. Whether a verbose response is appropriate. private bool useVerboseErrors; #endregion Private fields. #region Constructors. ///Initalizes a new /// Theinstance. being handled. /// Whether the response has already been written out. /// The MIME type used to write the response. /// Whether a verbose response is appropriate. internal HandleExceptionArgs(Exception exception, bool responseWritten, string contentType, bool verboseResponse) { this.exception = WebUtil.CheckArgumentNull(exception, "exception"); this.responseWritten = responseWritten; this.responseContentType = contentType; this.useVerboseErrors = verboseResponse; } #endregion Constructors. #region Public properties. /// Gets or sets the ///being handled. This property may be null. public Exception Exception { get { return this.exception; } set { this.exception = value; } } ///Gets the content type for response. public string ResponseContentType { get { return this.responseContentType; } } ///Gets the HTTP status code for the response. public int ResponseStatusCode { get { if (this.exception is DataServiceException) { return ((DataServiceException)this.exception).StatusCode; } else { return 500; // Internal Server Error. } } } ///Gets a value indicating whether the response has already been written out. public bool ResponseWritten { get { return this.responseWritten; } } ///Gets or sets whether a verbose response is appropriate. public bool UseVerboseErrors { get { return this.useVerboseErrors; } set { this.useVerboseErrors = value; } } #endregion Public properties. #region Internal properties. ///The value for the 'Allow' response header. internal string ResponseAllowHeader { get { if (this.exception is DataServiceException) { return ((DataServiceException)this.exception).ResponseAllowHeader; } else { return null; } } } #endregion Internal properties. } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Provides a class to provide data to the exception handling // process. // // // @owner [....] //--------------------------------------------------------------------- namespace System.Data.Services { using System; ///Use this class to customize how exceptions are handled. public class HandleExceptionArgs { #region Private fields. ///Whether the response has already been written out. private readonly bool responseWritten; ///The MIME type used to write the response. private readonly string responseContentType; ///The private Exception exception; ///being handled. Whether a verbose response is appropriate. private bool useVerboseErrors; #endregion Private fields. #region Constructors. ///Initalizes a new /// Theinstance. being handled. /// Whether the response has already been written out. /// The MIME type used to write the response. /// Whether a verbose response is appropriate. internal HandleExceptionArgs(Exception exception, bool responseWritten, string contentType, bool verboseResponse) { this.exception = WebUtil.CheckArgumentNull(exception, "exception"); this.responseWritten = responseWritten; this.responseContentType = contentType; this.useVerboseErrors = verboseResponse; } #endregion Constructors. #region Public properties. /// Gets or sets the ///being handled. This property may be null. public Exception Exception { get { return this.exception; } set { this.exception = value; } } ///Gets the content type for response. public string ResponseContentType { get { return this.responseContentType; } } ///Gets the HTTP status code for the response. public int ResponseStatusCode { get { if (this.exception is DataServiceException) { return ((DataServiceException)this.exception).StatusCode; } else { return 500; // Internal Server Error. } } } ///Gets a value indicating whether the response has already been written out. public bool ResponseWritten { get { return this.responseWritten; } } ///Gets or sets whether a verbose response is appropriate. public bool UseVerboseErrors { get { return this.useVerboseErrors; } set { this.useVerboseErrors = value; } } #endregion Public properties. #region Internal properties. ///The value for the 'Allow' response header. internal string ResponseAllowHeader { get { if (this.exception is DataServiceException) { return ((DataServiceException)this.exception).ResponseAllowHeader; } else { return null; } } } #endregion Internal properties. } } // 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
- ViewGenerator.cs
- baseshape.cs
- FileUtil.cs
- IsolatedStorageException.cs
- PKCS1MaskGenerationMethod.cs
- SessionState.cs
- HtmlButton.cs
- OpenTypeMethods.cs
- AssociationProvider.cs
- PatternMatcher.cs
- SqlFunctionAttribute.cs
- VScrollProperties.cs
- TypeLoadException.cs
- VirtualizingStackPanel.cs
- XamlSerializationHelper.cs
- SourceFilter.cs
- MenuItem.cs
- PropertyManager.cs
- VirtualPathUtility.cs
- UseManagedPresentationElement.cs
- WeakReferenceEnumerator.cs
- Matrix3D.cs
- XmlNodeList.cs
- Helper.cs
- MouseWheelEventArgs.cs
- ResourceWriter.cs
- ListDataBindEventArgs.cs
- TransactionScope.cs
- HitTestWithPointDrawingContextWalker.cs
- AstNode.cs
- SqlUnionizer.cs
- CultureInfo.cs
- TypeResolvingOptionsAttribute.cs
- Odbc32.cs
- SpeechRecognizer.cs
- codemethodreferenceexpression.cs
- XsltException.cs
- Typography.cs
- BuiltInExpr.cs
- CodeDOMProvider.cs
- OdbcParameterCollection.cs
- HtmlSelect.cs
- MulticastDelegate.cs
- ExpressionEditorAttribute.cs
- CardSpaceException.cs
- WinFormsComponentEditor.cs
- SqlErrorCollection.cs
- Model3DGroup.cs
- GridViewRowPresenter.cs
- DataGridViewComboBoxCell.cs
- SqlTopReducer.cs
- DataSourceView.cs
- TextEditorCopyPaste.cs
- Int32AnimationUsingKeyFrames.cs
- XmlNodeComparer.cs
- AspNetSynchronizationContext.cs
- _RegBlobWebProxyDataBuilder.cs
- DataGridViewRowHeaderCell.cs
- ConfigurationStrings.cs
- ToolBarPanel.cs
- FacetDescription.cs
- Pair.cs
- AsymmetricAlgorithm.cs
- ConnectorDragDropGlyph.cs
- ExternalFile.cs
- LineServices.cs
- Point4D.cs
- PerfService.cs
- Popup.cs
- HandledMouseEvent.cs
- DataGridViewComboBoxColumn.cs
- ProfileParameter.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- PropertyInfo.cs
- SpStreamWrapper.cs
- SHA256.cs
- HMACSHA1.cs
- HtmlInputCheckBox.cs
- ReadOnlyCollectionBase.cs
- BitStream.cs
- QilBinary.cs
- HierarchicalDataBoundControl.cs
- EntityTypeBase.cs
- NumberAction.cs
- TableLayoutColumnStyleCollection.cs
- WmlObjectListAdapter.cs
- LocalsItemDescription.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- ArrayElementGridEntry.cs
- behaviorssection.cs
- WindowsRegion.cs
- Update.cs
- FormViewModeEventArgs.cs
- RegexNode.cs
- XPathNodeIterator.cs
- DependencySource.cs
- ActivityCodeDomReferenceService.cs
- SystemInfo.cs
- VisualCollection.cs
- StringBuilder.cs