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
- WindowsFormsSynchronizationContext.cs
- UriTemplateLiteralQueryValue.cs
- FieldNameLookup.cs
- ProfilePropertyNameValidator.cs
- TagMapCollection.cs
- ListViewGroup.cs
- ProtocolsConfiguration.cs
- HMACMD5.cs
- ArrangedElementCollection.cs
- TemplateComponentConnector.cs
- ProtocolViolationException.cs
- BatchWriter.cs
- GridViewPageEventArgs.cs
- MarkupCompilePass2.cs
- DefaultPrintController.cs
- TrackPoint.cs
- PreservationFileWriter.cs
- WebConfigurationHostFileChange.cs
- MultiBinding.cs
- ProfileBuildProvider.cs
- DesignerResources.cs
- ParameterRetriever.cs
- DataGridViewMethods.cs
- IndexingContentUnit.cs
- WebPartEditVerb.cs
- EntityDataSourceContextDisposingEventArgs.cs
- AttachInfo.cs
- DataPagerFieldItem.cs
- MessageQueuePermissionAttribute.cs
- WindowsRichEditRange.cs
- PtsCache.cs
- ClientSettingsSection.cs
- RegexCapture.cs
- AuthenticationService.cs
- StylusEditingBehavior.cs
- Pair.cs
- DefaultPrintController.cs
- ListBoxDesigner.cs
- PerformanceCounterManager.cs
- FunctionImportElement.cs
- TreeWalkHelper.cs
- MappingItemCollection.cs
- StatusBarAutomationPeer.cs
- Scripts.cs
- ServiceManager.cs
- UserNameServiceElement.cs
- SafeFindHandle.cs
- CodeSubDirectory.cs
- XmlMapping.cs
- FileDetails.cs
- FrameworkTemplate.cs
- OwnerDrawPropertyBag.cs
- MaskedTextProvider.cs
- LockedHandleGlyph.cs
- DataGridAddNewRow.cs
- StrokeNodeData.cs
- StructuredTypeInfo.cs
- ParameterToken.cs
- SHA384.cs
- HttpCacheParams.cs
- SafeMemoryMappedViewHandle.cs
- DataGridColumn.cs
- securestring.cs
- FormViewPagerRow.cs
- TextTreeTextBlock.cs
- AutomationProperties.cs
- EncryptedPackage.cs
- DocumentXmlWriter.cs
- CompositeFontInfo.cs
- GenerateHelper.cs
- AttributedMetaModel.cs
- GeometryDrawing.cs
- mda.cs
- CacheMemory.cs
- DataGridViewAutoSizeModeEventArgs.cs
- RegexEditorDialog.cs
- TextServicesCompartmentEventSink.cs
- ReadOnlyAttribute.cs
- DesignTimeParseData.cs
- XmlSchemaSimpleTypeList.cs
- BuildManagerHost.cs
- WindowsListViewItemCheckBox.cs
- DateTimeConverter.cs
- VScrollBar.cs
- XmlSchemaComplexContentExtension.cs
- DictionaryMarkupSerializer.cs
- ActiveXSite.cs
- InternalMappingException.cs
- EventLogException.cs
- CompositeDuplexElement.cs
- PrefixQName.cs
- WpfSharedBamlSchemaContext.cs
- SafeNativeMethods.cs
- ListViewItem.cs
- URIFormatException.cs
- TdsParserHelperClasses.cs
- EastAsianLunisolarCalendar.cs
- TraceProvider.cs
- DisplayInformation.cs
- HierarchicalDataBoundControlAdapter.cs