Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / Tokens / SamlAuthenticationClaimResource.cs / 1305376 / SamlAuthenticationClaimResource.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IdentityModel.Tokens { using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.IdentityModel.Claims; using System.Runtime.Serialization; using System.Text; [DataContract] public class SamlAuthenticationClaimResource { [DataMember] DateTime authenticationInstant; [DataMember] string authenticationMethod; ReadOnlyCollectionauthorityBindings; [DataMember] string dnsAddress; [DataMember] string ipAddress; [OnDeserialized] void OnDeserialized(StreamingContext ctx) { if (String.IsNullOrEmpty(authenticationMethod)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("authenticationMethod"); if (authorityBindings == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("authorityBindings"); } public SamlAuthenticationClaimResource( DateTime authenticationInstant, string authenticationMethod, string dnsAddress, string ipAddress ) { if (String.IsNullOrEmpty(authenticationMethod)) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("authenticationMethod"); this.authenticationInstant = authenticationInstant; this.authenticationMethod = authenticationMethod; this.dnsAddress = dnsAddress; this.ipAddress = ipAddress; this.authorityBindings = (new List ()).AsReadOnly(); } public SamlAuthenticationClaimResource( DateTime authenticationInstant, string authenticationMethod, string dnsAddress, string ipAddress, IEnumerable authorityBindings ) : this(authenticationInstant, authenticationMethod, dnsAddress, ipAddress) { if (authorityBindings == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("authorityBindings")); List tempList = new List (); foreach (SamlAuthorityBinding authorityBinding in authorityBindings) { if (authorityBinding != null) tempList.Add(authorityBinding); } this.authorityBindings = tempList.AsReadOnly(); } public SamlAuthenticationClaimResource( DateTime authenticationInstant, string authenticationMethod, string dnsAddress, string ipAddress, ReadOnlyCollection authorityBindings ) : this(authenticationInstant, authenticationMethod, dnsAddress, ipAddress) { if (authorityBindings == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("authorityBindings")); this.authorityBindings = authorityBindings; } public DateTime AuthenticationInstant { get { return this.authenticationInstant; } } public string AuthenticationMethod { get { return this.authenticationMethod; } } public ReadOnlyCollection AuthorityBindings { get { return this.authorityBindings; } } // this private member is for serialization only. [DataMember] List SamlAuthorityBindings { get { List sab = new List (); for (int i = 0; i
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- KnownTypesHelper.cs
- NotificationContext.cs
- RelationshipManager.cs
- FontEditor.cs
- BaseDataListActionList.cs
- HelpEvent.cs
- MasterPageParser.cs
- _LocalDataStore.cs
- WebServiceEndpoint.cs
- NonClientArea.cs
- DataGridSortingEventArgs.cs
- HijriCalendar.cs
- RuleProcessor.cs
- Utility.cs
- KeyValueInternalCollection.cs
- SqlReorderer.cs
- KeyPressEvent.cs
- ValuePatternIdentifiers.cs
- FormViewDesigner.cs
- WhiteSpaceTrimStringConverter.cs
- ApplicationServiceHelper.cs
- MimeObjectFactory.cs
- NTAccount.cs
- ImageCreator.cs
- Helpers.cs
- _SpnDictionary.cs
- LocalClientSecuritySettingsElement.cs
- ProcessHostServerConfig.cs
- MultiPageTextView.cs
- CodeDelegateInvokeExpression.cs
- ExtensionFile.cs
- XmlSchemaComplexContent.cs
- InvokeProviderWrapper.cs
- CallbackValidator.cs
- SignedXml.cs
- LogicalMethodInfo.cs
- EntityDataSourceSelectingEventArgs.cs
- MergeFilterQuery.cs
- WebSysDisplayNameAttribute.cs
- DataTablePropertyDescriptor.cs
- Parameter.cs
- GeometryModel3D.cs
- FieldNameLookup.cs
- _UriTypeConverter.cs
- ConnectionManager.cs
- Typography.cs
- XmlFormatWriterGenerator.cs
- EntityDataSourceContextCreatedEventArgs.cs
- InheritedPropertyChangedEventArgs.cs
- documentsequencetextpointer.cs
- TextTreeRootTextBlock.cs
- DynamicDocumentPaginator.cs
- Label.cs
- ControlUtil.cs
- RadioButton.cs
- PenContexts.cs
- PageParser.cs
- XmlWhitespace.cs
- FieldToken.cs
- FrameDimension.cs
- DataBindingsDialog.cs
- HelpInfo.cs
- ColorAnimationUsingKeyFrames.cs
- DbParameterCollectionHelper.cs
- HiddenFieldPageStatePersister.cs
- XmlDataSource.cs
- GenerateTemporaryAssemblyTask.cs
- XmlSchemaAppInfo.cs
- UnlockCardRequest.cs
- ZipArchive.cs
- SyndicationContent.cs
- ZipPackagePart.cs
- Color.cs
- UnsafeNativeMethods.cs
- UnaryExpressionHelper.cs
- WeakEventTable.cs
- ComponentDispatcher.cs
- GetPageCompletedEventArgs.cs
- AccessedThroughPropertyAttribute.cs
- TableAdapterManagerGenerator.cs
- ViewBox.cs
- EraserBehavior.cs
- XomlDesignerLoader.cs
- UrlPropertyAttribute.cs
- httpapplicationstate.cs
- PrePostDescendentsWalker.cs
- TokenBasedSet.cs
- InfoCardPolicy.cs
- FontStretches.cs
- BitmapEffectDrawingContextWalker.cs
- FixedTextContainer.cs
- InternalControlCollection.cs
- WebConfigurationHost.cs
- CriticalHandle.cs
- BaseCollection.cs
- ModelFunctionTypeElement.cs
- TargetPerspective.cs
- RowUpdatingEventArgs.cs
- ConfigXmlWhitespace.cs