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
- MouseDevice.cs
- DataBoundControlHelper.cs
- SqlDataSourceSelectingEventArgs.cs
- EncoderNLS.cs
- RelationshipDetailsRow.cs
- StreamAsIStream.cs
- AsymmetricKeyExchangeDeformatter.cs
- HtmlShim.cs
- WindowsIdentity.cs
- ReplyChannel.cs
- PathGeometry.cs
- Certificate.cs
- DesignerActionList.cs
- RadioButtonStandardAdapter.cs
- SettingsBase.cs
- DrawListViewSubItemEventArgs.cs
- StateChangeEvent.cs
- LambdaCompiler.ControlFlow.cs
- MutexSecurity.cs
- RtfControlWordInfo.cs
- OutputChannel.cs
- IsolationInterop.cs
- WebPartUtil.cs
- FastEncoder.cs
- MimeWriter.cs
- TextSpan.cs
- RunClient.cs
- SessionStateModule.cs
- WorkerRequest.cs
- AttributeProviderAttribute.cs
- SerializationEventsCache.cs
- SwitchElementsCollection.cs
- PackWebRequestFactory.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- HttpProxyTransportBindingElement.cs
- ObjectStateManagerMetadata.cs
- UdpReplyToBehavior.cs
- Socket.cs
- DocumentViewerConstants.cs
- DataControlCommands.cs
- HttpListenerPrefixCollection.cs
- DeploymentSectionCache.cs
- XmlSchemaException.cs
- RenderData.cs
- SchemaMapping.cs
- SmtpReplyReaderFactory.cs
- DictionaryCustomTypeDescriptor.cs
- ExtensionQuery.cs
- WindowsListViewItemCheckBox.cs
- XPathNodeList.cs
- ToolStripSettings.cs
- ListViewHitTestInfo.cs
- precedingsibling.cs
- ProcessThread.cs
- ToolStripDropDownItemDesigner.cs
- HwndAppCommandInputProvider.cs
- CalendarDateRangeChangingEventArgs.cs
- XmlSchemaDatatype.cs
- XPathException.cs
- PaintEvent.cs
- AdRotator.cs
- CompositeKey.cs
- ICspAsymmetricAlgorithm.cs
- GeneralTransformCollection.cs
- StrokeSerializer.cs
- ZipIOBlockManager.cs
- xmlfixedPageInfo.cs
- _PooledStream.cs
- Logging.cs
- MailSettingsSection.cs
- ExpressionTextBox.xaml.cs
- DropSource.cs
- DesignerActionHeaderItem.cs
- XmlSchemaValidator.cs
- SqlCachedBuffer.cs
- DataGridViewCellStyleChangedEventArgs.cs
- DbProviderFactories.cs
- FilterableAttribute.cs
- ObjectReferenceStack.cs
- BlockUIContainer.cs
- TreeView.cs
- PolyQuadraticBezierSegment.cs
- TypeForwardedToAttribute.cs
- StandardBindingElement.cs
- TemplateInstanceAttribute.cs
- EntityCommandExecutionException.cs
- OleAutBinder.cs
- log.cs
- SystemColorTracker.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- ClientProxyGenerator.cs
- ImagingCache.cs
- ImageSource.cs
- Html32TextWriter.cs
- CaseInsensitiveHashCodeProvider.cs
- PageCanvasSize.cs
- CardSpacePolicyElement.cs
- CqlQuery.cs
- XsdDataContractExporter.cs
- Flattener.cs