Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / Tokens / SamlDoNotCacheCondition.cs / 1 / SamlDoNotCacheCondition.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IdentityModel.Tokens { using System.Xml; using System.IdentityModel.Selectors; public class SamlDoNotCacheCondition : SamlCondition { bool isReadOnly = false; public SamlDoNotCacheCondition() { } public override bool IsReadOnly { get { return this.isReadOnly; } } public override void MakeReadOnly() { this.isReadOnly = true; } public override void ReadXml(XmlDictionaryReader reader, SamlSerializer samlSerializer, SecurityTokenSerializer keyInfoSerializer, SecurityTokenResolver outOfBandTokenResolver) { if (reader == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("reader")); if (samlSerializer == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("samlSerializer")); #pragma warning suppress 56506 // samlSerializer.DictionaryManager is never null. SamlDictionary dictionary = samlSerializer.DictionaryManager.SamlDictionary; if (!reader.IsStartElement(dictionary.DoNotCacheCondition, dictionary.Namespace)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SecurityTokenException(SR.GetString(SR.SAMLBadSchema, dictionary.DoNotCacheCondition.Value))); // saml:DoNotCacheCondition is a empty element. So just issue a read for // the empty element. if (reader.IsEmptyElement) { reader.MoveToContent(); reader.Read(); return; } reader.MoveToContent(); reader.Read(); reader.ReadEndElement(); } public override void WriteXml(XmlDictionaryWriter writer, SamlSerializer samlSerializer, SecurityTokenSerializer keyInfoSerializer) { if (writer == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("writer")); if (samlSerializer == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("samlSerializer")); #pragma warning suppress 56506 // samlSerializer.DictionaryManager is never null. SamlDictionary dictionary = samlSerializer.DictionaryManager.SamlDictionary; writer.WriteStartElement(dictionary.PreferredPrefix.Value, dictionary.DoNotCacheCondition, dictionary.Namespace); writer.WriteEndElement(); } } } // 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
- XmlSchemaAttributeGroupRef.cs
- VBIdentifierTrimConverter.cs
- MultiPageTextView.cs
- Baml6ConstructorInfo.cs
- CodeIterationStatement.cs
- SqlBuffer.cs
- WorkflowFileItem.cs
- Solver.cs
- SqlProcedureAttribute.cs
- VectorAnimationUsingKeyFrames.cs
- ValidationSummary.cs
- XsdBuildProvider.cs
- TextRangeEditTables.cs
- MemoryStream.cs
- SqlConnectionStringBuilder.cs
- Sorting.cs
- Grant.cs
- ConcurrentBag.cs
- XmlArrayItemAttributes.cs
- UserControlParser.cs
- CellRelation.cs
- AsymmetricSignatureDeformatter.cs
- XmlSchemaValidator.cs
- LinkLabelLinkClickedEvent.cs
- EntityDescriptor.cs
- SqlBulkCopyColumnMapping.cs
- SqlCommand.cs
- ParameterToken.cs
- CodeSnippetExpression.cs
- XmlEncoding.cs
- SqlUserDefinedTypeAttribute.cs
- DataGridViewControlCollection.cs
- SqlTopReducer.cs
- FrameworkEventSource.cs
- ChildTable.cs
- BamlResourceSerializer.cs
- HyperLinkColumn.cs
- ReplyChannelAcceptor.cs
- Message.cs
- RSAOAEPKeyExchangeDeformatter.cs
- LineSegment.cs
- UnSafeCharBuffer.cs
- KeyEvent.cs
- SqlServer2KCompatibilityAnnotation.cs
- FileDialogCustomPlace.cs
- FontStretch.cs
- MobileControlDesigner.cs
- Win32.cs
- SafeArchiveContext.cs
- Rights.cs
- ConcurrentQueue.cs
- InputMethodStateChangeEventArgs.cs
- SubclassTypeValidator.cs
- PointAnimation.cs
- RecommendedAsConfigurableAttribute.cs
- _StreamFramer.cs
- DbMetaDataColumnNames.cs
- AQNBuilder.cs
- FilteredReadOnlyMetadataCollection.cs
- ProfileInfo.cs
- DescendentsWalkerBase.cs
- XmlArrayItemAttribute.cs
- SqlUnionizer.cs
- ServiceHttpModule.cs
- GraphicsPath.cs
- hwndwrapper.cs
- XPathNodeList.cs
- FormView.cs
- UnitySerializationHolder.cs
- DataGridViewRowCollection.cs
- XPathItem.cs
- HostingEnvironment.cs
- RadioButton.cs
- Storyboard.cs
- Overlapped.cs
- HttpDictionary.cs
- PromptBuilder.cs
- TextTreeInsertUndoUnit.cs
- DataListCommandEventArgs.cs
- AndCondition.cs
- BaseParagraph.cs
- TcpTransportBindingElement.cs
- NavigationEventArgs.cs
- BitmapImage.cs
- ElementMarkupObject.cs
- SafePEFileHandle.cs
- StateInitializationDesigner.cs
- RotateTransform.cs
- SerializationHelper.cs
- NativeMethods.cs
- SecurityUtils.cs
- PropertyInformationCollection.cs
- RangeBase.cs
- TriggerAction.cs
- PolicyException.cs
- SystemThemeKey.cs
- METAHEADER.cs
- JoinQueryOperator.cs
- WaitHandleCannotBeOpenedException.cs
- PerfService.cs