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
- RequestQueue.cs
- PartialCachingControl.cs
- EmptyStringExpandableObjectConverter.cs
- ApplicationCommands.cs
- RoleManagerEventArgs.cs
- DataGridViewTextBoxEditingControl.cs
- StringUtil.cs
- TypeCacheManager.cs
- BoolExpr.cs
- DatatypeImplementation.cs
- DataGridViewCell.cs
- CodeTypeMember.cs
- PieceNameHelper.cs
- TemplateManager.cs
- IPCCacheManager.cs
- HtmlButton.cs
- PortCache.cs
- MarshalByValueComponent.cs
- DocumentSchemaValidator.cs
- SplineKeyFrames.cs
- QilStrConcatenator.cs
- SQLDoubleStorage.cs
- XmlAutoDetectWriter.cs
- StateItem.cs
- SessionStateUtil.cs
- SparseMemoryStream.cs
- CompositeTypefaceMetrics.cs
- RequestQueryParser.cs
- DataGridViewCellStyle.cs
- ReturnEventArgs.cs
- GradientStop.cs
- ObjectStateEntry.cs
- DataGridViewColumnEventArgs.cs
- FileResponseElement.cs
- ContentPathSegment.cs
- DescendentsWalker.cs
- SignatureHelper.cs
- DataKeyCollection.cs
- ReturnValue.cs
- TypeBuilderInstantiation.cs
- ScalarOps.cs
- MetadataUtilsSmi.cs
- DefaultPerformanceCounters.cs
- StatusBarPanel.cs
- securitycriticaldataClass.cs
- XmlSerializerOperationFormatter.cs
- DesignerAttributeInfo.cs
- WriteLineDesigner.xaml.cs
- Int32CollectionConverter.cs
- SafeNativeMethods.cs
- ToolboxDataAttribute.cs
- SerializationFieldInfo.cs
- Hex.cs
- UnhandledExceptionEventArgs.cs
- SingleObjectCollection.cs
- PreviousTrackingServiceAttribute.cs
- WebPartEditorOkVerb.cs
- UnsafeNativeMethods.cs
- XamlFigureLengthSerializer.cs
- StylusButtonCollection.cs
- DataGridTextBox.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- _CommandStream.cs
- StyleBamlTreeBuilder.cs
- MenuItemCollection.cs
- WebPartConnectionsConnectVerb.cs
- CriticalExceptions.cs
- TextDecorationLocationValidation.cs
- JoinElimination.cs
- ComplexLine.cs
- GlyphRunDrawing.cs
- Ray3DHitTestResult.cs
- HtmlEncodedRawTextWriter.cs
- HttpResponse.cs
- VersionPair.cs
- ActiveDocumentEvent.cs
- Char.cs
- BindStream.cs
- UnmanagedMemoryStreamWrapper.cs
- Message.cs
- ConfigXmlAttribute.cs
- UInt32Converter.cs
- XmlCodeExporter.cs
- SqlDataRecord.cs
- OpenFileDialog.cs
- CngUIPolicy.cs
- ItemAutomationPeer.cs
- Vector3D.cs
- PropertyGridView.cs
- RelationshipEntry.cs
- UInt32Storage.cs
- GridViewHeaderRowPresenter.cs
- SimpleColumnProvider.cs
- BlockCollection.cs
- XmlQualifiedName.cs
- QualifiedCellIdBoolean.cs
- SqlExpressionNullability.cs
- PriorityQueue.cs
- MobileControlsSection.cs
- FixedTextSelectionProcessor.cs