Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Security / StrictModeSecurityHeaderElementInferenceEngine.cs / 1 / StrictModeSecurityHeaderElementInferenceEngine.cs
//---------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Security { using System.ServiceModel.Security.Tokens; using System.Xml; sealed class StrictModeSecurityHeaderElementInferenceEngine : SecurityHeaderElementInferenceEngine { static StrictModeSecurityHeaderElementInferenceEngine instance = new StrictModeSecurityHeaderElementInferenceEngine(); StrictModeSecurityHeaderElementInferenceEngine() {} internal static StrictModeSecurityHeaderElementInferenceEngine Instance { get { return instance; } } public override void ExecuteProcessingPasses(ReceiveSecurityHeader securityHeader, XmlDictionaryReader reader) { securityHeader.ExecuteFullPass(reader); } public override void MarkElements(ReceiveSecurityHeaderElementManager elementManager, bool messageSecurityMode) { bool primarySignatureFound = false; for (int position = 0; position < elementManager.Count; position++) { ReceiveSecurityHeaderEntry entry; elementManager.GetElementEntry(position, out entry); if (entry.elementCategory == ReceiveSecurityHeaderElementCategory.Signature) { if (!messageSecurityMode || primarySignatureFound) { elementManager.SetBindingMode(position, ReceiveSecurityHeaderBindingModes.Endorsing); } else { elementManager.SetBindingMode(position, ReceiveSecurityHeaderBindingModes.Primary); primarySignatureFound = true; } } } } } } // 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
- GeometryHitTestResult.cs
- FileDialogCustomPlacesCollection.cs
- AssemblyCacheEntry.cs
- basecomparevalidator.cs
- CompilationUtil.cs
- UriSection.cs
- MultiSelectRootGridEntry.cs
- ToolStripItemClickedEventArgs.cs
- SharedStatics.cs
- PreservationFileWriter.cs
- Vector3DKeyFrameCollection.cs
- CalendarSelectionChangedEventArgs.cs
- StringExpressionSet.cs
- XPathBuilder.cs
- PublisherIdentityPermission.cs
- SystemWebSectionGroup.cs
- DataTableReaderListener.cs
- File.cs
- Int64Converter.cs
- ADRole.cs
- InternalBufferOverflowException.cs
- DesignTimeData.cs
- XmlLanguageConverter.cs
- Propagator.cs
- AssemblyNameProxy.cs
- QuadraticBezierSegment.cs
- CompressEmulationStream.cs
- RelationshipDetailsRow.cs
- SequenceQuery.cs
- SmiMetaDataProperty.cs
- InputProcessorProfiles.cs
- Workspace.cs
- XPathAncestorQuery.cs
- OperandQuery.cs
- InfoCardUIAgent.cs
- DBSqlParserTableCollection.cs
- GenericPrincipal.cs
- SpoolingTaskBase.cs
- SqlEnums.cs
- SqlEnums.cs
- BitStream.cs
- relpropertyhelper.cs
- MediaElement.cs
- AccessKeyManager.cs
- WsdlInspector.cs
- ComplusEndpointConfigContainer.cs
- Vector3D.cs
- Vector3DValueSerializer.cs
- XMLSyntaxException.cs
- InvalidPrinterException.cs
- Int32RectValueSerializer.cs
- FormsAuthenticationUser.cs
- LayoutUtils.cs
- PassportAuthenticationModule.cs
- DrawingBrush.cs
- BoolExpression.cs
- SqlConnectionHelper.cs
- LocalIdKeyIdentifierClause.cs
- FolderLevelBuildProviderCollection.cs
- PropertyMapper.cs
- DoubleConverter.cs
- _AutoWebProxyScriptEngine.cs
- SetStateDesigner.cs
- PointAnimationClockResource.cs
- XPathSelfQuery.cs
- ClockGroup.cs
- ApplicationHost.cs
- Splitter.cs
- XmlUtf8RawTextWriter.cs
- NCryptNative.cs
- ConvertEvent.cs
- MultiView.cs
- RelationshipEntry.cs
- VScrollBar.cs
- ContentValidator.cs
- Matrix3DConverter.cs
- _ConnectionGroup.cs
- UriTemplateTableMatchCandidate.cs
- AssertFilter.cs
- ParallelTimeline.cs
- WebControl.cs
- OutKeywords.cs
- Button.cs
- ProfileProvider.cs
- SolidBrush.cs
- PropertiesTab.cs
- PolicyException.cs
- DataGridItem.cs
- mediaeventshelper.cs
- TableLayoutColumnStyleCollection.cs
- ExeConfigurationFileMap.cs
- IChannel.cs
- ProtocolImporter.cs
- SqlTypesSchemaImporter.cs
- ReachFixedPageSerializer.cs
- ImmutableObjectAttribute.cs
- smtpconnection.cs
- TransactionChannelFactory.cs
- KeyNameIdentifierClause.cs
- MultipleViewProviderWrapper.cs