Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / Web / OutgoingWebRequestContext.cs / 1 / OutgoingWebRequestContext.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- #pragma warning disable 1634, 1691 namespace System.ServiceModel.Web { using System; using System.Globalization; using System.Diagnostics.CodeAnalysis; using System.ServiceModel; using System.ServiceModel.Channels; using System.ServiceModel.Description; using System.ServiceModel.Dispatcher; using System.Net; using System.Collections.ObjectModel; using System.Collections.Specialized; public class OutgoingWebRequestContext { OperationContext operationContext; internal OutgoingWebRequestContext(OperationContext operationContext) { Fx.Assert(operationContext != null, "operationContext is null"); this.operationContext = operationContext; } public string Accept { get { return this.MessageProperty.Headers[HttpRequestHeader.Accept]; } set { this.MessageProperty.Headers[HttpRequestHeader.Accept] = value; } } public long ContentLength { get { return long.Parse(this.MessageProperty.Headers[HttpRequestHeader.ContentLength], CultureInfo.InvariantCulture); } set { this.MessageProperty.Headers[HttpRequestHeader.ContentLength] = value.ToString(CultureInfo.InvariantCulture); } } public string ContentType { get { return this.MessageProperty.Headers[HttpRequestHeader.ContentType]; } set { this.MessageProperty.Headers[HttpRequestHeader.ContentType] = value; } } public WebHeaderCollection Headers { get { return this.MessageProperty.Headers; } } public string IfMatch { get { return this.MessageProperty.Headers[HttpRequestHeader.IfMatch]; } set { this.MessageProperty.Headers[HttpRequestHeader.IfMatch] = value; } } public string IfModifiedSince { get { return this.MessageProperty.Headers[HttpRequestHeader.IfModifiedSince]; } set { this.MessageProperty.Headers[HttpRequestHeader.IfModifiedSince] = value; } } public string IfNoneMatch { get { return this.MessageProperty.Headers[HttpRequestHeader.IfNoneMatch]; } set { this.MessageProperty.Headers[HttpRequestHeader.IfNoneMatch] = value; } } public string IfUnmodifiedSince { get { return this.MessageProperty.Headers[HttpRequestHeader.IfUnmodifiedSince]; } set { this.MessageProperty.Headers[HttpRequestHeader.IfUnmodifiedSince] = value; } } public string Method { get { return this.MessageProperty.Method; } set { this.MessageProperty.Method = value; } } public bool SuppressEntityBody { get { return this.MessageProperty.SuppressEntityBody; } set { this.MessageProperty.SuppressEntityBody = value; } } public string UserAgent { get { return this.MessageProperty.Headers[HttpRequestHeader.UserAgent]; } set { this.MessageProperty.Headers[HttpRequestHeader.UserAgent] = value; } } HttpRequestMessageProperty MessageProperty { get { if (!operationContext.OutgoingMessageProperties.ContainsKey(HttpRequestMessageProperty.Name)) { operationContext.OutgoingMessageProperties.Add(HttpRequestMessageProperty.Name, new HttpRequestMessageProperty()); } return operationContext.OutgoingMessageProperties[HttpRequestMessageProperty.Name] as HttpRequestMessageProperty; } } } } // 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
- FixedStringLookup.cs
- PrintEvent.cs
- EntityContainer.cs
- DocumentViewer.cs
- ToolStripAdornerWindowService.cs
- DataGridViewLinkColumn.cs
- CompiledRegexRunner.cs
- InvalidDocumentContentsException.cs
- ViewValidator.cs
- SchemaElement.cs
- ReferenceConverter.cs
- EdmConstants.cs
- RedistVersionInfo.cs
- List.cs
- AddInControllerImpl.cs
- CodeCommentStatementCollection.cs
- SymLanguageVendor.cs
- ProfilePropertyNameValidator.cs
- CodeMethodInvokeExpression.cs
- ListBase.cs
- CollectionsUtil.cs
- RemotingSurrogateSelector.cs
- XPathDocumentBuilder.cs
- SecurityAlgorithmSuiteConverter.cs
- QueryResult.cs
- CodeGen.cs
- ParallelTimeline.cs
- SessionState.cs
- OpenTypeLayoutCache.cs
- SmiContextFactory.cs
- GridViewColumnCollectionChangedEventArgs.cs
- PolyBezierSegment.cs
- IIS7WorkerRequest.cs
- SubqueryRules.cs
- PartBasedPackageProperties.cs
- HandlerWithFactory.cs
- AuthenticationModuleElement.cs
- KoreanLunisolarCalendar.cs
- AncillaryOps.cs
- SimpleWebHandlerParser.cs
- BackgroundFormatInfo.cs
- PassportIdentity.cs
- OutputCacheProfile.cs
- ExpressionConverter.cs
- StackOverflowException.cs
- SqlRemoveConstantOrderBy.cs
- TransformerConfigurationWizardBase.cs
- DataMember.cs
- ToolStripItemCollection.cs
- URLAttribute.cs
- XmlQueryStaticData.cs
- TriggerBase.cs
- DataGridViewRowCancelEventArgs.cs
- TextTrailingWordEllipsis.cs
- Formatter.cs
- Calendar.cs
- util.cs
- ClientConfigurationSystem.cs
- SecurityResources.cs
- AxisAngleRotation3D.cs
- DbReferenceCollection.cs
- CopyOnWriteList.cs
- XmlSchemaAny.cs
- WmlCalendarAdapter.cs
- SqlReferenceCollection.cs
- GlobalEventManager.cs
- SystemColors.cs
- WebContext.cs
- ComplusEndpointConfigContainer.cs
- PanelDesigner.cs
- XmlSchemaComplexContent.cs
- ToolStripPanelCell.cs
- Keywords.cs
- MeasurementDCInfo.cs
- FileSystemInfo.cs
- CurrencyManager.cs
- DifferencingCollection.cs
- Subordinate.cs
- ProviderSettingsCollection.cs
- AsyncOperationLifetimeManager.cs
- Imaging.cs
- CryptoProvider.cs
- StreamUpgradeProvider.cs
- XmlQueryContext.cs
- ValidatorCompatibilityHelper.cs
- StylusOverProperty.cs
- XomlSerializationHelpers.cs
- SmtpNtlmAuthenticationModule.cs
- ConfigurationElementCollection.cs
- SplitContainer.cs
- TextServicesDisplayAttributePropertyRanges.cs
- FontFamilyIdentifier.cs
- AnnotationAuthorChangedEventArgs.cs
- ScrollableControl.cs
- MediaEntryAttribute.cs
- AdPostCacheSubstitution.cs
- ComUdtElement.cs
- SamlAssertion.cs
- TerminatorSinks.cs
- TemplateDefinition.cs