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
- RelativeSource.cs
- StructuralObject.cs
- ObjectStateFormatter.cs
- ToolStripMenuItem.cs
- StreamReader.cs
- SimpleRecyclingCache.cs
- ToolStripDropDown.cs
- ToolboxItemCollection.cs
- Deflater.cs
- SeekStoryboard.cs
- MetadataArtifactLoaderComposite.cs
- TableLayoutCellPaintEventArgs.cs
- TransferMode.cs
- MethodBody.cs
- ParserStreamGeometryContext.cs
- FastEncoderWindow.cs
- UnsafeNativeMethods.cs
- Point3DKeyFrameCollection.cs
- Binding.cs
- XmlSerializerFactory.cs
- ProbeMatchesMessageCD1.cs
- SymmetricAlgorithm.cs
- PolicyChain.cs
- LinqExpressionNormalizer.cs
- PropertyValueUIItem.cs
- XmlSchemaValidator.cs
- HMACSHA512.cs
- Cloud.cs
- LoginName.cs
- Size.cs
- StructuralType.cs
- MemberProjectionIndex.cs
- WindowsScrollBarBits.cs
- DurationConverter.cs
- WebPartTransformer.cs
- FormatConvertedBitmap.cs
- WithParamAction.cs
- ByteStream.cs
- ObjectManager.cs
- CatalogZoneBase.cs
- Binding.cs
- MenuEventArgs.cs
- CopyAttributesAction.cs
- IPAddress.cs
- Context.cs
- FrameworkElementFactory.cs
- TemplateNameScope.cs
- ListBox.cs
- SmiEventStream.cs
- BamlTreeMap.cs
- InternalRelationshipCollection.cs
- NonVisualControlAttribute.cs
- UserMapPath.cs
- LogLogRecordEnumerator.cs
- ThousandthOfEmRealPoints.cs
- StringSorter.cs
- EventProviderClassic.cs
- AbstractSvcMapFileLoader.cs
- DropShadowBitmapEffect.cs
- DataSourceGroupCollection.cs
- Itemizer.cs
- SortQuery.cs
- Matrix3DStack.cs
- XamlContextStack.cs
- FunctionQuery.cs
- TextViewBase.cs
- NativeRightsManagementAPIsStructures.cs
- XhtmlConformanceSection.cs
- SafeArrayRankMismatchException.cs
- ProfileManager.cs
- InitializerFacet.cs
- ReflectionHelper.cs
- BitmapEffectOutputConnector.cs
- streamingZipPartStream.cs
- BaseTemplateBuildProvider.cs
- NetStream.cs
- CodeSubDirectory.cs
- ErrorStyle.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ComponentChangedEvent.cs
- WsdlHelpGeneratorElement.cs
- NumericPagerField.cs
- Span.cs
- RequestCacheManager.cs
- _HeaderInfo.cs
- PasswordTextContainer.cs
- securestring.cs
- Msec.cs
- SqlBuffer.cs
- EntityException.cs
- CheckBoxRenderer.cs
- ConstantProjectedSlot.cs
- XmlFormatWriterGenerator.cs
- ControlCommandSet.cs
- AspNetHostingPermission.cs
- ScalarOps.cs
- FusionWrap.cs
- SerialStream.cs
- FilteredSchemaElementLookUpTable.cs
- IPEndPoint.cs