Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Security / Tokens / SecurityTokenProviderContainer.cs / 1 / SecurityTokenProviderContainer.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Security.Tokens { using System; using System.Security.Cryptography.X509Certificates; using System.Runtime.CompilerServices; using System.IdentityModel.Selectors; using System.IdentityModel.Tokens; class SecurityTokenProviderContainer { SecurityTokenProvider tokenProvider; public SecurityTokenProviderContainer(SecurityTokenProvider tokenProvider) { if (tokenProvider == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("tokenProvider"); } this.tokenProvider = tokenProvider; } public SecurityTokenProvider TokenProvider { get { return this.tokenProvider; } } [MethodImpl(MethodImplOptions.NoInlining)] public void Close(TimeSpan timeout) { SecurityUtils.CloseTokenProviderIfRequired(this.tokenProvider, timeout); } [MethodImpl(MethodImplOptions.NoInlining)] public void Open(TimeSpan timeout) { SecurityUtils.OpenTokenProviderIfRequired(this.tokenProvider, timeout); } [MethodImpl(MethodImplOptions.NoInlining)] public void Abort() { SecurityUtils.AbortTokenProviderIfRequired(this.tokenProvider); } [MethodImpl(MethodImplOptions.NoInlining)] public X509Certificate2 GetCertificate(TimeSpan timeout) { X509SecurityToken token = this.tokenProvider.GetToken(timeout) as X509SecurityToken; if (token != null) { return token.Certificate; } else { return null; } } } } // 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
- XmlJsonWriter.cs
- OracleEncoding.cs
- XmlSubtreeReader.cs
- basecomparevalidator.cs
- OleDbParameterCollection.cs
- PageThemeParser.cs
- CngProvider.cs
- VectorAnimation.cs
- ActionFrame.cs
- DictionaryEntry.cs
- HtmlTableCell.cs
- JavaScriptSerializer.cs
- FrameAutomationPeer.cs
- DebugHandleTracker.cs
- MessageHeaderT.cs
- LineVisual.cs
- SplineKeyFrames.cs
- TdsParser.cs
- WasHttpModulesInstallComponent.cs
- WebServiceFault.cs
- DebugView.cs
- MenuItemStyle.cs
- StylusPointPropertyUnit.cs
- ListDictionaryInternal.cs
- SafePEFileHandle.cs
- DataFormats.cs
- TextLine.cs
- NetSectionGroup.cs
- StringUtil.cs
- Matrix3DValueSerializer.cs
- Drawing.cs
- WebContext.cs
- ClientTarget.cs
- SqlTopReducer.cs
- Cursor.cs
- ClientApiGenerator.cs
- PropertyPathConverter.cs
- TokenBasedSetEnumerator.cs
- DocumentScope.cs
- TdsValueSetter.cs
- Stylesheet.cs
- ClientRuntimeConfig.cs
- InputDevice.cs
- PrintEvent.cs
- HttpHandlerActionCollection.cs
- UriScheme.cs
- ArrayElementGridEntry.cs
- RegisteredDisposeScript.cs
- PageHandlerFactory.cs
- DataGridViewComboBoxColumn.cs
- ProfileInfo.cs
- OleDbStruct.cs
- TransactionTable.cs
- MexServiceChannelBuilder.cs
- KeyManager.cs
- _ShellExpression.cs
- SafeNativeMethods.cs
- WebPartVerbCollection.cs
- DialogWindow.cs
- EventProviderClassic.cs
- RegistrySecurity.cs
- ListBox.cs
- Subtree.cs
- ClientData.cs
- SafeRightsManagementPubHandle.cs
- DiscreteKeyFrames.cs
- IndependentAnimationStorage.cs
- X509SecurityTokenParameters.cs
- XmlAttributes.cs
- TextRangeEditTables.cs
- PerformanceCounterCategory.cs
- AudioStateChangedEventArgs.cs
- Events.cs
- DateTimeOffsetConverter.cs
- FormViewDeletedEventArgs.cs
- ProfileService.cs
- RuntimeHelpers.cs
- ColorAnimationUsingKeyFrames.cs
- SplayTreeNode.cs
- SQLByte.cs
- RadioButtonPopupAdapter.cs
- ConstraintCollection.cs
- PolyBezierSegmentFigureLogic.cs
- EdmComplexTypeAttribute.cs
- ReadContentAsBinaryHelper.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- ManagementQuery.cs
- DataGridTableCollection.cs
- SmtpTransport.cs
- XmlConvert.cs
- Instrumentation.cs
- WebContext.cs
- CharAnimationBase.cs
- SystemParameters.cs
- JpegBitmapDecoder.cs
- MappingModelBuildProvider.cs
- UniqueIdentifierService.cs
- IChannel.cs
- PathSegmentCollection.cs
- BamlResourceSerializer.cs