Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / BeginSelectCardRequest.cs / 1 / BeginSelectCardRequest.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 to start the Card Selection process. // internal class BeginSelectCardRequest : UIAgentAsyncBeginRequest { InfoCard m_card; // // Summary: // Creates an new BeginSelectCardRequest // // 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 BeginSelectCardRequest( IntPtr rpcHandle, Stream inArgs, Stream outArgs, ClientUIRequest parent ) : base( rpcHandle, inArgs, outArgs, parent ) { } // // Summary: // Marshals the incoming arguements // // Remarks: // reads the infocard id and auth type selected from that card. // -1 for authType means no auth. // protected override void OnMarshalAsyncInArgs( BinaryReader reader ) { // // First marshal the raw arguments. // m_card = new InfoCard( reader.BaseStream ); m_card.GetExtendedInformation().Deserialize( reader.BaseStream ); m_card.GetRPIdentityRequirement().Deserialize( reader.BaseStream ); m_card.GetClaims().Deserialize( reader.BaseStream ); StoreConnection connection = StoreConnection.GetConnection(); try { // // We are going to generate a token with this card // so we will need to decrypt the master key. // The claims are already decrypted so we can skip that // step in this case. // InfoCardMasterKey masterKey = m_card.GetMasterKey( connection ); if( m_card.IsPinProtected ) { masterKey.Decrypt( masterKey.GetPinHelper( m_card.Pin ) ); } } finally { connection.Close(); } } // // Summary: // The Async call to Select a card. // // Remarks: // Running on threadpool thread. // protected override object AsyncExecute( AsyncParams asyncParam ) { return ( ( GetTokenRequest )ParentRequest ).SelectCard( m_card, m_card.IsSelfIssued ); } // // Summary: // The Async cancel call to Select a card. // protected override void AsyncCancel() { ( ( GetTokenRequest ) ParentRequest ).CancelSelectCard(); } } } // 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
- UrlUtility.cs
- UnhandledExceptionEventArgs.cs
- SamlNameIdentifierClaimResource.cs
- ReliabilityContractAttribute.cs
- ScriptBehaviorDescriptor.cs
- MailWebEventProvider.cs
- SizeAnimationBase.cs
- WrappedIUnknown.cs
- DataGridCommandEventArgs.cs
- DataGridViewToolTip.cs
- HealthMonitoringSection.cs
- SimplePropertyEntry.cs
- RemotingAttributes.cs
- FileDialogCustomPlaces.cs
- PrinterUnitConvert.cs
- SettingsProviderCollection.cs
- WebBrowserSiteBase.cs
- DataGridViewUtilities.cs
- Page.cs
- ClientTargetCollection.cs
- GridToolTip.cs
- FileIOPermission.cs
- RepeatInfo.cs
- WindowsFormsSectionHandler.cs
- QilFactory.cs
- BooleanStorage.cs
- WizardForm.cs
- CollectionBuilder.cs
- BackgroundWorker.cs
- FrameDimension.cs
- DataServiceRequestException.cs
- Missing.cs
- Message.cs
- Stack.cs
- HtmlTableRowCollection.cs
- CornerRadius.cs
- OutOfMemoryException.cs
- TargetInvocationException.cs
- ColumnCollection.cs
- AsyncPostBackErrorEventArgs.cs
- DataTableNewRowEvent.cs
- FunctionDefinition.cs
- ForeignKeyConstraint.cs
- DropTarget.cs
- DataTableClearEvent.cs
- Timer.cs
- TraceUtils.cs
- GetPageCompletedEventArgs.cs
- AssociationType.cs
- ClrProviderManifest.cs
- WebServiceTypeData.cs
- DoubleAnimationUsingKeyFrames.cs
- MonthChangedEventArgs.cs
- ExpressionBinding.cs
- XmlQuerySequence.cs
- XmlReader.cs
- ElapsedEventArgs.cs
- ProviderUtil.cs
- sqlmetadatafactory.cs
- XmlStreamStore.cs
- DtrList.cs
- XsltException.cs
- DbDataAdapter.cs
- StateChangeEvent.cs
- AutomationAttributeInfo.cs
- SoapHeaderAttribute.cs
- ThreadExceptionEvent.cs
- SchemaNotation.cs
- LockRenewalTask.cs
- ClientSession.cs
- DocumentViewerBase.cs
- HttpWrapper.cs
- MergeExecutor.cs
- TreeViewHitTestInfo.cs
- ItemContainerGenerator.cs
- NotifyParentPropertyAttribute.cs
- PointAnimationBase.cs
- AppDomainFactory.cs
- DashStyles.cs
- DataGridPagerStyle.cs
- RadioButton.cs
- RichTextBox.cs
- TranslateTransform.cs
- PartialToken.cs
- SoapAttributeOverrides.cs
- QilLoop.cs
- DecimalConstantAttribute.cs
- EntityDataSourceDesigner.cs
- ParameterRetriever.cs
- PointCollection.cs
- DrawTreeNodeEventArgs.cs
- MultiPageTextView.cs
- PauseStoryboard.cs
- HMAC.cs
- peersecurityelement.cs
- FontStyle.cs
- Label.cs
- DataGridColumnCollection.cs
- ModelTreeEnumerator.cs
- ClockGroup.cs