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
- KnownBoxes.cs
- ValueQuery.cs
- JavaScriptString.cs
- SqlGatherConsumedAliases.cs
- LongSumAggregationOperator.cs
- SynchronizationContext.cs
- AttachedAnnotation.cs
- ResourceAttributes.cs
- TextMarkerSource.cs
- CachedRequestParams.cs
- BaseCAMarshaler.cs
- ToolStripHighContrastRenderer.cs
- ListBindableAttribute.cs
- GPPOINT.cs
- DataServiceEntityAttribute.cs
- UserControlCodeDomTreeGenerator.cs
- RefreshResponseInfo.cs
- Constants.cs
- ImageBrush.cs
- HtmlTableRowCollection.cs
- NavigatorOutput.cs
- SchemaAttDef.cs
- CallSiteOps.cs
- UnsafeNativeMethods.cs
- Type.cs
- LinkedResource.cs
- DispatcherExceptionEventArgs.cs
- EpmSyndicationContentSerializer.cs
- ISFTagAndGuidCache.cs
- HttpWriter.cs
- SimpleWorkerRequest.cs
- GridLength.cs
- Vector3DAnimationBase.cs
- JournalEntryListConverter.cs
- WindowsStatusBar.cs
- URL.cs
- ProtectedUri.cs
- ConfigurationSchemaErrors.cs
- PiiTraceSource.cs
- UserMapPath.cs
- SupportsEventValidationAttribute.cs
- SqlWebEventProvider.cs
- InkPresenterAutomationPeer.cs
- HtmlInputReset.cs
- SizeChangedInfo.cs
- Style.cs
- SqlError.cs
- TraceSection.cs
- Triangle.cs
- WindowsPen.cs
- OutputCacheProfile.cs
- DefaultValueTypeConverter.cs
- NullableDoubleSumAggregationOperator.cs
- UIPropertyMetadata.cs
- DomainUpDown.cs
- MailSettingsSection.cs
- DocumentGrid.cs
- UiaCoreApi.cs
- OleDbPermission.cs
- KeyTime.cs
- FileNameEditor.cs
- TemplateContentLoader.cs
- BooleanStorage.cs
- XmlElementElementCollection.cs
- FixedSOMSemanticBox.cs
- Inflater.cs
- SQLByteStorage.cs
- InvalidComObjectException.cs
- TypedReference.cs
- QuaternionAnimationBase.cs
- CfgArc.cs
- CodeNamespaceImport.cs
- ProtectedConfigurationSection.cs
- TraceUtility.cs
- FtpWebResponse.cs
- FormParameter.cs
- EFTableProvider.cs
- WindowsListViewScroll.cs
- Localizer.cs
- CodeCommentStatement.cs
- RangeValidator.cs
- AutoGeneratedFieldProperties.cs
- InputScopeAttribute.cs
- BinaryCommonClasses.cs
- ItemCollection.cs
- AncillaryOps.cs
- CreateUserWizardDesigner.cs
- HtmlInputText.cs
- HeaderedItemsControl.cs
- UpdatableGenericsFeature.cs
- ServiceContractListItemList.cs
- MultiSelectRootGridEntry.cs
- SoapMessage.cs
- FixedDSBuilder.cs
- BuildResult.cs
- ManifestResourceInfo.cs
- VerticalConnector.xaml.cs
- CanonicalFontFamilyReference.cs
- DropDownButton.cs
- ObjectSecurity.cs