Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Security / DecryptedHeader.cs / 1 / DecryptedHeader.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Security { using System.Xml; using System.ServiceModel.Channels; using System.ServiceModel; sealed class DecryptedHeader : ReadableMessageHeader { XmlDictionaryReader cachedReader; readonly byte[] decryptedBuffer; readonly string id; readonly string name; readonly string namespaceUri; readonly string actor; readonly bool mustUnderstand; readonly bool relay; readonly bool isRefParam; readonly MessageVersion version; readonly XmlAttributeHolder[] envelopeAttributes; readonly XmlAttributeHolder[] headerAttributes; readonly XmlDictionaryReaderQuotas quotas; public DecryptedHeader(byte[] decryptedBuffer, XmlAttributeHolder[] envelopeAttributes, XmlAttributeHolder[] headerAttributes, MessageVersion version, SignatureTargetIdManager idManager, XmlDictionaryReaderQuotas quotas) { if (quotas == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("quotas"); this.decryptedBuffer = decryptedBuffer; this.version = version; this.envelopeAttributes = envelopeAttributes; this.headerAttributes = headerAttributes; this.quotas = quotas; XmlDictionaryReader reader = CreateReader(); reader.MoveToStartElement(); this.name = reader.LocalName; this.namespaceUri = reader.NamespaceURI; MessageHeader.GetHeaderAttributes(reader, version, out this.actor, out this.mustUnderstand, out this.relay, out this.isRefParam); this.id = idManager.ExtractId(reader); this.cachedReader = reader; } public override string Actor { get { return this.actor; } } public string Id { get { return this.id; } } public override bool IsReferenceParameter { get { return this.isRefParam; } } public override bool MustUnderstand { get { return this.mustUnderstand; } } public override string Name { get { return this.name; } } public override string Namespace { get { return this.namespaceUri; } } public override bool Relay { get { return this.relay; } } XmlDictionaryReader CreateReader() { return ContextImportHelper.CreateSplicedReader( this.decryptedBuffer, this.envelopeAttributes, this.headerAttributes, null, this.quotas); } public override XmlDictionaryReader GetHeaderReader() { if (this.cachedReader != null) { XmlDictionaryReader cachedReader = this.cachedReader; this.cachedReader = null; return cachedReader; } XmlDictionaryReader reader = CreateReader(); reader.MoveToContent(); return reader; } public override bool IsMessageVersionSupported(MessageVersion messageVersion) { return this.version.Equals(version); } } } // 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
- MediaPlayer.cs
- CanonicalXml.cs
- HttpHandlerAction.cs
- ListViewAutomationPeer.cs
- CodeGeneratorOptions.cs
- XmlNamedNodeMap.cs
- RegularExpressionValidator.cs
- PopOutPanel.cs
- IsolatedStorageFile.cs
- _ScatterGatherBuffers.cs
- OletxVolatileEnlistment.cs
- BitmapDecoder.cs
- GeneralTransform3DGroup.cs
- SessionStateUtil.cs
- ResXDataNode.cs
- Component.cs
- SchemaImporterExtensionElement.cs
- WebPartConnection.cs
- ReachDocumentReferenceSerializerAsync.cs
- ActiveXHelper.cs
- KeyGesture.cs
- SecureConversationSecurityTokenParameters.cs
- IssuedTokensHeader.cs
- XmlBoundElement.cs
- ColumnMapCopier.cs
- NativeMethodsCLR.cs
- StringToken.cs
- NodeCounter.cs
- ECDsaCng.cs
- FlowDocumentPaginator.cs
- UrlMappingCollection.cs
- DesignerView.xaml.cs
- Repeater.cs
- ConstrainedDataObject.cs
- SrgsRule.cs
- DocumentSequence.cs
- ComponentEditorPage.cs
- SqlServer2KCompatibilityCheck.cs
- AssemblyBuilder.cs
- Root.cs
- UnlockInstanceCommand.cs
- documentsequencetextpointer.cs
- HandledEventArgs.cs
- Schema.cs
- XPathMultyIterator.cs
- SchemaImporterExtensionsSection.cs
- TextRange.cs
- SqlTypeSystemProvider.cs
- TypedCompletedAsyncResult.cs
- __Filters.cs
- OleDbPermission.cs
- BlurEffect.cs
- HtmlForm.cs
- ScriptReferenceBase.cs
- DataGridViewHeaderCell.cs
- httpserverutility.cs
- AnnotationResourceChangedEventArgs.cs
- OuterGlowBitmapEffect.cs
- XmlSchemaCollection.cs
- ScopelessEnumAttribute.cs
- SrgsGrammar.cs
- ISFTagAndGuidCache.cs
- ToolBarPanel.cs
- ThicknessConverter.cs
- KnowledgeBase.cs
- SQLInt64Storage.cs
- TransportConfigurationTypeElementCollection.cs
- TypeExtensions.cs
- PageRouteHandler.cs
- HandlerWithFactory.cs
- CodeDirectoryCompiler.cs
- SiteMapDataSource.cs
- FormClosingEvent.cs
- XComponentModel.cs
- SimpleHandlerFactory.cs
- HtmlWindow.cs
- ConfigurationValidatorAttribute.cs
- IApplicationTrustManager.cs
- DrawingDrawingContext.cs
- SessionParameter.cs
- FileDialog.cs
- ActivityExecutor.cs
- AddInController.cs
- CheckBoxList.cs
- ConstraintConverter.cs
- FieldMetadata.cs
- DrawingGroupDrawingContext.cs
- BamlLocalizationDictionary.cs
- TypefaceMap.cs
- BounceEase.cs
- NativeMethods.cs
- ConfigurationValue.cs
- VBIdentifierDesigner.xaml.cs
- TypefaceMap.cs
- Vector3DCollectionConverter.cs
- Win32Native.cs
- RenderContext.cs
- TypeLibConverter.cs
- FrameAutomationPeer.cs
- Point.cs