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
- KeyNotFoundException.cs
- ElapsedEventArgs.cs
- EncoderParameter.cs
- InternalException.cs
- MonthCalendarDesigner.cs
- updateconfighost.cs
- PagedDataSource.cs
- PropertyTabAttribute.cs
- SQLConvert.cs
- TransactionContextValidator.cs
- BrowserCapabilitiesFactory.cs
- FlowDocument.cs
- GlobalProxySelection.cs
- RegexFCD.cs
- EditorReuseAttribute.cs
- EncodingInfo.cs
- ListControlConvertEventArgs.cs
- TextFindEngine.cs
- TdsParserSafeHandles.cs
- BidPrivateBase.cs
- CompilationUtil.cs
- InlineObject.cs
- SchemaElement.cs
- MetadataItemEmitter.cs
- DrawingContextWalker.cs
- DataSet.cs
- DeviceContext2.cs
- FixedPosition.cs
- PenLineCapValidation.cs
- CSharpCodeProvider.cs
- CompilerInfo.cs
- FormViewDeleteEventArgs.cs
- FamilyMap.cs
- IgnorePropertiesAttribute.cs
- ClientBase.cs
- SingleSelectRootGridEntry.cs
- VisualBrush.cs
- InternalSafeNativeMethods.cs
- MSAAEventDispatcher.cs
- ToolboxComponentsCreatedEventArgs.cs
- SQLSingle.cs
- entitydatasourceentitysetnameconverter.cs
- RectangleConverter.cs
- RightsManagementPermission.cs
- WebPartConnectionsDisconnectVerb.cs
- SqlProfileProvider.cs
- Buffer.cs
- ListControl.cs
- ObjectStateFormatter.cs
- CodeRegionDirective.cs
- TreeNodeMouseHoverEvent.cs
- SimpleTypesSurrogate.cs
- BooleanAnimationBase.cs
- PropertyIDSet.cs
- ReflectionUtil.cs
- OdbcParameter.cs
- HttpTransportSecurity.cs
- Calendar.cs
- ViewSimplifier.cs
- InstrumentationTracker.cs
- CompositeCollectionView.cs
- MetaForeignKeyColumn.cs
- VectorKeyFrameCollection.cs
- PolicyUtility.cs
- FixUpCollection.cs
- CssTextWriter.cs
- RegexNode.cs
- QuadraticBezierSegment.cs
- BrowsableAttribute.cs
- RegistrySecurity.cs
- SmiEventSink_Default.cs
- SystemDropShadowChrome.cs
- indexingfiltermarshaler.cs
- StylusTip.cs
- RangeValuePatternIdentifiers.cs
- ViewGenResults.cs
- GroupBoxRenderer.cs
- MasterPageCodeDomTreeGenerator.cs
- HttpConfigurationContext.cs
- ParameterElementCollection.cs
- NotifyInputEventArgs.cs
- HttpPostedFile.cs
- XmlSchemas.cs
- RelOps.cs
- _NegoStream.cs
- ToggleProviderWrapper.cs
- GZipStream.cs
- __ComObject.cs
- CellTreeNodeVisitors.cs
- AutomationEvent.cs
- BindableAttribute.cs
- _SSPIWrapper.cs
- UIElement3D.cs
- CancelEventArgs.cs
- EntityDataSourceSelectingEventArgs.cs
- NativeCppClassAttribute.cs
- SizeLimitedCache.cs
- DirectoryObjectSecurity.cs
- Model3DGroup.cs
- IndexedString.cs