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
- WebPartDeleteVerb.cs
- ToggleButtonAutomationPeer.cs
- SubMenuStyle.cs
- DirectoryInfo.cs
- LayoutManager.cs
- XmlConvert.cs
- SyndicationSerializer.cs
- ParameterReplacerVisitor.cs
- DefaultMemberAttribute.cs
- Run.cs
- FlowLayoutPanel.cs
- MulticastIPAddressInformationCollection.cs
- ExceptionTranslationTable.cs
- FontCollection.cs
- MruCache.cs
- SqlDependencyUtils.cs
- ProbeMatchesApril2005.cs
- QilName.cs
- LinearGradientBrush.cs
- DBSqlParserColumn.cs
- SiteMapNodeCollection.cs
- BaseTreeIterator.cs
- ViewStateModeByIdAttribute.cs
- EasingKeyFrames.cs
- HtmlInputRadioButton.cs
- ActivationArguments.cs
- XmlSchemaIdentityConstraint.cs
- RequestUriProcessor.cs
- rsa.cs
- ChildrenQuery.cs
- WebReferencesBuildProvider.cs
- ArgIterator.cs
- TableLayoutPanelDesigner.cs
- precedingsibling.cs
- LowerCaseStringConverter.cs
- ProgressBarRenderer.cs
- RegularExpressionValidator.cs
- InArgument.cs
- BinaryParser.cs
- HtmlInputFile.cs
- MemoryFailPoint.cs
- XsltCompileContext.cs
- StringAnimationUsingKeyFrames.cs
- FontEmbeddingManager.cs
- ContentDesigner.cs
- BindingWorker.cs
- ServiceHttpHandlerFactory.cs
- Properties.cs
- Component.cs
- SqlHelper.cs
- TabOrder.cs
- Int16.cs
- ContentOnlyMessage.cs
- VectorAnimationBase.cs
- Inflater.cs
- CurrencyManager.cs
- Configuration.cs
- EmptyEnumerator.cs
- ImageCollectionCodeDomSerializer.cs
- FormViewDesigner.cs
- FormView.cs
- StatementContext.cs
- WebPartMovingEventArgs.cs
- PersistenceProviderElement.cs
- OutOfProcStateClientManager.cs
- SqlFacetAttribute.cs
- EdmTypeAttribute.cs
- BamlBinaryWriter.cs
- SqlNotificationRequest.cs
- GridViewRowEventArgs.cs
- MenuItemBinding.cs
- RemoteCryptoDecryptRequest.cs
- NullableBoolConverter.cs
- HttpException.cs
- EntryWrittenEventArgs.cs
- ServiceNameCollection.cs
- ScriptRef.cs
- TemplateKeyConverter.cs
- ConditionalAttribute.cs
- odbcmetadatacolumnnames.cs
- ExitEventArgs.cs
- KoreanCalendar.cs
- ResourceAttributes.cs
- CalloutQueueItem.cs
- XPathNodeHelper.cs
- RootProjectionNode.cs
- ADConnectionHelper.cs
- NodeFunctions.cs
- UiaCoreApi.cs
- SafeProcessHandle.cs
- InvokeFunc.cs
- AdornerDecorator.cs
- DataMemberFieldConverter.cs
- FormViewRow.cs
- Transform.cs
- SessionPageStateSection.cs
- NativeStructs.cs
- PagerSettings.cs
- BoundsDrawingContextWalker.cs
- SimpleBitVector32.cs