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
- Panel.cs
- ChannelServices.cs
- CodeTypeParameterCollection.cs
- BaseAsyncResult.cs
- TransactionState.cs
- GorillaCodec.cs
- HtmlInputRadioButton.cs
- ListViewAutomationPeer.cs
- SafeReversePInvokeHandle.cs
- xdrvalidator.cs
- UnmanagedMarshal.cs
- DesignerAutoFormatStyle.cs
- PromptStyle.cs
- ObjectDataSourceFilteringEventArgs.cs
- TextContainerHelper.cs
- Image.cs
- LinqDataSource.cs
- ICspAsymmetricAlgorithm.cs
- DesignTableCollection.cs
- WebConfigurationFileMap.cs
- EnumBuilder.cs
- MediaScriptCommandRoutedEventArgs.cs
- TypeInfo.cs
- Processor.cs
- CloudCollection.cs
- ResolveNextArgumentWorkItem.cs
- EventPrivateKey.cs
- InputScope.cs
- DivideByZeroException.cs
- HttpVersion.cs
- Matrix.cs
- BindingSource.cs
- FlowLayoutPanel.cs
- PtsHelper.cs
- FolderLevelBuildProvider.cs
- ColorPalette.cs
- externdll.cs
- DataAccessException.cs
- Pair.cs
- Wildcard.cs
- ButtonColumn.cs
- RegexRunner.cs
- ReflectPropertyDescriptor.cs
- ResizeGrip.cs
- WindowsAuthenticationEventArgs.cs
- SymmetricAlgorithm.cs
- ObjectStateManager.cs
- OleAutBinder.cs
- FileChangesMonitor.cs
- WmlLinkAdapter.cs
- DataGridViewSelectedRowCollection.cs
- PackageDigitalSignatureManager.cs
- GridEntryCollection.cs
- PassportIdentity.cs
- Point3DCollectionValueSerializer.cs
- ScalarOps.cs
- RepeatInfo.cs
- FirstQueryOperator.cs
- CheckBoxPopupAdapter.cs
- Converter.cs
- AstTree.cs
- KnownIds.cs
- DecoderFallbackWithFailureFlag.cs
- CodeTypeParameter.cs
- SchemaObjectWriter.cs
- EventBuilder.cs
- CrossSiteScriptingValidation.cs
- DBCSCodePageEncoding.cs
- ProfileGroupSettingsCollection.cs
- HttpCookie.cs
- ChangeTracker.cs
- ItemMap.cs
- AdornedElementPlaceholder.cs
- LabelLiteral.cs
- FontInfo.cs
- Graph.cs
- TagPrefixInfo.cs
- SHA1CryptoServiceProvider.cs
- DiscardableAttribute.cs
- EntityContainerRelationshipSetEnd.cs
- InvokeHandlers.cs
- Compiler.cs
- QueryCoreOp.cs
- WhiteSpaceTrimStringConverter.cs
- ReflectionServiceProvider.cs
- DataControlFieldHeaderCell.cs
- TextEffect.cs
- MissingFieldException.cs
- SubclassTypeValidator.cs
- PagesSection.cs
- TrimSurroundingWhitespaceAttribute.cs
- MbpInfo.cs
- MetadataItemCollectionFactory.cs
- SqlDataSourceFilteringEventArgs.cs
- Size.cs
- EventSource.cs
- VerificationAttribute.cs
- WebPart.cs
- DefaultWorkflowSchedulerService.cs
- ComplexTypeEmitter.cs