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
- ZipIOCentralDirectoryDigitalSignature.cs
- SmtpCommands.cs
- ValueType.cs
- InstanceDescriptor.cs
- Transactions.cs
- ToolTipService.cs
- StyleCollection.cs
- WebUtil.cs
- AnimationStorage.cs
- ConstraintEnumerator.cs
- ArcSegment.cs
- XmlSchemaSimpleType.cs
- OpCopier.cs
- ReadWriteControlDesigner.cs
- SatelliteContractVersionAttribute.cs
- ToolStripDesignerAvailabilityAttribute.cs
- GeometryDrawing.cs
- RequestNavigateEventArgs.cs
- C14NUtil.cs
- StateMachineExecutionState.cs
- XmlChildNodes.cs
- Error.cs
- UnionExpr.cs
- EllipseGeometry.cs
- DuplexChannel.cs
- DataControlFieldCollection.cs
- XmlTypeMapping.cs
- Speller.cs
- AVElementHelper.cs
- CustomErrorCollection.cs
- PrimarySelectionAdorner.cs
- DesignerEditorPartChrome.cs
- ObjectSet.cs
- XPathSelectionIterator.cs
- PKCS1MaskGenerationMethod.cs
- HttpApplicationFactory.cs
- MessageBox.cs
- TextEffectCollection.cs
- TrackingConditionCollection.cs
- DocumentViewerHelper.cs
- ExcludeFromCodeCoverageAttribute.cs
- ViewKeyConstraint.cs
- MenuCommand.cs
- serverconfig.cs
- Focus.cs
- AsymmetricAlgorithm.cs
- SmiContext.cs
- EastAsianLunisolarCalendar.cs
- SHA1Managed.cs
- IChannel.cs
- DataExpression.cs
- List.cs
- WebEvents.cs
- DocumentOrderQuery.cs
- StatusBar.cs
- MimeBasePart.cs
- ContextMarshalException.cs
- WorkflowElementDialogWindow.xaml.cs
- ObfuscationAttribute.cs
- DataKey.cs
- TransformedBitmap.cs
- RepeaterItemCollection.cs
- COM2ComponentEditor.cs
- HebrewCalendar.cs
- DocumentViewer.cs
- MemberAccessException.cs
- CategoryGridEntry.cs
- ReadWriteObjectLock.cs
- Buffer.cs
- XmlPreloadedResolver.cs
- Light.cs
- RIPEMD160Managed.cs
- HMAC.cs
- ServiceOperationParameter.cs
- Registry.cs
- X509SecurityToken.cs
- ZipIOModeEnforcingStream.cs
- TrustVersion.cs
- RequestCache.cs
- ToolboxItem.cs
- TemplateInstanceAttribute.cs
- VoiceChangeEventArgs.cs
- XmlSerializationGeneratedCode.cs
- GlyphShapingProperties.cs
- DataGridRowsPresenter.cs
- WindowCollection.cs
- DataGridViewTextBoxCell.cs
- MessageSecurityVersion.cs
- SimpleTypeResolver.cs
- ClientFormsIdentity.cs
- ReadingWritingEntityEventArgs.cs
- OperatorExpressions.cs
- Errors.cs
- InkSerializer.cs
- WebPartMinimizeVerb.cs
- StyleModeStack.cs
- EditorPartDesigner.cs
- BulletedList.cs
- Accessible.cs
- Pair.cs