Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / Web / OutgoingWebRequestContext.cs / 1305376 / OutgoingWebRequestContext.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- #pragma warning disable 1634, 1691 namespace System.ServiceModel.Web { using System.Globalization; using System.Net; using System.Runtime; using System.ServiceModel; using System.ServiceModel.Channels; 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MethodImplAttribute.cs
- CorrelationKey.cs
- MainMenu.cs
- CalendarButtonAutomationPeer.cs
- EditingCommands.cs
- ObjectTypeMapping.cs
- TransmissionStrategy.cs
- WindowsTooltip.cs
- OdbcCommandBuilder.cs
- TypeSystemProvider.cs
- XmlIlVisitor.cs
- BuildProvider.cs
- ShaderRenderModeValidation.cs
- CodeGenHelper.cs
- MatrixAnimationBase.cs
- PrintControllerWithStatusDialog.cs
- ListViewItemCollectionEditor.cs
- TypeNameConverter.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- FormViewInsertEventArgs.cs
- ToolStripRenderEventArgs.cs
- ClientFormsAuthenticationMembershipProvider.cs
- TableRowGroup.cs
- SHA1Cng.cs
- MiniCustomAttributeInfo.cs
- OpenTypeLayoutCache.cs
- ProtocolViolationException.cs
- CachedCompositeFamily.cs
- WebPartZoneCollection.cs
- CodeMethodReturnStatement.cs
- GetChildSubtree.cs
- MemberProjectedSlot.cs
- FirewallWrapper.cs
- IgnoreDeviceFilterElement.cs
- TypeGeneratedEventArgs.cs
- XmlQueryTypeFactory.cs
- InfoCardRequestException.cs
- ErrorsHelper.cs
- ToolBarButton.cs
- PackageDigitalSignature.cs
- ConcurrentBag.cs
- SmtpClient.cs
- DataSourceView.cs
- ManagedIStream.cs
- WMIGenerator.cs
- CodeRemoveEventStatement.cs
- PrivilegeNotHeldException.cs
- ColumnCollection.cs
- FixedPageAutomationPeer.cs
- ConfigurationLocationCollection.cs
- ListViewInsertionMark.cs
- KoreanCalendar.cs
- BaseCAMarshaler.cs
- IsolationInterop.cs
- CompilerScopeManager.cs
- PageThemeBuildProvider.cs
- CounterCreationDataCollection.cs
- XmlFormatWriterGenerator.cs
- MimeParameterWriter.cs
- SendMailErrorEventArgs.cs
- HttpListener.cs
- IndexingContentUnit.cs
- InitializerFacet.cs
- mactripleDES.cs
- KeyboardNavigation.cs
- SqlBuilder.cs
- ButtonAutomationPeer.cs
- ToolStripDropDown.cs
- EmptyEnumerator.cs
- ViewStateException.cs
- ClientSettingsSection.cs
- XDRSchema.cs
- UnicodeEncoding.cs
- SvcMapFileSerializer.cs
- ShowExpandedMultiValueConverter.cs
- ContainerAction.cs
- Track.cs
- ListViewItemMouseHoverEvent.cs
- Debug.cs
- WebEventCodes.cs
- ScrollEvent.cs
- OleDbReferenceCollection.cs
- ErrorHandlerModule.cs
- AllMembershipCondition.cs
- XmlMtomReader.cs
- XpsFilter.cs
- ViewBase.cs
- CodeMethodInvokeExpression.cs
- RectConverter.cs
- BaseParagraph.cs
- SnapLine.cs
- MimeMultiPart.cs
- RbTree.cs
- ColorKeyFrameCollection.cs
- AppDomainUnloadedException.cs
- TTSEvent.cs
- DataTableMapping.cs
- VersionedStream.cs
- SlotInfo.cs
- BufferedReadStream.cs