Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / HttpRequestMessageProperty.cs / 2 / HttpRequestMessageProperty.cs
//---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------------------- namespace System.ServiceModel.Channels { using System; using System.Net; using System.ServiceModel.Activation; using System.Collections.Specialized; public sealed class HttpRequestMessageProperty { WebHeaderCollection headers; string method; string queryString; bool suppressEntityBody; HttpListenerRequest listenerRequest; HostedRequestContainer hostedRequestContainer; internal HttpRequestMessageProperty(HttpListenerRequest listenerRequest) : this() { this.listenerRequest = listenerRequest; } internal HttpRequestMessageProperty(HostedRequestContainer hostedRequest) : this() { this.hostedRequestContainer = hostedRequest; } public HttpRequestMessageProperty() { this.method = "POST"; this.queryString = string.Empty; this.suppressEntityBody = false; } public static string Name { get { return "httpRequest"; } } public WebHeaderCollection Headers { get { if (this.headers == null) { this.headers = new WebHeaderCollection(); if (this.listenerRequest != null) { this.headers.Add(this.listenerRequest.Headers); // MB 57988 - System.Net strips off user-agent from the headers collection if (this.listenerRequest.UserAgent != null && this.headers[HttpRequestHeader.UserAgent] == null) { this.headers.Add(HttpRequestHeader.UserAgent, this.listenerRequest.UserAgent); } this.listenerRequest = null; } else if (this.hostedRequestContainer != null) { this.hostedRequestContainer.CopyHeaders(this.headers); this.hostedRequestContainer = null; } } return this.headers; } } public string Method { get { return this.method; } set { if (value == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("value"); } this.method = value; } } public string QueryString { get { return this.queryString; } set { if (value == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("value"); } this.queryString = value; } } public bool SuppressEntityBody { get { return this.suppressEntityBody; } set { this.suppressEntityBody = value; } } internal void MakeRequestContainerNull() { this.hostedRequestContainer = null; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OrderedDictionaryStateHelper.cs
- SecurityException.cs
- DtdParser.cs
- DataGridViewRowCancelEventArgs.cs
- ConfigXmlAttribute.cs
- ClientRuntimeConfig.cs
- CellTreeNode.cs
- DetailsViewDeletedEventArgs.cs
- ISAPIRuntime.cs
- XmlSchemaInfo.cs
- PolygonHotSpot.cs
- TraceContext.cs
- ColorIndependentAnimationStorage.cs
- PostBackOptions.cs
- ActiveDocumentEvent.cs
- TiffBitmapDecoder.cs
- HandlerBase.cs
- FlowLayoutPanel.cs
- FileUtil.cs
- TraceContext.cs
- UnsafeNativeMethods.cs
- ContainerParaClient.cs
- XmlDocument.cs
- PersonalizationDictionary.cs
- GlyphElement.cs
- WrapPanel.cs
- IntPtr.cs
- WindowsScroll.cs
- IIS7WorkerRequest.cs
- SafeNativeMethodsMilCoreApi.cs
- TraceRecords.cs
- Dump.cs
- FormsAuthenticationEventArgs.cs
- GeneralTransform2DTo3DTo2D.cs
- basevalidator.cs
- RowsCopiedEventArgs.cs
- Config.cs
- SecurityTokenValidationException.cs
- Camera.cs
- OleDbWrapper.cs
- TransactionTable.cs
- XmlUtf8RawTextWriter.cs
- PowerModeChangedEventArgs.cs
- DataGridRelationshipRow.cs
- ColorInterpolationModeValidation.cs
- WaitHandle.cs
- BoolExpr.cs
- SqlDataReaderSmi.cs
- DeviceSpecificDesigner.cs
- Vector3DKeyFrameCollection.cs
- CategoryGridEntry.cs
- Rules.cs
- CssStyleCollection.cs
- Package.cs
- precedingsibling.cs
- CodeNamespaceImportCollection.cs
- BigInt.cs
- OuterGlowBitmapEffect.cs
- serverconfig.cs
- Html32TextWriter.cs
- SQLInt16Storage.cs
- MiniConstructorInfo.cs
- DbConnectionPoolGroupProviderInfo.cs
- PageWrapper.cs
- SelectionHighlightInfo.cs
- WindowsTooltip.cs
- ProtectedProviderSettings.cs
- NonParentingControl.cs
- ClientReliableChannelBinder.cs
- XmlAttributeOverrides.cs
- DataSourceXmlClassAttribute.cs
- AsynchronousChannel.cs
- QilName.cs
- FormsAuthenticationTicket.cs
- CodeDOMUtility.cs
- ViewBox.cs
- SystemIcmpV4Statistics.cs
- ListSortDescription.cs
- SqlClientFactory.cs
- IdentitySection.cs
- SQLMembershipProvider.cs
- XsdValidatingReader.cs
- StorageEntityContainerMapping.cs
- SqlConnectionString.cs
- JoinTreeNode.cs
- ToolStripLocationCancelEventArgs.cs
- BitmapSizeOptions.cs
- Sql8ConformanceChecker.cs
- ListenerSessionConnection.cs
- ComboBoxAutomationPeer.cs
- Span.cs
- XPathEmptyIterator.cs
- WindowsEditBox.cs
- RequestContext.cs
- FontNamesConverter.cs
- ArgumentNullException.cs
- ResourcesGenerator.cs
- DataGridItemAttachedStorage.cs
- InputLanguageSource.cs
- RoleGroup.cs