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
- Canonicalizers.cs
- OleDbRowUpdatingEvent.cs
- CodeEntryPointMethod.cs
- rsa.cs
- XmlText.cs
- OdbcDataAdapter.cs
- ConfigurationFileMap.cs
- HashCodeCombiner.cs
- FileNotFoundException.cs
- BmpBitmapDecoder.cs
- SqlDataSourceSelectingEventArgs.cs
- Interlocked.cs
- UICuesEvent.cs
- XPathQilFactory.cs
- MembershipPasswordException.cs
- AssemblyBuilder.cs
- OdbcErrorCollection.cs
- GridPatternIdentifiers.cs
- StateChangeEvent.cs
- Icon.cs
- Stroke2.cs
- IgnoreFileBuildProvider.cs
- WorkflowRuntimeService.cs
- DataViewSettingCollection.cs
- DefaultWorkflowTransactionService.cs
- SelectingProviderEventArgs.cs
- MsmqSecureHashAlgorithm.cs
- ThemeInfoAttribute.cs
- WhitespaceReader.cs
- ScriptIgnoreAttribute.cs
- Speller.cs
- AstNode.cs
- XmlAnyElementAttribute.cs
- SchemaContext.cs
- TextTabProperties.cs
- SoapReflectionImporter.cs
- SqlDataSourceCache.cs
- ArithmeticException.cs
- ReachSerializableProperties.cs
- RealProxy.cs
- TableLayoutRowStyleCollection.cs
- SafeFileHandle.cs
- TemplateControlCodeDomTreeGenerator.cs
- Timeline.cs
- PeerEndPoint.cs
- SecurityRuntime.cs
- MetaModel.cs
- BulletedList.cs
- ComponentSerializationService.cs
- BooleanConverter.cs
- FontSource.cs
- DownloadProgressEventArgs.cs
- PeerSecurityHelpers.cs
- IdentityNotMappedException.cs
- RightsManagementPermission.cs
- CompilerCollection.cs
- ResizeGrip.cs
- CredentialManagerDialog.cs
- ControlAdapter.cs
- WsdlHelpGeneratorElement.cs
- ValuePatternIdentifiers.cs
- hwndwrapper.cs
- Rule.cs
- SafeSystemMetrics.cs
- TreeBuilder.cs
- CodeThrowExceptionStatement.cs
- TextAnchor.cs
- StructuralType.cs
- BitmapEffect.cs
- EmptyReadOnlyDictionaryInternal.cs
- OdbcParameterCollection.cs
- DataGridTable.cs
- ListItemConverter.cs
- InputScopeManager.cs
- BuildTopDownAttribute.cs
- PointHitTestParameters.cs
- EntityDataSourceState.cs
- ConfigXmlReader.cs
- ImportCatalogPart.cs
- MouseButton.cs
- XPathNodeList.cs
- CodeLabeledStatement.cs
- EntryWrittenEventArgs.cs
- SqlXml.cs
- _SslStream.cs
- SelectingProviderEventArgs.cs
- FormsAuthenticationConfiguration.cs
- CodeSubDirectory.cs
- ProcessHostServerConfig.cs
- SearchForVirtualItemEventArgs.cs
- UnmanagedMemoryStream.cs
- BaseParser.cs
- PageTheme.cs
- BulletChrome.cs
- DataViewSetting.cs
- SettingsSection.cs
- MailWebEventProvider.cs
- EmissiveMaterial.cs
- GridViewRowPresenterBase.cs
- Site.cs