Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / Tokens / SamlAuthenticationClaimResource.cs / 1 / 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
- ModelUtilities.cs
- TableCell.cs
- ExpressionCopier.cs
- Font.cs
- DataObjectEventArgs.cs
- MatrixValueSerializer.cs
- WpfGeneratedKnownProperties.cs
- CodeTypeDeclaration.cs
- ComponentRenameEvent.cs
- AssemblyBuilder.cs
- COM2AboutBoxPropertyDescriptor.cs
- SQLDecimalStorage.cs
- Panel.cs
- VisualProxy.cs
- AlternateViewCollection.cs
- BuildProviderCollection.cs
- BitmapEffectDrawingContextWalker.cs
- rsa.cs
- MediaPlayerState.cs
- CapabilitiesUse.cs
- xml.cs
- ScriptReferenceBase.cs
- Restrictions.cs
- InstanceDataCollection.cs
- ComponentManagerBroker.cs
- RegistryKey.cs
- FloaterBaseParaClient.cs
- MetadataPropertyCollection.cs
- WindowsFormsHostAutomationPeer.cs
- storepermissionattribute.cs
- DescendantBaseQuery.cs
- WindowsContainer.cs
- BamlTreeUpdater.cs
- XmlSchemaObjectTable.cs
- BaseCodeDomTreeGenerator.cs
- AsymmetricKeyExchangeDeformatter.cs
- HttpCacheVaryByContentEncodings.cs
- PageCatalogPart.cs
- InputLanguageManager.cs
- ConstantCheck.cs
- VScrollBar.cs
- MetaTableHelper.cs
- TimeEnumHelper.cs
- Condition.cs
- TextElementCollection.cs
- ApplicationTrust.cs
- XmlSchemaSequence.cs
- GenericsInstances.cs
- LambdaCompiler.Address.cs
- TableLayoutCellPaintEventArgs.cs
- ProtectedProviderSettings.cs
- NativeRightsManagementAPIsStructures.cs
- UpDownBase.cs
- ContentValidator.cs
- FixedBufferAttribute.cs
- CompilerGlobalScopeAttribute.cs
- ColumnResult.cs
- DataProviderNameConverter.cs
- DataGridItemEventArgs.cs
- VisualCollection.cs
- ContainerCodeDomSerializer.cs
- DataControlField.cs
- DynamicDataRoute.cs
- DesignerCommandAdapter.cs
- SelectionEditingBehavior.cs
- ValidationErrorEventArgs.cs
- SizeF.cs
- Assembly.cs
- TextEvent.cs
- SingleKeyFrameCollection.cs
- View.cs
- BinaryUtilClasses.cs
- Pool.cs
- WorkerRequest.cs
- HostedTcpTransportManager.cs
- RtfControlWordInfo.cs
- SystemGatewayIPAddressInformation.cs
- InlineObject.cs
- SequenceNumber.cs
- Compiler.cs
- DbConnectionOptions.cs
- UpdatePanelControlTrigger.cs
- ControlPaint.cs
- BaseTemplateParser.cs
- XComponentModel.cs
- SmtpNetworkElement.cs
- GridViewEditEventArgs.cs
- SystemWebSectionGroup.cs
- BuildProvider.cs
- TextMarkerSource.cs
- CompilerResults.cs
- HttpCookie.cs
- InheritanceRules.cs
- DriveInfo.cs
- AsyncDataRequest.cs
- XPathDescendantIterator.cs
- ActiveXContainer.cs
- SHA512Managed.cs
- HashRepartitionStream.cs
- DataGridViewColumn.cs