Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / BeginCreateSecurityTokenRequest.cs / 1 / BeginCreateSecurityTokenRequest.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace Microsoft.InfoCards
{
using Microsoft.Win32.SafeHandles;
using System;
using System.Collections;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.IO;
using IDT = Microsoft.InfoCards.Diagnostics.InfoCardTrace;
//
// Summary:
// Request class for starting the CreateToken processes.
//
internal class BeginCreateSecurityTokenRequest : UIAgentAsyncBeginRequest
{
bool m_discloseOptional;
TokenFactoryCredential m_credential;
//
// Summary:
// Create a new CreateSecurityTokenRequest
//
// Arguments:
// rpcHandle: The RPC Context handle.
// inArgs: The stream to hold the input arguments
// outArgs: The stream to hold the output arguments
// parent: the parent UI Request
//
public BeginCreateSecurityTokenRequest(
IntPtr rpcHandle,
Stream inArgs,
Stream outArgs,
ClientUIRequest parent )
: base( rpcHandle, inArgs, outArgs, parent )
{
}
//
// Summary:
// Marshals the incoming arguements
//
// Remarks:
// creates the TokenFactoryCredential from the input stream.
//
protected override void OnMarshalAsyncInArgs( BinaryReader reader )
{
//
// First marshal the raw arguments.
//
m_discloseOptional = reader.ReadBoolean();
m_credential = TokenFactoryCredential.CreateFrom( reader, this, ParentRequest.UserLanguage );
}
//
// Summary:
// The Async call to create a security token.
//
// Remarks:
// Running on threadpool thread.
//
protected override object AsyncExecute( AsyncParams asyncParam )
{
return ((GetTokenRequest)ParentRequest).CreateSecurityToken( m_credential, m_discloseOptional );
}
//
// Summary:
// The Async call to cancel create a security token.
//
protected override void AsyncCancel()
{
((GetTokenRequest)ParentRequest).CancelCreateSecurityToken( );
}
}
}
// 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
- XAMLParseException.cs
- UTF7Encoding.cs
- HtmlElementEventArgs.cs
- HtmlInputRadioButton.cs
- EventItfInfo.cs
- Marshal.cs
- PageParser.cs
- CurrencyWrapper.cs
- PeerContact.cs
- EntityContainerAssociationSet.cs
- ExtenderProvidedPropertyAttribute.cs
- ParallelLoopState.cs
- ServicePointManagerElement.cs
- ErrorEventArgs.cs
- PropertyInformation.cs
- MexServiceChannelBuilder.cs
- AssociationTypeEmitter.cs
- NamespaceEmitter.cs
- WmlCalendarAdapter.cs
- Help.cs
- Crc32.cs
- DeviceContext.cs
- DataPagerField.cs
- SoapExtensionImporter.cs
- CompilerResults.cs
- EqualityComparer.cs
- OdbcStatementHandle.cs
- RequestSecurityToken.cs
- ApplicationInfo.cs
- ImmComposition.cs
- CheckedListBox.cs
- GlobalItem.cs
- ReferentialConstraint.cs
- AuthenticationModulesSection.cs
- XsltCompileContext.cs
- DynamicValidator.cs
- Model3D.cs
- ActivityInterfaces.cs
- SqlClientWrapperSmiStreamChars.cs
- MeshGeometry3D.cs
- Char.cs
- BitmapEffectOutputConnector.cs
- AuthenticodeSignatureInformation.cs
- TagMapCollection.cs
- CalendarDayButton.cs
- ComponentDispatcher.cs
- MemoryMappedView.cs
- FirstMatchCodeGroup.cs
- ItemsControl.cs
- ClientSideQueueItem.cs
- DbMetaDataFactory.cs
- ObjectView.cs
- BuilderInfo.cs
- DateTimePicker.cs
- PartialClassGenerationTask.cs
- DispatchChannelSink.cs
- CollectionContainer.cs
- X509Logo.cs
- DataControlFieldCell.cs
- GuidConverter.cs
- AttributeAction.cs
- COAUTHIDENTITY.cs
- AllowedAudienceUriElementCollection.cs
- HttpModulesSection.cs
- ProfileManager.cs
- SettingsPropertyValueCollection.cs
- ListMarkerSourceInfo.cs
- JsonUriDataContract.cs
- CacheEntry.cs
- ViewCellRelation.cs
- BooleanAnimationUsingKeyFrames.cs
- BaseDataBoundControl.cs
- COM2EnumConverter.cs
- NavigationProgressEventArgs.cs
- SaveFileDialog.cs
- GregorianCalendar.cs
- AuthorizationBehavior.cs
- GradientBrush.cs
- AppDomainShutdownMonitor.cs
- TableLayoutPanelCellPosition.cs
- TabControlEvent.cs
- SingletonConnectionReader.cs
- Triplet.cs
- ControlCollection.cs
- OdbcInfoMessageEvent.cs
- PopupRoot.cs
- MessageAction.cs
- CharacterHit.cs
- ContextMenu.cs
- _DomainName.cs
- CompilerInfo.cs
- ByteAnimationUsingKeyFrames.cs
- Activity.cs
- RestHandlerFactory.cs
- FileLogRecordHeader.cs
- DbXmlEnabledProviderManifest.cs
- WebPartUtil.cs
- ButtonField.cs
- CodeDelegateInvokeExpression.cs
- PeerObject.cs