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
- QilGeneratorEnv.cs
- InternalConfigRoot.cs
- CollectionViewGroup.cs
- TargetControlTypeCache.cs
- ReadOnlyDictionary.cs
- SqlDuplicator.cs
- ToolStripContentPanel.cs
- DetailsViewCommandEventArgs.cs
- AmbiguousMatchException.cs
- Control.cs
- FilterFactory.cs
- Timeline.cs
- RegistrationServices.cs
- LocalizationComments.cs
- ToolStripSeparator.cs
- ActivityTrace.cs
- TextSpanModifier.cs
- HtmlLiteralTextAdapter.cs
- LoadedEvent.cs
- CqlLexerHelpers.cs
- GenericUriParser.cs
- MethodCallTranslator.cs
- SplitterEvent.cs
- DataGridTablesFactory.cs
- PointLightBase.cs
- Hashtable.cs
- StylusPointPropertyId.cs
- CSharpCodeProvider.cs
- TreeIterator.cs
- WebPartDisplayModeCancelEventArgs.cs
- securitycriticaldataformultiplegetandset.cs
- WebPartConnectionsCancelEventArgs.cs
- ColorTranslator.cs
- MenuDesigner.cs
- BaseConfigurationRecord.cs
- WebPartVerbCollection.cs
- EventSchemaTraceListener.cs
- Msec.cs
- StrokeNodeOperations.cs
- TypeFieldSchema.cs
- FormsAuthenticationUserCollection.cs
- ReadOnlyHierarchicalDataSourceView.cs
- Win32KeyboardDevice.cs
- SqlDataSourceQuery.cs
- LocalizabilityAttribute.cs
- CopyNamespacesAction.cs
- SchemaCollectionPreprocessor.cs
- LifetimeServices.cs
- WebRequest.cs
- DefaultValueAttribute.cs
- SimpleApplicationHost.cs
- UnsafeNativeMethods.cs
- Transactions.cs
- BindingSourceDesigner.cs
- RightsManagementEncryptedStream.cs
- DataServiceRequestException.cs
- TreeNodeBinding.cs
- ExtendedPropertyDescriptor.cs
- ListViewPagedDataSource.cs
- DoubleCollection.cs
- HtmlHead.cs
- ResourceWriter.cs
- DataServiceStreamResponse.cs
- IDispatchConstantAttribute.cs
- Journaling.cs
- ScaleTransform3D.cs
- OdbcParameter.cs
- PropertyFilterAttribute.cs
- GridViewSortEventArgs.cs
- Rijndael.cs
- PanelContainerDesigner.cs
- Multiply.cs
- AsymmetricSignatureFormatter.cs
- BackgroundFormatInfo.cs
- GCHandleCookieTable.cs
- RegexStringValidator.cs
- TemplateBamlTreeBuilder.cs
- CompositeDuplexElement.cs
- CachingHintValidation.cs
- CollectionDataContractAttribute.cs
- AdornerLayer.cs
- SocketInformation.cs
- BoundingRectTracker.cs
- DockPattern.cs
- PrePostDescendentsWalker.cs
- _StreamFramer.cs
- SQLBoolean.cs
- TemplateBuilder.cs
- GenerateTemporaryTargetAssembly.cs
- ChunkedMemoryStream.cs
- StretchValidation.cs
- Group.cs
- ServiceMoniker.cs
- SqlCacheDependencyDatabase.cs
- BigInt.cs
- DataPagerFieldCommandEventArgs.cs
- ExpressionDumper.cs
- AsyncContentLoadedEventArgs.cs
- OrderablePartitioner.cs
- ClientScriptManager.cs