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
- SiteMapDataSourceView.cs
- WebDisplayNameAttribute.cs
- Rect3DValueSerializer.cs
- TouchDevice.cs
- DataContractJsonSerializer.cs
- ByteStack.cs
- SelectionRange.cs
- BaseUriHelper.cs
- Header.cs
- PartialCachingAttribute.cs
- EntityDataSourceWrapper.cs
- GridViewRowEventArgs.cs
- InstalledVoice.cs
- DiscreteKeyFrames.cs
- nulltextnavigator.cs
- RotateTransform.cs
- MetadataArtifactLoaderCompositeResource.cs
- WorkflowElementDialog.cs
- DependencyObjectCodeDomSerializer.cs
- DataColumnCollection.cs
- MetadataArtifactLoaderComposite.cs
- Quad.cs
- KnownBoxes.cs
- GridItemProviderWrapper.cs
- ScrollBar.cs
- FormatException.cs
- Vector3D.cs
- CompilerInfo.cs
- CompModHelpers.cs
- ResourcesGenerator.cs
- ConstructorNeedsTagAttribute.cs
- BezierSegment.cs
- QueryBranchOp.cs
- JobDuplex.cs
- AssemblyCache.cs
- control.ime.cs
- UniqueEventHelper.cs
- MatrixUtil.cs
- SelectionRangeConverter.cs
- translator.cs
- RealProxy.cs
- TypeForwardedFromAttribute.cs
- ServiceOperationInvoker.cs
- Win32Exception.cs
- Dispatcher.cs
- OleDbException.cs
- ViewBox.cs
- ILGenerator.cs
- MemberAccessException.cs
- SafeHGlobalHandleCritical.cs
- __ConsoleStream.cs
- BitmapEffectInputData.cs
- TextDecorationCollectionConverter.cs
- TextTreeUndoUnit.cs
- WebOperationContext.cs
- DrawingContextWalker.cs
- EditableTreeList.cs
- MsmqOutputSessionChannel.cs
- MailWebEventProvider.cs
- TrustLevelCollection.cs
- OdbcConnectionOpen.cs
- AsyncStreamReader.cs
- HostingPreferredMapPath.cs
- ListParaClient.cs
- SqlGatherProducedAliases.cs
- UnsafeNativeMethods.cs
- ColumnWidthChangingEvent.cs
- AuditLog.cs
- AttachedProperty.cs
- AuthenticatingEventArgs.cs
- EtwTrace.cs
- ToolStripItemImageRenderEventArgs.cs
- TextTreeInsertUndoUnit.cs
- WinFormsUtils.cs
- NamedPipeTransportBindingElement.cs
- ValidationErrorInfo.cs
- NullableDecimalMinMaxAggregationOperator.cs
- ScalarType.cs
- WebHttpElement.cs
- TdsParserSafeHandles.cs
- XmlSerializerVersionAttribute.cs
- LineMetrics.cs
- StringBuilder.cs
- XPathBinder.cs
- CompositionTarget.cs
- XmlAttribute.cs
- ParseChildrenAsPropertiesAttribute.cs
- RuntimeConfig.cs
- NavigationEventArgs.cs
- NamedObject.cs
- WpfSharedBamlSchemaContext.cs
- CompilerLocalReference.cs
- DataControlFieldHeaderCell.cs
- EventMappingSettingsCollection.cs
- Track.cs
- FileVersionInfo.cs
- TriggerCollection.cs
- ScaleTransform.cs
- DataGridViewComboBoxColumn.cs
- processwaithandle.cs