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
- JpegBitmapEncoder.cs
- ProcessingInstructionAction.cs
- MetadataArtifactLoaderResource.cs
- UnionCqlBlock.cs
- unitconverter.cs
- Types.cs
- KeyValuePairs.cs
- ValueType.cs
- KeyPressEvent.cs
- SafeHGlobalHandleCritical.cs
- LayoutTableCell.cs
- XmlNamespaceMapping.cs
- HtmlTableCellCollection.cs
- DbProviderSpecificTypePropertyAttribute.cs
- CaseInsensitiveOrdinalStringComparer.cs
- RuntimeArgumentHandle.cs
- CalendarData.cs
- DrawingContextFlattener.cs
- WebPartConnectionsCancelVerb.cs
- XmlSchemaNotation.cs
- CancelEventArgs.cs
- SQLDateTimeStorage.cs
- VectorValueSerializer.cs
- ColorConvertedBitmap.cs
- Stacktrace.cs
- TraceListener.cs
- CommonRemoteMemoryBlock.cs
- TextServicesCompartmentEventSink.cs
- TextViewBase.cs
- EventListenerClientSide.cs
- GeneralEndpointIdentity.cs
- documentsequencetextcontainer.cs
- HttpApplicationFactory.cs
- ApplicationServiceHelper.cs
- Rules.cs
- StreamUpgradeBindingElement.cs
- CheckedPointers.cs
- ListBindableAttribute.cs
- FontCacheUtil.cs
- WebPartConnectionsConnectVerb.cs
- ViewLoader.cs
- ContainsRowNumberChecker.cs
- DataGridTextBoxColumn.cs
- TraceFilter.cs
- XLinq.cs
- WsdlEndpointConversionContext.cs
- ExpanderAutomationPeer.cs
- ObjectDisposedException.cs
- StackSpiller.Bindings.cs
- SystemFonts.cs
- VariableModifiersHelper.cs
- EmptyElement.cs
- EntitySqlQueryBuilder.cs
- EntryIndex.cs
- SystemWebCachingSectionGroup.cs
- CodeDelegateCreateExpression.cs
- PartialTrustVisibleAssembly.cs
- DiagnosticTrace.cs
- EditorPart.cs
- DataMemberAttribute.cs
- CharacterMetrics.cs
- ProviderCollection.cs
- ConfigXmlWhitespace.cs
- InstallerTypeAttribute.cs
- WindowsEditBoxRange.cs
- AssemblyUtil.cs
- DockAndAnchorLayout.cs
- XPathMultyIterator.cs
- XmlSchemaAppInfo.cs
- EntityException.cs
- PenLineCapValidation.cs
- XmlILModule.cs
- SessionStateContainer.cs
- SAPICategories.cs
- ArcSegment.cs
- DataGridViewSelectedRowCollection.cs
- PropertyChangingEventArgs.cs
- Empty.cs
- PageThemeCodeDomTreeGenerator.cs
- QilVisitor.cs
- OrderingInfo.cs
- ImageMap.cs
- DoubleConverter.cs
- SqlDataSourceConnectionPanel.cs
- StaticSiteMapProvider.cs
- TCEAdapterGenerator.cs
- NativeMethodsOther.cs
- DataBinding.cs
- PropertyCollection.cs
- DoubleLinkList.cs
- DetailsViewInsertEventArgs.cs
- DataGridViewRow.cs
- LinqDataSourceHelper.cs
- ControlBindingsCollection.cs
- InkCanvasSelectionAdorner.cs
- TripleDESCryptoServiceProvider.cs
- Rfc2898DeriveBytes.cs
- DrawingGroupDrawingContext.cs
- WebPartZoneBase.cs
- TreeNodeStyleCollection.cs