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
- TileBrush.cs
- StringReader.cs
- ViewCellSlot.cs
- StylusButtonCollection.cs
- TransferMode.cs
- IfAction.cs
- DataKey.cs
- ReceiveContent.cs
- PartialArray.cs
- XMLUtil.cs
- DetailsViewPagerRow.cs
- ArithmeticException.cs
- MethodBody.cs
- SerializerWriterEventHandlers.cs
- ToolStripContentPanel.cs
- ISCIIEncoding.cs
- SystemColors.cs
- ActivityDelegate.cs
- CommentGlyph.cs
- ToolStripSeparator.cs
- AudioDeviceOut.cs
- NamedElement.cs
- BuilderElements.cs
- PopupEventArgs.cs
- CodeDelegateInvokeExpression.cs
- GPStream.cs
- StructuralType.cs
- ImageFormat.cs
- DbMetaDataCollectionNames.cs
- BitmapPalette.cs
- Util.cs
- Instrumentation.cs
- XmlDictionaryReaderQuotas.cs
- MessageSecurityOverTcpElement.cs
- BlobPersonalizationState.cs
- OneToOneMappingSerializer.cs
- CodeTypeDelegate.cs
- ShaderEffect.cs
- ToolStripComboBox.cs
- Variant.cs
- CustomPeerResolverService.cs
- FixedDocument.cs
- ObjectParameterCollection.cs
- DisplayInformation.cs
- NetDispatcherFaultException.cs
- Odbc32.cs
- SafeCoTaskMem.cs
- SupportingTokenProviderSpecification.cs
- DesignerCalendarAdapter.cs
- ActivityDesignerAccessibleObject.cs
- BinaryConverter.cs
- SspiWrapper.cs
- CodeDomLoader.cs
- storagemappingitemcollection.viewdictionary.cs
- MatchingStyle.cs
- NativeMethodsCLR.cs
- XmlStreamStore.cs
- HttpRawResponse.cs
- CompilerParameters.cs
- WinEventWrap.cs
- EntityDataSourceView.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- SafeNativeMethods.cs
- TypeElement.cs
- ComplexPropertyEntry.cs
- ToolStripItemTextRenderEventArgs.cs
- LineBreak.cs
- VirtualPathProvider.cs
- CultureMapper.cs
- GC.cs
- SoapEnvelopeProcessingElement.cs
- BuildTopDownAttribute.cs
- BooleanConverter.cs
- RootAction.cs
- TdsParserStaticMethods.cs
- ConfigurationLocationCollection.cs
- _AutoWebProxyScriptWrapper.cs
- HttpCookie.cs
- SQLSingle.cs
- SafeArrayTypeMismatchException.cs
- ping.cs
- SBCSCodePageEncoding.cs
- SqlCommand.cs
- ScaleTransform.cs
- DllNotFoundException.cs
- cookiecontainer.cs
- LongMinMaxAggregationOperator.cs
- RtfNavigator.cs
- ToggleButtonAutomationPeer.cs
- TableItemStyle.cs
- ValueType.cs
- MimeFormImporter.cs
- DBAsyncResult.cs
- XmlDeclaration.cs
- OutputCache.cs
- MatrixKeyFrameCollection.cs
- ProxyWebPartManager.cs
- PaperSize.cs
- CustomAttributeBuilder.cs
- SecurityUtils.cs