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
- URL.cs
- ZoneIdentityPermission.cs
- FormsAuthenticationTicket.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- DetailsViewInsertEventArgs.cs
- DoubleAnimationBase.cs
- TextRangeEditTables.cs
- EdmItemCollection.OcAssemblyCache.cs
- ListBoxItemAutomationPeer.cs
- OfTypeExpression.cs
- VideoDrawing.cs
- SerializerWriterEventHandlers.cs
- GeneralTransform.cs
- DrawingVisual.cs
- NativeMethods.cs
- XmlSignificantWhitespace.cs
- TransactionFlowBindingElement.cs
- RelatedImageListAttribute.cs
- MapPathBasedVirtualPathProvider.cs
- RunClient.cs
- BmpBitmapEncoder.cs
- RegexGroupCollection.cs
- GeometryHitTestParameters.cs
- FormatConvertedBitmap.cs
- PartialList.cs
- WorkflowRuntimeServiceElementCollection.cs
- ErrorRuntimeConfig.cs
- objectresult_tresulttype.cs
- RuleSet.cs
- StylusButton.cs
- LongPath.cs
- PathParser.cs
- FSWPathEditor.cs
- TextFormatterHost.cs
- HtmlInputText.cs
- XPathNodeList.cs
- AlphabeticalEnumConverter.cs
- SingleAnimation.cs
- CellLabel.cs
- ParseNumbers.cs
- InfoCardArgumentException.cs
- DataGridParentRows.cs
- CompositeCollection.cs
- BitmapPalettes.cs
- MaskedTextBox.cs
- DataPagerField.cs
- DesignerVerbCollection.cs
- ParserStreamGeometryContext.cs
- VectorAnimationBase.cs
- SqlClientFactory.cs
- RightsManagementPermission.cs
- TextEditorThreadLocalStore.cs
- PriorityQueue.cs
- PathData.cs
- nulltextcontainer.cs
- Component.cs
- SQLInt16Storage.cs
- InternalConfigHost.cs
- IBuiltInEvidence.cs
- WindowsPrincipal.cs
- DbParameterCollectionHelper.cs
- CssClassPropertyAttribute.cs
- DeclarativeExpressionConditionDeclaration.cs
- TracingConnectionListener.cs
- OledbConnectionStringbuilder.cs
- ReadOnlyHierarchicalDataSource.cs
- DataSourceNameHandler.cs
- EasingFunctionBase.cs
- DataSvcMapFileSerializer.cs
- UrlParameterWriter.cs
- Random.cs
- MediaPlayerState.cs
- SystemFonts.cs
- IntPtr.cs
- ExpressionDumper.cs
- AppDomainUnloadedException.cs
- TableRow.cs
- Rule.cs
- StoragePropertyMapping.cs
- FormatVersion.cs
- ALinqExpressionVisitor.cs
- ChameleonKey.cs
- XmlSchemaCompilationSettings.cs
- ScriptControlDescriptor.cs
- relpropertyhelper.cs
- InternalPermissions.cs
- DetailsViewRowCollection.cs
- IriParsingElement.cs
- EdmScalarPropertyAttribute.cs
- UriTemplateClientFormatter.cs
- PrintDialog.cs
- BulletedList.cs
- ParallelEnumerableWrapper.cs
- ExceptionUtil.cs
- DataGridViewTextBoxEditingControl.cs
- SkewTransform.cs
- WebPartDescriptionCollection.cs
- LinearGradientBrush.cs
- QueryStringParameter.cs
- XmlEncodedRawTextWriter.cs