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
- NativeWindow.cs
- RegexRunner.cs
- ManagedIStream.cs
- XmlUrlResolver.cs
- DataGridViewCellFormattingEventArgs.cs
- Collection.cs
- RecognitionResult.cs
- _LazyAsyncResult.cs
- TreePrinter.cs
- Pointer.cs
- FixedSOMSemanticBox.cs
- LZCodec.cs
- AttributeXamlType.cs
- MultiSelectRootGridEntry.cs
- QueryPageSettingsEventArgs.cs
- AutomationElementCollection.cs
- MultiBindingExpression.cs
- DependencyObjectProvider.cs
- ExpressionBinding.cs
- SizeChangedInfo.cs
- StrongBox.cs
- SafeNativeMethods.cs
- MessageQueue.cs
- DataGridPagerStyle.cs
- QueryOutputWriter.cs
- InkCanvas.cs
- DataGridViewImageColumn.cs
- CodeExpressionCollection.cs
- UiaCoreApi.cs
- CoreSwitches.cs
- DataAdapter.cs
- WsdlEndpointConversionContext.cs
- DbConnectionInternal.cs
- InputDevice.cs
- LayoutEvent.cs
- dataprotectionpermission.cs
- SweepDirectionValidation.cs
- AspCompat.cs
- Directory.cs
- Transform3DGroup.cs
- DataComponentNameHandler.cs
- SystemColorTracker.cs
- PropertyCondition.cs
- EditorAttribute.cs
- QilList.cs
- GenericsInstances.cs
- TogglePatternIdentifiers.cs
- OletxResourceManager.cs
- DataGridHeaderBorder.cs
- ValueSerializerAttribute.cs
- WinInetCache.cs
- JobPageOrder.cs
- XmlWriterSettings.cs
- ComplexObject.cs
- Serializer.cs
- TextDecorationUnitValidation.cs
- WebResourceAttribute.cs
- HybridCollection.cs
- NumericUpDown.cs
- EventSource.cs
- BulletChrome.cs
- WindowCollection.cs
- Merger.cs
- Selection.cs
- XmlMapping.cs
- InputBinding.cs
- ReadOnlyHierarchicalDataSourceView.cs
- RtType.cs
- TextContainer.cs
- AddIn.cs
- AstNode.cs
- SingleAnimation.cs
- TimelineGroup.cs
- WindowsAuthenticationModule.cs
- StringToken.cs
- ProfileSection.cs
- typedescriptorpermission.cs
- SequenceNumber.cs
- Triangle.cs
- AuthenticationModuleElement.cs
- ToolStripDropDownClosedEventArgs.cs
- X509CertificateChain.cs
- RuleRef.cs
- BitmapInitialize.cs
- BitmapPalettes.cs
- LoadRetryStrategyFactory.cs
- ComAdminWrapper.cs
- CopyOnWriteList.cs
- HttpFileCollection.cs
- Choices.cs
- SystemColorTracker.cs
- Clipboard.cs
- UriSection.cs
- BamlLocalizationDictionary.cs
- AnimationLayer.cs
- UInt64.cs
- Comparer.cs
- SQLMoney.cs
- ViewService.cs
- HtmlTableRowCollection.cs