Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / RemoteX509Token.cs / 1 / RemoteX509Token.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards { using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using System.IdentityModel.Tokens; using System.ServiceModel; using System.ServiceModel.Security; using System.ServiceModel.Security.Tokens; using IDT=Microsoft.InfoCards.Diagnostics.InfoCardTrace; // // Summary: // Remotely host key set cert token // class RemoteX509Token : X509SecurityToken { Listm_keys; object m_sync; bool m_disposed; public RemoteX509Token(X509Certificate2 cert) : base( cert ) { m_keys = new List (1); m_keys .Add(new RemoteX509AsymmetricSecurityKey(cert)); m_sync = new object(); } public override ReadOnlyCollection SecurityKeys { get { return m_keys.AsReadOnly(); } } public override void Dispose() { try { if (m_disposed) { return; } lock (m_sync) { if (m_disposed) { return; } m_disposed = true; foreach (SecurityKey key in m_keys) { IDisposable disposable = key as IDisposable; if (null != disposable) { disposable.Dispose(); } } } } finally { base.Dispose(); } } } } // 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
- PresentationSource.cs
- XPathScanner.cs
- GeneralTransform3D.cs
- DataViewManager.cs
- ValidationEventArgs.cs
- GlyphTypeface.cs
- ObsoleteAttribute.cs
- NullExtension.cs
- SqlPersonalizationProvider.cs
- DistinctQueryOperator.cs
- StreamBodyWriter.cs
- SubpageParagraph.cs
- CompositeCollectionView.cs
- ColumnClickEvent.cs
- Optimizer.cs
- DSACryptoServiceProvider.cs
- TextTreeTextElementNode.cs
- ParentUndoUnit.cs
- FormsIdentity.cs
- EntitySqlQueryBuilder.cs
- FindCriteria.cs
- SqlCharStream.cs
- DesignerSerializationVisibilityAttribute.cs
- SafeRightsManagementHandle.cs
- XmlHierarchyData.cs
- SAPIEngineTypes.cs
- FontFamily.cs
- XmlDownloadManager.cs
- ThemeableAttribute.cs
- GridViewRowEventArgs.cs
- WebPartTransformer.cs
- ProvideValueServiceProvider.cs
- WebPartConnectionsEventArgs.cs
- IsolatedStorageFilePermission.cs
- BmpBitmapDecoder.cs
- GlyphRunDrawing.cs
- SQLResource.cs
- DataSet.cs
- Lasso.cs
- PartialCachingControl.cs
- SettingsBindableAttribute.cs
- MemberCollection.cs
- MessageQueue.cs
- ContainerActivationHelper.cs
- VarRemapper.cs
- DataSourceCache.cs
- BitmapDownload.cs
- ZipFileInfoCollection.cs
- TemplateBuilder.cs
- ToolStripRendererSwitcher.cs
- Enum.cs
- NetCodeGroup.cs
- MinimizableAttributeTypeConverter.cs
- EntityViewGenerationConstants.cs
- SubclassTypeValidator.cs
- ServerIdentity.cs
- ListMarkerSourceInfo.cs
- WeakRefEnumerator.cs
- Vertex.cs
- RenderTargetBitmap.cs
- SqlTypesSchemaImporter.cs
- SwitchLevelAttribute.cs
- ResourceProviderFactory.cs
- ListBoxItemWrapperAutomationPeer.cs
- XmlChildEnumerator.cs
- UidManager.cs
- ConfigsHelper.cs
- PersistenceMetadataNamespace.cs
- DependencyPropertyKind.cs
- X509InitiatorCertificateClientElement.cs
- DateBoldEvent.cs
- NetworkStream.cs
- DispatchProxy.cs
- BitmapImage.cs
- FileDetails.cs
- FileUtil.cs
- RootBrowserWindow.cs
- WmlLabelAdapter.cs
- Pair.cs
- TakeQueryOptionExpression.cs
- WebPartManager.cs
- Enum.cs
- WmlValidatorAdapter.cs
- DefaultValueMapping.cs
- ListViewContainer.cs
- ByteStack.cs
- CodeLabeledStatement.cs
- DbProviderFactory.cs
- TagPrefixInfo.cs
- HeaderCollection.cs
- Authorization.cs
- ProfileBuildProvider.cs
- DelegatingConfigHost.cs
- HttpProfileGroupBase.cs
- XmlExpressionDumper.cs
- ContextMenuService.cs
- SiteMapDataSourceView.cs
- ExceptionUtil.cs
- ActivityTrace.cs
- PagesSection.cs