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
- VariableBinder.cs
- WorkflowApplicationAbortedEventArgs.cs
- HtmlTitle.cs
- sqlnorm.cs
- WSHttpSecurity.cs
- DataDesignUtil.cs
- Transform3DGroup.cs
- AutomationIdentifierGuids.cs
- UIElementAutomationPeer.cs
- DocumentPage.cs
- DetailsViewModeEventArgs.cs
- WebPartExportVerb.cs
- ContentType.cs
- XmlDownloadManager.cs
- ElapsedEventArgs.cs
- RegexFCD.cs
- SHA256Managed.cs
- EdmError.cs
- EntityDataSourceContextCreatedEventArgs.cs
- PowerModeChangedEventArgs.cs
- RSAProtectedConfigurationProvider.cs
- UseLicense.cs
- ContentElement.cs
- DirectoryRedirect.cs
- StreamInfo.cs
- RawStylusInputCustomDataList.cs
- ApplyImportsAction.cs
- ToolStripContainer.cs
- DataGridAddNewRow.cs
- controlskin.cs
- SecureUICommand.cs
- TreeNodeEventArgs.cs
- AmbientProperties.cs
- ScalarConstant.cs
- StateManagedCollection.cs
- ParentControlDesigner.cs
- BitmapImage.cs
- Int64AnimationUsingKeyFrames.cs
- EventLogPermissionAttribute.cs
- TextDecorationLocationValidation.cs
- DataServiceRequestException.cs
- SoapFault.cs
- SystemColors.cs
- WindowsPrincipal.cs
- SqlNodeTypeOperators.cs
- RelationshipEndCollection.cs
- SiteMapNode.cs
- ProxyHelper.cs
- WebEventCodes.cs
- TabPageDesigner.cs
- ImageAutomationPeer.cs
- FileSecurity.cs
- KeyTime.cs
- DataGridViewButtonColumn.cs
- ConfigXmlCDataSection.cs
- CellParaClient.cs
- ClientEventManager.cs
- TextContainer.cs
- MobileFormsAuthentication.cs
- SpeechUI.cs
- DoubleAnimationBase.cs
- XmlValidatingReaderImpl.cs
- VisualStateManager.cs
- UnaryExpression.cs
- WinFormsComponentEditor.cs
- VectorAnimationBase.cs
- CompressedStack.cs
- SchemaImporterExtension.cs
- XhtmlBasicLabelAdapter.cs
- ThreadInterruptedException.cs
- LoadWorkflowByInstanceKeyCommand.cs
- CapabilitiesSection.cs
- SchemaObjectWriter.cs
- FormattedText.cs
- TimelineClockCollection.cs
- SizeChangedEventArgs.cs
- Quaternion.cs
- XmlWrappingReader.cs
- WindowsGraphicsCacheManager.cs
- CodePrimitiveExpression.cs
- AppSecurityManager.cs
- WmlMobileTextWriter.cs
- DynamicRouteExpression.cs
- DataQuery.cs
- PointAnimationClockResource.cs
- SqlLiftIndependentRowExpressions.cs
- RegexGroup.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- DiffuseMaterial.cs
- BehaviorService.cs
- WsdlBuildProvider.cs
- DataBindingExpressionBuilder.cs
- TextEditorSpelling.cs
- MailWebEventProvider.cs
- CultureTableRecord.cs
- ReachSerializer.cs
- EdgeModeValidation.cs
- Timeline.cs
- shaper.cs
- MobileListItemCollection.cs