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
- AxisAngleRotation3D.cs
- EntityDescriptor.cs
- SqlConnectionHelper.cs
- PublishLicense.cs
- HashMembershipCondition.cs
- DeviceSpecificChoiceCollection.cs
- EntityContainerEntitySetDefiningQuery.cs
- ArraySubsetEnumerator.cs
- PropertyConverter.cs
- DesignTimeType.cs
- ExtentJoinTreeNode.cs
- SQLDecimal.cs
- FilePresentation.cs
- WrapperEqualityComparer.cs
- KeyPressEvent.cs
- Bezier.cs
- CustomAttribute.cs
- GeneralTransform3DGroup.cs
- DataBindingExpressionBuilder.cs
- OSFeature.cs
- DispatcherTimer.cs
- ManagementEventArgs.cs
- Triplet.cs
- MatrixAnimationUsingKeyFrames.cs
- FixedSOMSemanticBox.cs
- MatcherBuilder.cs
- EmbeddedMailObject.cs
- SvcMapFileSerializer.cs
- IxmlLineInfo.cs
- ChineseLunisolarCalendar.cs
- PersistenceTypeAttribute.cs
- EntityDesignerDataSourceView.cs
- SemaphoreFullException.cs
- TimelineGroup.cs
- BufferedWebEventProvider.cs
- WindowsListViewGroupHelper.cs
- FontUnitConverter.cs
- InputScopeAttribute.cs
- UrlPath.cs
- LinqDataSourceDisposeEventArgs.cs
- XNameTypeConverter.cs
- BaseInfoTable.cs
- EntityConnectionStringBuilder.cs
- XmlSchemaSimpleContentRestriction.cs
- FilteredAttributeCollection.cs
- DataPager.cs
- Label.cs
- ListBoxItemAutomationPeer.cs
- TypeUtil.cs
- SQLUtility.cs
- InstanceCreationEditor.cs
- HTTP_SERVICE_CONFIG_URLACL_PARAM.cs
- SpStreamWrapper.cs
- ComboBox.cs
- PingReply.cs
- FamilyTypefaceCollection.cs
- AvTraceFormat.cs
- GenericAuthenticationEventArgs.cs
- SingleConverter.cs
- Matrix.cs
- SubpageParagraph.cs
- CodeTypeParameter.cs
- BaseParser.cs
- Object.cs
- DataGridViewColumnHeaderCell.cs
- ListSourceHelper.cs
- TargetInvocationException.cs
- AssemblyResourceLoader.cs
- CannotUnloadAppDomainException.cs
- GridViewEditEventArgs.cs
- compensatingcollection.cs
- PageRanges.cs
- ETagAttribute.cs
- BitmapDownload.cs
- DbProviderFactories.cs
- RequestBringIntoViewEventArgs.cs
- DescendantBaseQuery.cs
- TableParaClient.cs
- PairComparer.cs
- LexicalChunk.cs
- BadImageFormatException.cs
- DocumentCollection.cs
- WebBrowserSiteBase.cs
- ComNativeDescriptor.cs
- DoubleAnimationUsingPath.cs
- TdsParserStaticMethods.cs
- Expressions.cs
- StringUtil.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- ResXFileRef.cs
- SqlReorderer.cs
- FunctionImportElement.cs
- PropertyGridDesigner.cs
- BrowserTree.cs
- InputDevice.cs
- AssociatedControlConverter.cs
- NonceCache.cs
- OdbcConnectionStringbuilder.cs
- BamlLocalizableResource.cs
- FileEnumerator.cs