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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WindowsTokenRoleProvider.cs
- ThemeDictionaryExtension.cs
- WorkflowDebuggerSteppingAttribute.cs
- SignatureSummaryDialog.cs
- ArraySegment.cs
- CalloutQueueItem.cs
- httpapplicationstate.cs
- DBConcurrencyException.cs
- NativeCompoundFileAPIs.cs
- AnimationException.cs
- ObjectKeyFrameCollection.cs
- TextWriter.cs
- COM2IPerPropertyBrowsingHandler.cs
- CacheChildrenQuery.cs
- UInt16Storage.cs
- ScrollBar.cs
- ShaperBuffers.cs
- LinqDataSourceContextData.cs
- UnionCqlBlock.cs
- Types.cs
- PageEventArgs.cs
- TableItemPattern.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- XhtmlBasicValidatorAdapter.cs
- SpotLight.cs
- UIElementIsland.cs
- EventLogPermissionEntryCollection.cs
- ChtmlTextBoxAdapter.cs
- GeometryValueSerializer.cs
- RevocationPoint.cs
- BevelBitmapEffect.cs
- DataGridDesigner.cs
- TreeViewDesigner.cs
- XmlSchemaImporter.cs
- PropertyEntry.cs
- ResXBuildProvider.cs
- MetadataItem.cs
- WebPartConnectionsEventArgs.cs
- TimeoutConverter.cs
- FormsAuthenticationModule.cs
- DesignerAdRotatorAdapter.cs
- RelationshipConverter.cs
- DependencySource.cs
- ToolTipAutomationPeer.cs
- SyndicationSerializer.cs
- ProfileBuildProvider.cs
- SplayTreeNode.cs
- SimplePropertyEntry.cs
- TemplateInstanceAttribute.cs
- Accessible.cs
- CodeObject.cs
- DesignerMetadata.cs
- LinqMaximalSubtreeNominator.cs
- grammarelement.cs
- ImageButton.cs
- PropertyDescriptorGridEntry.cs
- ChameleonKey.cs
- ImageCodecInfo.cs
- SelectedDatesCollection.cs
- ListViewDeletedEventArgs.cs
- Clock.cs
- KoreanCalendar.cs
- BamlLocalizableResource.cs
- PrinterResolution.cs
- WebPartEditorApplyVerb.cs
- ListParagraph.cs
- ExtenderControl.cs
- DynamicDocumentPaginator.cs
- ControlPropertyNameConverter.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- SqlRetyper.cs
- InputScopeConverter.cs
- RawStylusInputCustomData.cs
- DataGridViewLinkCell.cs
- SolidColorBrush.cs
- DbProviderManifest.cs
- PartialClassGenerationTaskInternal.cs
- SurrogateEncoder.cs
- Style.cs
- LocalIdKeyIdentifierClause.cs
- HtmlInputImage.cs
- PageCodeDomTreeGenerator.cs
- LicenseContext.cs
- RSAPKCS1SignatureFormatter.cs
- MissingSatelliteAssemblyException.cs
- DefaultMemberAttribute.cs
- RenderDataDrawingContext.cs
- IdnElement.cs
- FrameSecurityDescriptor.cs
- UrlUtility.cs
- ContextMenuService.cs
- OverflowException.cs
- UIPropertyMetadata.cs
- StylusPointProperty.cs
- CombinedHttpChannel.cs
- FocusChangedEventArgs.cs
- SmtpReplyReader.cs
- FreezableDefaultValueFactory.cs
- LogicalCallContext.cs
- ComponentEditorPage.cs