Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / GetRecipientRequest.cs / 1 / GetRecipientRequest.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards { using System; using System.IO; using System.Security; using System.Security.Cryptography.X509Certificates; using System.Collections; using System.Collections.Generic; using Microsoft.InfoCards.Diagnostics; using IDT = Microsoft.InfoCards.Diagnostics.InfoCardTrace; // // This class handles a UI request for recipient information // class GetRecipientRequest :UIAgentRequest { string m_recipientId; Recipient m_recipient; // // Summary // Create a new request to return recipient related information // public GetRecipientRequest( IntPtr rpcHandle, Stream inArgs, Stream outArgs, ClientUIRequest parent ) : base( rpcHandle, inArgs, outArgs, parent ) { } protected override void OnMarshalInArgs() { BinaryReader reader = new InfoCardBinaryReader( InArgs, System.Text.Encoding.Unicode ); m_recipientId = Utility.DeserializeString( reader ); } // // Summary // Retrive the recipient related data // protected override void OnProcess() { IDT.Assert( null != m_recipientId, "null thumb print" ); StoreConnection connection = StoreConnection.GetConnection(); try { // // Retrieve the recipient object from the store // ListparamList = new List (); QueryParameter query = new QueryParameter( SecondaryIndexDefinition.ObjectTypeIndex, (Int32)StorableObjectType.Recipient ); paramList.Add( query ); query = new QueryParameter( SecondaryIndexDefinition.RecipientIdIndex, m_recipientId ); paramList.Add( query ); DataRow row = connection.GetSingleRow( paramList.ToArray() ); if( null != row ) { m_recipient = new Recipient( new MemoryStream( row.GetDataField() ) ); } } finally { connection.Close(); } } // // Summary // Serialize the output in the following order // Recipient // // protected override void OnMarshalOutArgs() { BinaryWriter writer = new BinaryWriter( OutArgs, System.Text.Encoding.Unicode ); IDT.Assert( null != m_recipient, "null recipient" ); IDT.TraceDebug( "Serialize the recipient" ); m_recipient.Serialize( writer ); } } } // 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
- UIPropertyMetadata.cs
- ResourceDictionary.cs
- WebEventTraceProvider.cs
- HandlerMappingMemo.cs
- OdbcConnection.cs
- WebReferencesBuildProvider.cs
- TableLayoutRowStyleCollection.cs
- AssociationTypeEmitter.cs
- XsltContext.cs
- Quad.cs
- InkCanvasFeedbackAdorner.cs
- CompoundFileIOPermission.cs
- DynamicMethod.cs
- ErrorRuntimeConfig.cs
- ValueTypePropertyReference.cs
- TransformedBitmap.cs
- ArrangedElementCollection.cs
- Stroke.cs
- DbTransaction.cs
- ModulesEntry.cs
- TemplateEditingService.cs
- TabRenderer.cs
- LongValidatorAttribute.cs
- ServiceManagerHandle.cs
- EdmProperty.cs
- BindableTemplateBuilder.cs
- PanelDesigner.cs
- ListSourceHelper.cs
- SendMessageContent.cs
- CryptoStream.cs
- DispatcherTimer.cs
- FormsAuthenticationModule.cs
- CompoundFileDeflateTransform.cs
- UpdateTranslator.cs
- TextServicesCompartment.cs
- DotNetATv1WindowsLogEntrySerializer.cs
- _ShellExpression.cs
- Parameter.cs
- WebResourceAttribute.cs
- WhiteSpaceTrimStringConverter.cs
- ParallelTimeline.cs
- DurableServiceAttribute.cs
- ExtensionQuery.cs
- TraceSource.cs
- CollectionCodeDomSerializer.cs
- ImageSourceTypeConverter.cs
- CompilerCollection.cs
- XmlTextReader.cs
- MobilePage.cs
- DropSourceBehavior.cs
- TreeNode.cs
- InputMethod.cs
- NativeCppClassAttribute.cs
- Msec.cs
- CompiledQueryCacheEntry.cs
- CatalogZone.cs
- ChameleonKey.cs
- FunctionNode.cs
- BaseCodeDomTreeGenerator.cs
- EdmType.cs
- VisualCollection.cs
- LateBoundBitmapDecoder.cs
- RegionData.cs
- KnownTypeAttribute.cs
- WebGetAttribute.cs
- PermissionSet.cs
- AnnotationService.cs
- DaylightTime.cs
- BitmapSizeOptions.cs
- Subtree.cs
- SignerInfo.cs
- Cell.cs
- ToolBarPanel.cs
- Propagator.ExtentPlaceholderCreator.cs
- ToolTipService.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- DataBoundControl.cs
- Button.cs
- Label.cs
- QilNode.cs
- FormViewInsertedEventArgs.cs
- MatcherBuilder.cs
- FontStretchConverter.cs
- X509CertificateCollection.cs
- Matrix3D.cs
- ToolStripDropDownClosingEventArgs.cs
- AssemblyNameProxy.cs
- DataControlButton.cs
- SocketElement.cs
- Model3DGroup.cs
- DataGridViewCellStateChangedEventArgs.cs
- TypeDescriptionProvider.cs
- DataServiceQueryProvider.cs
- XamlSerializationHelper.cs
- OleServicesContext.cs
- ParameterCollection.cs
- ForwardPositionQuery.cs
- Form.cs
- StandardToolWindows.cs
- User.cs