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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UTF32Encoding.cs
- DbConnectionPoolGroup.cs
- SafeTimerHandle.cs
- NativeMethods.cs
- RectConverter.cs
- VectorValueSerializer.cs
- EventDescriptorCollection.cs
- PropertyNames.cs
- QueryResponse.cs
- storagemappingitemcollection.viewdictionary.cs
- AnimatedTypeHelpers.cs
- AmbiguousMatchException.cs
- TreeViewDesigner.cs
- FilteredAttributeCollection.cs
- PolyQuadraticBezierSegment.cs
- SessionPageStateSection.cs
- GlobalDataBindingHandler.cs
- XmlEntityReference.cs
- WindowsTreeView.cs
- MemberAccessException.cs
- TransformedBitmap.cs
- ExpressionPrefixAttribute.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- RouteValueExpressionBuilder.cs
- Bold.cs
- BasicExpressionVisitor.cs
- BoundColumn.cs
- HwndSubclass.cs
- StringPropertyBuilder.cs
- EqualityComparer.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- UniqueTransportManagerRegistration.cs
- ToolStripMenuItemDesigner.cs
- ExtentJoinTreeNode.cs
- DiscreteKeyFrames.cs
- ECDiffieHellmanCng.cs
- StreamReader.cs
- WebPartConnectionsCancelEventArgs.cs
- QilInvokeEarlyBound.cs
- VarInfo.cs
- TreePrinter.cs
- DBNull.cs
- GiveFeedbackEventArgs.cs
- SqlServices.cs
- CodeCatchClauseCollection.cs
- WindowInteropHelper.cs
- DescendentsWalkerBase.cs
- PreDigestedSignedInfo.cs
- TypeUsage.cs
- WsrmTraceRecord.cs
- WebPartConnectionsDisconnectVerb.cs
- ContentControl.cs
- SubtreeProcessor.cs
- DirectionalLight.cs
- VariableDesigner.xaml.cs
- HierarchicalDataBoundControlAdapter.cs
- RoleGroupCollectionEditor.cs
- SystemKeyConverter.cs
- TextEffectResolver.cs
- DebugHandleTracker.cs
- SqlFileStream.cs
- DurableServiceAttribute.cs
- AssemblyResourceLoader.cs
- WebServiceFaultDesigner.cs
- MdiWindowListItemConverter.cs
- InvokeProviderWrapper.cs
- relpropertyhelper.cs
- PolyBezierSegmentFigureLogic.cs
- DocumentPageView.cs
- MemberDomainMap.cs
- Version.cs
- TextEndOfLine.cs
- BitmapMetadataEnumerator.cs
- ToolStripItemDataObject.cs
- WebPartTracker.cs
- FixedHighlight.cs
- PrePrepareMethodAttribute.cs
- CommonDialog.cs
- Baml2006KeyRecord.cs
- SeparatorAutomationPeer.cs
- GlobalizationSection.cs
- ParameterInfo.cs
- TypeLibConverter.cs
- DataGridViewColumnCollection.cs
- HijriCalendar.cs
- TreeNodeSelectionProcessor.cs
- EntityDataSourceSelectingEventArgs.cs
- File.cs
- Transactions.cs
- WorkflowRuntimeEndpoint.cs
- EventLogPermissionEntryCollection.cs
- CachingParameterInspector.cs
- TypeConverterHelper.cs
- PolyBezierSegment.cs
- DataGridViewCellValueEventArgs.cs
- FastEncoder.cs
- ProxyWebPartConnectionCollection.cs
- AxHost.cs
- XmlMapping.cs
- ConnectionConsumerAttribute.cs