Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.ServiceModel.Routing / System / ServiceModel / Routing / DelegatingHeader.cs / 1305376 / DelegatingHeader.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.ServiceModel.Routing { using System; using System.ServiceModel; using System.ServiceModel.Channels; using System.Xml; using System.Runtime; class DelegatingHeader : MessageHeader { int index; MessageHeaderInfo info; MessageHeaders originalHeaders; public DelegatingHeader(MessageHeaderInfo info, MessageHeaders originalHeaders) { Fx.Assert(info != null, "info is required"); Fx.Assert(originalHeaders != null, "originalHeaders is required"); this.info = info; this.originalHeaders = originalHeaders; this.index = -1; } void EnsureIndex() { if (this.index < 0) { this.index = this.originalHeaders.FindHeader(this.info.Name, this.info.Namespace); if (this.index < 0) { throw FxTrace.Exception.AsError(new InvalidOperationException(SR.SourceHeaderNotFound(this.info.Name, this.info.Namespace))); } } } protected override void OnWriteHeaderContents(XmlDictionaryWriter writer, MessageVersion messageVersion) { this.EnsureIndex(); this.originalHeaders.WriteHeaderContents(index, writer); this.index = -1; } protected override void OnWriteStartHeader(XmlDictionaryWriter writer, MessageVersion messageVersion) { this.EnsureIndex(); this.originalHeaders.WriteStartHeader(this.index, writer); } public override string Name { get { return this.info.Name; } } public override string Namespace { get { return this.info.Namespace; } } public override bool MustUnderstand { get { return this.info.MustUnderstand; } } public override string Actor { get { return this.info.Actor; } } public override bool IsReferenceParameter { get { return this.info.IsReferenceParameter; } } public override bool Relay { get { return base.Relay; } } } } // 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
- ListViewTableCell.cs
- WebPartConnectionsCancelVerb.cs
- RegexReplacement.cs
- ByteStorage.cs
- SettingsBase.cs
- XmlSchemaType.cs
- TreePrinter.cs
- FlowchartDesigner.Helpers.cs
- NullableLongSumAggregationOperator.cs
- _FixedSizeReader.cs
- RowSpanVector.cs
- AutomationPatternInfo.cs
- CodeMethodInvokeExpression.cs
- ListBase.cs
- HtmlControl.cs
- ControlEvent.cs
- TokenizerHelper.cs
- TreeNode.cs
- BidOverLoads.cs
- HorizontalAlignConverter.cs
- RectangleConverter.cs
- PathFigureCollectionConverter.cs
- XsltLoader.cs
- SpecialNameAttribute.cs
- QualifierSet.cs
- ThreadAbortException.cs
- TypeUtil.cs
- ToolBarPanel.cs
- XmlQualifiedName.cs
- DataErrorValidationRule.cs
- BinaryUtilClasses.cs
- SqlGenericUtil.cs
- Timer.cs
- CounterCreationData.cs
- CancelAsyncOperationRequest.cs
- CodeAttributeDeclarationCollection.cs
- BitmapMetadataBlob.cs
- RuntimeEnvironment.cs
- AddingNewEventArgs.cs
- SecurityIdentifierElement.cs
- Win32SafeHandles.cs
- ReceiveReply.cs
- ServiceNameElement.cs
- SymLanguageType.cs
- ArgumentException.cs
- XAMLParseException.cs
- WindowsListViewItemStartMenu.cs
- LineServicesCallbacks.cs
- XmlExceptionHelper.cs
- RuleValidation.cs
- DBPropSet.cs
- PropertiesTab.cs
- CustomErrorsSectionWrapper.cs
- LogLogRecord.cs
- ResXBuildProvider.cs
- ParentUndoUnit.cs
- VSWCFServiceContractGenerator.cs
- ContentTextAutomationPeer.cs
- SQLGuid.cs
- CacheAxisQuery.cs
- EmptyStringExpandableObjectConverter.cs
- ListViewGroupConverter.cs
- WpfWebRequestHelper.cs
- SafeRightsManagementHandle.cs
- DbParameterHelper.cs
- ComplexType.cs
- ADConnectionHelper.cs
- ObjectReaderCompiler.cs
- MDIControlStrip.cs
- ApplyHostConfigurationBehavior.cs
- MailDefinition.cs
- BindingExpressionUncommonField.cs
- DbModificationCommandTree.cs
- TypeBinaryExpression.cs
- EventEntry.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- RangeBaseAutomationPeer.cs
- GeometryCombineModeValidation.cs
- ToolZone.cs
- FileLevelControlBuilderAttribute.cs
- UserControlAutomationPeer.cs
- AllMembershipCondition.cs
- TextRunCache.cs
- DbConnectionPoolCounters.cs
- LinqDataSourceValidationException.cs
- ReturnType.cs
- WebPartDisplayMode.cs
- WindowsTab.cs
- IDQuery.cs
- PackUriHelper.cs
- Random.cs
- Axis.cs
- URIFormatException.cs
- TreePrinter.cs
- ProviderUtil.cs
- WindowsGraphics2.cs
- XmlTextReader.cs
- FileUtil.cs
- EntityWithChangeTrackerStrategy.cs
- TdsParser.cs