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
- FileStream.cs
- UnsafeNativeMethodsPenimc.cs
- ReflectionPermission.cs
- ICollection.cs
- EntityDataSourceStatementEditorForm.cs
- COM2Enum.cs
- HttpDebugHandler.cs
- SamlConstants.cs
- WebColorConverter.cs
- _NegoStream.cs
- EventLogPermissionAttribute.cs
- BufferedStream.cs
- Baml6ConstructorInfo.cs
- FocusChangedEventArgs.cs
- ImportContext.cs
- SortedDictionary.cs
- SimpleApplicationHost.cs
- WindowsScrollBarBits.cs
- DrawListViewItemEventArgs.cs
- ContentDisposition.cs
- DescendantOverDescendantQuery.cs
- ButtonField.cs
- ResourceProviderFactory.cs
- TreeNodeBindingDepthConverter.cs
- ColorInterpolationModeValidation.cs
- ObjectTypeMapping.cs
- ComplexBindingPropertiesAttribute.cs
- Emitter.cs
- NetworkCredential.cs
- ObjectCloneHelper.cs
- CompoundFileStorageReference.cs
- XmlComment.cs
- Cursor.cs
- InheritanceContextHelper.cs
- TextShapeableCharacters.cs
- DbProviderSpecificTypePropertyAttribute.cs
- BindingGraph.cs
- ObjectSet.cs
- Msec.cs
- TextElementEditingBehaviorAttribute.cs
- ParameterCollection.cs
- SizeF.cs
- CheckBoxAutomationPeer.cs
- SafeLocalMemHandle.cs
- Compiler.cs
- DragStartedEventArgs.cs
- ElementsClipboardData.cs
- _HeaderInfoTable.cs
- OleDbConnectionInternal.cs
- DocumentOrderQuery.cs
- DetailsViewRow.cs
- PathHelper.cs
- SerializerDescriptor.cs
- OdbcDataReader.cs
- SapiRecoContext.cs
- BehaviorService.cs
- NumberSubstitution.cs
- ExpandCollapsePattern.cs
- BlockUIContainer.cs
- Itemizer.cs
- TreeView.cs
- DefaultTextStoreTextComposition.cs
- HttpBrowserCapabilitiesBase.cs
- OutputCacheSettingsSection.cs
- TimeSpanOrInfiniteConverter.cs
- CodeDirectoryCompiler.cs
- XslNumber.cs
- XmlSchemaInfo.cs
- PeerCollaborationPermission.cs
- TrackBar.cs
- InputLangChangeEvent.cs
- XmlSchemaComplexContent.cs
- WindowsFormsHost.cs
- Rules.cs
- tabpagecollectioneditor.cs
- MultiBinding.cs
- Int16Storage.cs
- SmtpTransport.cs
- MarkupCompiler.cs
- LogAppendAsyncResult.cs
- KnowledgeBase.cs
- ExpressionWriter.cs
- EventLogPermissionEntryCollection.cs
- KeyMatchBuilder.cs
- UniqueEventHelper.cs
- DataList.cs
- ImageButton.cs
- SendOperation.cs
- StorageBasedPackageProperties.cs
- HtmlLink.cs
- DetailsViewPagerRow.cs
- SqlRemoveConstantOrderBy.cs
- Command.cs
- ResponseStream.cs
- ZoneMembershipCondition.cs
- DataTemplateKey.cs
- HtmlSelect.cs
- DigestTraceRecordHelper.cs
- Model3DCollection.cs
- ValidatorCompatibilityHelper.cs