Code:
/ 4.0 / 4.0 / 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 authorityBindings; [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
- CalendarAutoFormat.cs
- SessionSwitchEventArgs.cs
- MethodBuilder.cs
- Normalization.cs
- SqlCacheDependency.cs
- RoutedEvent.cs
- HttpListenerException.cs
- SponsorHelper.cs
- Storyboard.cs
- InvalidFilterCriteriaException.cs
- SoapSchemaExporter.cs
- MutexSecurity.cs
- UrlPropertyAttribute.cs
- selecteditemcollection.cs
- RuntimeWrappedException.cs
- Menu.cs
- HttpResponseHeader.cs
- ServiceModelConfigurationSectionGroup.cs
- mediaclock.cs
- TypeRefElement.cs
- IgnoreFileBuildProvider.cs
- versioninfo.cs
- ToolStripDropDown.cs
- SelfIssuedAuthRSAPKCS1SignatureFormatter.cs
- CodeMethodInvokeExpression.cs
- MasterPageParser.cs
- BlockCollection.cs
- Context.cs
- ProviderMetadata.cs
- PropertyEmitterBase.cs
- RowSpanVector.cs
- DNS.cs
- QilGeneratorEnv.cs
- DataGridHeaderBorder.cs
- TracePayload.cs
- SafePointer.cs
- XmlAnyAttributeAttribute.cs
- ToolboxDataAttribute.cs
- ObjectDataSourceFilteringEventArgs.cs
- FileDialogCustomPlacesCollection.cs
- SafeHandles.cs
- UriTemplateTable.cs
- ImageCodecInfo.cs
- EnlistmentTraceIdentifier.cs
- WebPartChrome.cs
- WizardPanelChangingEventArgs.cs
- SystemColors.cs
- SerializationSectionGroup.cs
- TypedTableBase.cs
- VersionedStreamOwner.cs
- __TransparentProxy.cs
- DataBindingValueUIHandler.cs
- SymmetricCryptoHandle.cs
- TreeWalkHelper.cs
- odbcmetadatafactory.cs
- UserPreferenceChangingEventArgs.cs
- IItemContainerGenerator.cs
- KnownIds.cs
- CreateUserErrorEventArgs.cs
- UnmanagedHandle.cs
- WindowsListViewItemStartMenu.cs
- CryptoApi.cs
- DBAsyncResult.cs
- TypeNameConverter.cs
- Thread.cs
- ClientUrlResolverWrapper.cs
- ExtentKey.cs
- UDPClient.cs
- CodeLabeledStatement.cs
- DbConnectionPoolGroup.cs
- HttpValueCollection.cs
- DataSourceXmlSerializer.cs
- mansign.cs
- BinaryConverter.cs
- VerbConverter.cs
- ValidateNames.cs
- SmiContextFactory.cs
- X509CertificateCollection.cs
- UIElementHelper.cs
- InkCollectionBehavior.cs
- InternalsVisibleToAttribute.cs
- MobileSysDescriptionAttribute.cs
- RelationshipType.cs
- TabItemAutomationPeer.cs
- FilterException.cs
- DbConnectionInternal.cs
- TabPanel.cs
- DelegateSerializationHolder.cs
- MD5.cs
- ZipIOExtraFieldZip64Element.cs
- SqlConnectionPoolGroupProviderInfo.cs
- SingleSelectRootGridEntry.cs
- ZoneLinkButton.cs
- Literal.cs
- OleServicesContext.cs
- AspNetHostingPermission.cs
- DataGridViewSortCompareEventArgs.cs
- PasswordTextNavigator.cs
- XmlAnyElementAttribute.cs
- SerializationStore.cs