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
- HuffmanTree.cs
- ServiceDiscoveryElement.cs
- HttpCapabilitiesSectionHandler.cs
- RegistryPermission.cs
- SqlNotificationEventArgs.cs
- EmptyQuery.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- ConvertBinder.cs
- PreservationFileReader.cs
- PolicyReader.cs
- CompModHelpers.cs
- GeneralTransformGroup.cs
- SymDocumentType.cs
- KeyedHashAlgorithm.cs
- AuthenticationModuleElementCollection.cs
- NameValuePair.cs
- FrameworkReadOnlyPropertyMetadata.cs
- ExpressionWriter.cs
- BitVec.cs
- FormViewRow.cs
- TableItemStyle.cs
- DoubleLink.cs
- AssemblyUtil.cs
- DataSourceProvider.cs
- CommandValueSerializer.cs
- XsdBuildProvider.cs
- AutomationIdentifier.cs
- XsdValidatingReader.cs
- UpdatePanelTriggerCollection.cs
- SqlClientWrapperSmiStream.cs
- EventsTab.cs
- RequestTimeoutManager.cs
- WinFormsUtils.cs
- TypefaceCollection.cs
- RemotingServices.cs
- DataGridViewCellStateChangedEventArgs.cs
- DesignerPainter.cs
- FileEnumerator.cs
- InstalledVoice.cs
- TextPattern.cs
- DataTransferEventArgs.cs
- PropertyItem.cs
- Misc.cs
- smtpconnection.cs
- AttributeConverter.cs
- MaterialCollection.cs
- Operator.cs
- TaiwanLunisolarCalendar.cs
- AddInEnvironment.cs
- XmlHierarchyData.cs
- TransformationRules.cs
- FullTrustAssemblyCollection.cs
- StateDesigner.Layouts.cs
- QueryComponents.cs
- PartialClassGenerationTask.cs
- OracleLob.cs
- Activator.cs
- Scene3D.cs
- CallbackValidator.cs
- ResourceDisplayNameAttribute.cs
- BlurBitmapEffect.cs
- FileUtil.cs
- ListBindingConverter.cs
- UserUseLicenseDictionaryLoader.cs
- SystemIPAddressInformation.cs
- CompilerLocalReference.cs
- DataControlImageButton.cs
- SqlDataSourceEnumerator.cs
- Rss20FeedFormatter.cs
- ToolStripCustomTypeDescriptor.cs
- SecurityState.cs
- X509CertificateClaimSet.cs
- IsolatedStorageException.cs
- ToolStripLocationCancelEventArgs.cs
- RangeEnumerable.cs
- ValueUnavailableException.cs
- TableCell.cs
- AutoResetEvent.cs
- ListBindingHelper.cs
- SchemaNamespaceManager.cs
- ClientSettingsStore.cs
- PagedDataSource.cs
- ErrorRuntimeConfig.cs
- GridViewUpdatedEventArgs.cs
- StreamWriter.cs
- SqlNode.cs
- EntityDataSourceMemberPath.cs
- ModulesEntry.cs
- FileDialog.cs
- DocumentSchemaValidator.cs
- AuthenticateEventArgs.cs
- TextDecorations.cs
- ItemContainerPattern.cs
- DataErrorValidationRule.cs
- IssuedTokensHeader.cs
- FormViewRow.cs
- CssTextWriter.cs
- StrongNameHelpers.cs
- ReadWriteSpinLock.cs
- HttpResponseInternalBase.cs