Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Security / Tokens / SupportingTokenParameters.cs / 1 / SupportingTokenParameters.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Security.Tokens { using System.ServiceModel.Security; using System.Collections.ObjectModel; using System.Text; using System.Globalization; public class SupportingTokenParameters { Collectionsigned = new Collection (); Collection signedEncrypted = new Collection (); Collection endorsing = new Collection (); Collection signedEndorsing = new Collection (); SupportingTokenParameters(SupportingTokenParameters other) { if (other == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("other"); foreach (SecurityTokenParameters p in other.signed) this.signed.Add((SecurityTokenParameters)p.Clone()); foreach (SecurityTokenParameters p in other.signedEncrypted) this.signedEncrypted.Add((SecurityTokenParameters)p.Clone()); foreach (SecurityTokenParameters p in other.endorsing) this.endorsing.Add((SecurityTokenParameters)p.Clone()); foreach (SecurityTokenParameters p in other.signedEndorsing) this.signedEndorsing.Add((SecurityTokenParameters)p.Clone()); } public SupportingTokenParameters() { // empty } public Collection Endorsing { get { return this.endorsing; } } public Collection SignedEndorsing { get { return this.signedEndorsing; } } public Collection Signed { get { return this.signed; } } public Collection SignedEncrypted { get { return this.signedEncrypted; } } public void SetKeyDerivation(bool requireDerivedKeys) { foreach (SecurityTokenParameters t in this.endorsing) t.RequireDerivedKeys = requireDerivedKeys; foreach (SecurityTokenParameters t in this.signedEndorsing) t.RequireDerivedKeys = requireDerivedKeys; } internal bool IsSetKeyDerivation(bool requireDerivedKeys) { foreach (SecurityTokenParameters t in this.endorsing) if (t.RequireDerivedKeys != requireDerivedKeys) return false; foreach (SecurityTokenParameters t in this.signedEndorsing) if (t.RequireDerivedKeys != requireDerivedKeys) return false; return true; } public override string ToString() { StringBuilder sb = new StringBuilder(); int k; if (this.endorsing.Count == 0) sb.AppendLine("No endorsing tokens."); else for (k = 0; k < this.endorsing.Count; k++) { sb.AppendLine(String.Format(CultureInfo.InvariantCulture, "Endorsing[{0}]", k.ToString(CultureInfo.InvariantCulture))); sb.AppendLine(" " + this.endorsing[k].ToString().Trim().Replace("\n", "\n ")); } if (this.signed.Count == 0) sb.AppendLine("No signed tokens."); else for (k = 0; k < this.signed.Count; k++) { sb.AppendLine(String.Format(CultureInfo.InvariantCulture, "Signed[{0}]", k.ToString(CultureInfo.InvariantCulture))); sb.AppendLine(" " + this.signed[k].ToString().Trim().Replace("\n", "\n ")); } if (this.signedEncrypted.Count == 0) sb.AppendLine("No signed encrypted tokens."); else for (k = 0; k < this.signedEncrypted.Count; k++) { sb.AppendLine(String.Format(CultureInfo.InvariantCulture, "SignedEncrypted[{0}]", k.ToString(CultureInfo.InvariantCulture))); sb.AppendLine(" " + this.signedEncrypted[k].ToString().Trim().Replace("\n", "\n ")); } if (this.signedEndorsing.Count == 0) sb.AppendLine("No signed endorsing tokens."); else for (k = 0; k < this.signedEndorsing.Count; k++) { sb.AppendLine(String.Format(CultureInfo.InvariantCulture, "SignedEndorsing[{0}]", k.ToString(CultureInfo.InvariantCulture))); sb.AppendLine(" " + this.signedEndorsing[k].ToString().Trim().Replace("\n", "\n ")); } return sb.ToString().Trim(); } public SupportingTokenParameters Clone() { return new SupportingTokenParameters(this); } internal bool IsEmpty() { return signed.Count == 0 && signedEncrypted.Count == 0 && endorsing.Count == 0 && signedEndorsing.Count == 0; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BaseHashHelper.cs
- MultipartIdentifier.cs
- WsdlBuildProvider.cs
- TaiwanCalendar.cs
- OleDbSchemaGuid.cs
- ContractNamespaceAttribute.cs
- RootDesignerSerializerAttribute.cs
- SolidColorBrush.cs
- BaseServiceProvider.cs
- SessionStateSection.cs
- QuadraticBezierSegment.cs
- SocketAddress.cs
- WebPartDisplayMode.cs
- DataKeyArray.cs
- SelectionBorderGlyph.cs
- MultiPropertyDescriptorGridEntry.cs
- GridViewDeleteEventArgs.cs
- ThaiBuddhistCalendar.cs
- ActiveXHost.cs
- XmlDeclaration.cs
- AudienceUriMode.cs
- ClientData.cs
- AddressAccessDeniedException.cs
- RenderingBiasValidation.cs
- DataGridViewCellValueEventArgs.cs
- ApplicationCommands.cs
- TdsValueSetter.cs
- QueryOperationResponseOfT.cs
- UriSection.cs
- ClientTargetCollection.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- ObjectDataProvider.cs
- SafeCancelMibChangeNotify.cs
- CategoryNameCollection.cs
- ImplicitInputBrush.cs
- DataGridColumnsPage.cs
- SkinBuilder.cs
- Wizard.cs
- MaskedTextProvider.cs
- ContentDefinition.cs
- BlobPersonalizationState.cs
- ActiveDocumentEvent.cs
- AppliesToBehaviorDecisionTable.cs
- InOutArgumentConverter.cs
- BuildDependencySet.cs
- Scene3D.cs
- CollaborationHelperFunctions.cs
- CommandBindingCollection.cs
- WebPartChrome.cs
- TableRowGroup.cs
- ExpressionEditorAttribute.cs
- HTMLTagNameToTypeMapper.cs
- AuthenticationModulesSection.cs
- UnhandledExceptionEventArgs.cs
- ArcSegment.cs
- SecurityTokenProvider.cs
- ParenthesizePropertyNameAttribute.cs
- BitmapFrame.cs
- RootBrowserWindowProxy.cs
- ClrProviderManifest.cs
- IPAddress.cs
- DataGridTemplateColumn.cs
- EntityDataSourceColumn.cs
- XmlCDATASection.cs
- Sequence.cs
- PlainXmlDeserializer.cs
- TextLineBreak.cs
- SpeakInfo.cs
- PublisherIdentityPermission.cs
- PopupControlService.cs
- HMAC.cs
- ByteAnimation.cs
- OdbcReferenceCollection.cs
- DispatcherHookEventArgs.cs
- CacheOutputQuery.cs
- IdentifierService.cs
- InputBinder.cs
- InputLanguageCollection.cs
- CornerRadiusConverter.cs
- Helper.cs
- ChannelBuilder.cs
- CatalogPartDesigner.cs
- CloseSequenceResponse.cs
- HttpCookie.cs
- TemplatedAdorner.cs
- TextEditorCharacters.cs
- QueryOperator.cs
- MouseActionConverter.cs
- XmlCompatibilityReader.cs
- DecimalAnimationBase.cs
- ZipIORawDataFileBlock.cs
- BookmarkScope.cs
- ExceptionRoutedEventArgs.cs
- X509UI.cs
- PixelFormats.cs
- MultipleViewPattern.cs
- ZoneIdentityPermission.cs
- MemberHolder.cs
- UnsafeNativeMethods.cs
- FormCollection.cs