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
- AsyncOperationManager.cs
- SchemeSettingElement.cs
- WebPartDisplayModeCancelEventArgs.cs
- XPathQilFactory.cs
- TableCellAutomationPeer.cs
- ResourceAttributes.cs
- PolicyManager.cs
- PolyBezierSegment.cs
- EventLogQuery.cs
- DirectoryObjectSecurity.cs
- ConfigurationManagerInternalFactory.cs
- CrossContextChannel.cs
- SizeAnimationUsingKeyFrames.cs
- ClickablePoint.cs
- DataBindingCollectionEditor.cs
- SymDocumentType.cs
- HitTestWithPointDrawingContextWalker.cs
- FacetDescription.cs
- PerformanceCounterManager.cs
- SymDocumentType.cs
- TextEndOfLine.cs
- LockedHandleGlyph.cs
- ProfileSettingsCollection.cs
- odbcmetadatacolumnnames.cs
- WindowsListViewItemCheckBox.cs
- DeflateStream.cs
- Oid.cs
- DataFieldConverter.cs
- CqlWriter.cs
- InvalidPrinterException.cs
- WeakReferenceList.cs
- ListParaClient.cs
- TextRenderingModeValidation.cs
- SByte.cs
- MainMenu.cs
- MetadataItem.cs
- diagnosticsswitches.cs
- Errors.cs
- NamespaceDecl.cs
- WaitHandle.cs
- ComponentCollection.cs
- Point3DConverter.cs
- TreeNodeCollection.cs
- EntityCommandExecutionException.cs
- XhtmlTextWriter.cs
- TabControl.cs
- QuaternionKeyFrameCollection.cs
- SchemaNotation.cs
- ProcessModuleCollection.cs
- DataGridViewHeaderCell.cs
- CodeTypeDeclaration.cs
- DataGridColumn.cs
- DerivedKeyCachingSecurityTokenSerializer.cs
- SqlServices.cs
- GridViewEditEventArgs.cs
- StrokeCollectionConverter.cs
- Vector3D.cs
- __Filters.cs
- MimeFormatExtensions.cs
- DynamicResourceExtensionConverter.cs
- DataView.cs
- Calendar.cs
- ColorConverter.cs
- RuleInfoComparer.cs
- TextBoxBase.cs
- ToolStrip.cs
- UIElementAutomationPeer.cs
- Point4D.cs
- SchemaTableOptionalColumn.cs
- StylusPointPropertyId.cs
- InternalPermissions.cs
- ValueSerializerAttribute.cs
- XmlSchemaSequence.cs
- CodeParameterDeclarationExpression.cs
- RunClient.cs
- SyndicationDeserializer.cs
- AssemblyResourceLoader.cs
- StringAnimationBase.cs
- XmlLanguage.cs
- DbConnectionPoolOptions.cs
- Blend.cs
- TrustSection.cs
- EntityDataSourceWrapperCollection.cs
- WorkflowCommandExtensionItem.cs
- Icon.cs
- SequentialUshortCollection.cs
- ProviderConnectionPointCollection.cs
- DesignerWidgets.cs
- TextLine.cs
- GPRECTF.cs
- XamlHttpHandlerFactory.cs
- DES.cs
- ControlEvent.cs
- RectangleConverter.cs
- RegionIterator.cs
- AsyncDataRequest.cs
- EdmMember.cs
- DecoderNLS.cs
- AnimationClock.cs
- RowTypeElement.cs