Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / SendingRequestEventArgs.cs / 1305376 / SendingRequestEventArgs.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Event args for the event fired before executing a web request. Gives a // chance to customize or replace the request object to be used. // //--------------------------------------------------------------------- namespace System.Data.Services.Client { using System; using System.Diagnostics; ////// Event args for the event fired before executing a web request. Gives a /// chance to customize or replace the request object to be used. /// public class SendingRequestEventArgs : EventArgs { ///The web request reported through this event #if ASTORIA_LIGHT [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "Not used in Silverlight")] #endif private System.Net.WebRequest request; ///The request header collection. private System.Net.WebHeaderCollection requestHeaders; ////// Constructor /// /// The request reported through this event /// The request header collection. internal SendingRequestEventArgs(System.Net.WebRequest request, System.Net.WebHeaderCollection requestHeaders) { // In Silverlight the request object is not accesible #if ASTORIA_LIGHT Debug.Assert(null == request, "non-null request in SL."); #else Debug.Assert(null != request, "null request"); #endif Debug.Assert(null != requestHeaders, "null requestHeaders"); this.request = request; this.requestHeaders = requestHeaders; } #if !ASTORIA_LIGHT // Data.Services http stack ///The web request reported through this event. The handler may modify or replace it. public System.Net.WebRequest Request { get { return this.request; } set { Util.CheckArgumentNull(value, "value"); if (!(value is System.Net.HttpWebRequest)) { throw Error.Argument(Strings.Context_SendingRequestEventArgsNotHttp, "value"); } this.request = value; this.requestHeaders = value.Headers; } } #endif ///The request header collection. public System.Net.WebHeaderCollection RequestHeaders { get { return this.requestHeaders; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Event args for the event fired before executing a web request. Gives a // chance to customize or replace the request object to be used. // //--------------------------------------------------------------------- namespace System.Data.Services.Client { using System; using System.Diagnostics; ////// Event args for the event fired before executing a web request. Gives a /// chance to customize or replace the request object to be used. /// public class SendingRequestEventArgs : EventArgs { ///The web request reported through this event #if ASTORIA_LIGHT [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "Not used in Silverlight")] #endif private System.Net.WebRequest request; ///The request header collection. private System.Net.WebHeaderCollection requestHeaders; ////// Constructor /// /// The request reported through this event /// The request header collection. internal SendingRequestEventArgs(System.Net.WebRequest request, System.Net.WebHeaderCollection requestHeaders) { // In Silverlight the request object is not accesible #if ASTORIA_LIGHT Debug.Assert(null == request, "non-null request in SL."); #else Debug.Assert(null != request, "null request"); #endif Debug.Assert(null != requestHeaders, "null requestHeaders"); this.request = request; this.requestHeaders = requestHeaders; } #if !ASTORIA_LIGHT // Data.Services http stack ///The web request reported through this event. The handler may modify or replace it. public System.Net.WebRequest Request { get { return this.request; } set { Util.CheckArgumentNull(value, "value"); if (!(value is System.Net.HttpWebRequest)) { throw Error.Argument(Strings.Context_SendingRequestEventArgsNotHttp, "value"); } this.request = value; this.requestHeaders = value.Headers; } } #endif ///The request header collection. public System.Net.WebHeaderCollection RequestHeaders { get { return this.requestHeaders; } } } } // 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
- UnknownWrapper.cs
- PrintDialog.cs
- QilList.cs
- KernelTypeValidation.cs
- PeerNeighborManager.cs
- MergeFilterQuery.cs
- CustomErrorCollection.cs
- Table.cs
- RemoteCryptoDecryptRequest.cs
- StoreContentChangedEventArgs.cs
- CompleteWizardStep.cs
- CipherData.cs
- Stack.cs
- SvcMapFileLoader.cs
- FormsAuthentication.cs
- DiscoveryEndpointValidator.cs
- LayoutInformation.cs
- TypeConverter.cs
- TdsValueSetter.cs
- ProfessionalColorTable.cs
- DataBinder.cs
- ThicknessAnimationUsingKeyFrames.cs
- DrawingContextDrawingContextWalker.cs
- ObjectStorage.cs
- ScriptModule.cs
- XPathMultyIterator.cs
- Rect.cs
- IndexingContentUnit.cs
- TextBlock.cs
- DataTrigger.cs
- GenericRootAutomationPeer.cs
- DataSourceControlBuilder.cs
- HttpRequestBase.cs
- panel.cs
- Compiler.cs
- EnvelopedSignatureTransform.cs
- UIHelper.cs
- TemplateModeChangedEventArgs.cs
- GuidelineSet.cs
- CodeGenerator.cs
- ProjectedSlot.cs
- UrlParameterReader.cs
- StreamAsIStream.cs
- XmlSchemaSubstitutionGroup.cs
- IriParsingElement.cs
- HttpApplicationFactory.cs
- ErrorRuntimeConfig.cs
- XamlStyleSerializer.cs
- AlternateViewCollection.cs
- SQLDouble.cs
- RtfFormatStack.cs
- SerTrace.cs
- BitmapEffectDrawing.cs
- TextEffect.cs
- SequenceDesigner.cs
- ReflectionServiceProvider.cs
- Error.cs
- DBSqlParserTable.cs
- MenuItemCollection.cs
- MenuItem.cs
- ComponentResourceKeyConverter.cs
- SessionStateSection.cs
- FacetEnabledSchemaElement.cs
- CacheHelper.cs
- CharStorage.cs
- MessageQueuePermissionEntryCollection.cs
- SplayTreeNode.cs
- TextServicesCompartmentContext.cs
- QuadraticBezierSegment.cs
- PropertyTabAttribute.cs
- BrushMappingModeValidation.cs
- DataRelationPropertyDescriptor.cs
- XmlSerializableServices.cs
- StylusShape.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- WebPartEditorCancelVerb.cs
- RecognizedWordUnit.cs
- wgx_render.cs
- Model3DCollection.cs
- Site.cs
- PropertyGridEditorPart.cs
- TextEndOfParagraph.cs
- PointValueSerializer.cs
- MenuAdapter.cs
- WebPartAuthorizationEventArgs.cs
- CoreSwitches.cs
- FloaterParagraph.cs
- CatalogZoneAutoFormat.cs
- SortKey.cs
- SHA1Managed.cs
- ImageFormat.cs
- SRef.cs
- DataGridTableStyleMappingNameEditor.cs
- EntitySqlQueryCacheKey.cs
- bidPrivateBase.cs
- TextEmbeddedObject.cs
- PropertyToken.cs
- SerialErrors.cs
- AuthenticationModuleElement.cs
- ProfileGroupSettingsCollection.cs