Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OSFeature.cs
- SiteMapNode.cs
- EventWaitHandleSecurity.cs
- ImageButton.cs
- ResourcePool.cs
- HtmlElementCollection.cs
- DeviceSpecificChoice.cs
- SqlGatherProducedAliases.cs
- MailMessageEventArgs.cs
- BasicHttpBinding.cs
- DrawingContextWalker.cs
- ExpressionBuilderContext.cs
- HttpHostedTransportConfiguration.cs
- MissingSatelliteAssemblyException.cs
- HttpApplicationFactory.cs
- DataMemberAttribute.cs
- LineGeometry.cs
- FlowDocumentFormatter.cs
- EnumMember.cs
- DataRowView.cs
- TlsnegoTokenProvider.cs
- SQLGuidStorage.cs
- MiniParameterInfo.cs
- TrustManagerMoreInformation.cs
- Encoder.cs
- Column.cs
- SectionInformation.cs
- CqlParserHelpers.cs
- ExecutedRoutedEventArgs.cs
- InputLanguageManager.cs
- PrePrepareMethodAttribute.cs
- ReturnValue.cs
- NamespaceList.cs
- Opcode.cs
- NetSectionGroup.cs
- SearchExpression.cs
- Tool.cs
- TrueReadOnlyCollection.cs
- ProfileSettingsCollection.cs
- LinkLabel.cs
- handlecollector.cs
- TransactionFilter.cs
- SocketElement.cs
- SoapProtocolImporter.cs
- KeyboardNavigation.cs
- HttpCapabilitiesSectionHandler.cs
- DataKey.cs
- StringExpressionSet.cs
- WmlValidatorAdapter.cs
- CollectionBase.cs
- TextReturnReader.cs
- CookieParameter.cs
- SoapElementAttribute.cs
- LocalizationParserHooks.cs
- DesignerToolboxInfo.cs
- SnapLine.cs
- FixedSOMTable.cs
- TransactionState.cs
- SlipBehavior.cs
- sqlstateclientmanager.cs
- LinqDataSourceDisposeEventArgs.cs
- ContainerSelectorBehavior.cs
- SingleKeyFrameCollection.cs
- TextChangedEventArgs.cs
- CancelEventArgs.cs
- CodeArrayIndexerExpression.cs
- DataPagerFieldItem.cs
- HandledEventArgs.cs
- TimeSpanParse.cs
- TaiwanLunisolarCalendar.cs
- Floater.cs
- BridgeDataRecord.cs
- IndependentlyAnimatedPropertyMetadata.cs
- Control.cs
- MenuEventArgs.cs
- SchemaCollectionCompiler.cs
- CookieParameter.cs
- MemberDescriptor.cs
- BitmapEffectInputConnector.cs
- TransformedBitmap.cs
- VerificationException.cs
- ToolStripItemRenderEventArgs.cs
- Latin1Encoding.cs
- SapiAttributeParser.cs
- DataSourceBooleanViewSchemaConverter.cs
- SqlMethodAttribute.cs
- CanonicalXml.cs
- AxisAngleRotation3D.cs
- ControlType.cs
- VisualStates.cs
- Ticks.cs
- AffineTransform3D.cs
- Axis.cs
- TargetConverter.cs
- DecimalAverageAggregationOperator.cs
- DataSourceExpressionCollection.cs
- QueryRewriter.cs
- _NTAuthentication.cs
- GuidTagList.cs
- ErrorEventArgs.cs