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
- objectresult_tresulttype.cs
- ChangeBlockUndoRecord.cs
- BaseComponentEditor.cs
- DBConnectionString.cs
- XmlAttributeHolder.cs
- SoapElementAttribute.cs
- StorageAssociationTypeMapping.cs
- ObjectPropertyMapping.cs
- CategoryGridEntry.cs
- PageBreakRecord.cs
- TableParagraph.cs
- XmlSchemaImporter.cs
- ColumnClickEvent.cs
- VBCodeProvider.cs
- Rotation3DAnimation.cs
- RequestUriProcessor.cs
- XmlSchemaComplexContent.cs
- XmlSchemaChoice.cs
- DecimalMinMaxAggregationOperator.cs
- StringExpressionSet.cs
- SiteMapPath.cs
- WebEventCodes.cs
- BinaryReader.cs
- FigureHelper.cs
- ToolStripRendererSwitcher.cs
- TemplatePropertyEntry.cs
- HttpStreamFormatter.cs
- XmlStringTable.cs
- SystemWebCachingSectionGroup.cs
- MethodCallExpression.cs
- WebEventTraceProvider.cs
- CaseInsensitiveOrdinalStringComparer.cs
- SettingsPropertyNotFoundException.cs
- TabControl.cs
- FactoryGenerator.cs
- SourceCollection.cs
- ProcessModuleDesigner.cs
- ProcessDesigner.cs
- HttpSessionStateBase.cs
- SignedXml.cs
- IndicFontClient.cs
- XsltInput.cs
- ManagedIStream.cs
- EndpointIdentity.cs
- Setter.cs
- TimeoutValidationAttribute.cs
- EventLogReader.cs
- Socket.cs
- InkCollectionBehavior.cs
- MaskedTextBoxTextEditorDropDown.cs
- remotingproxy.cs
- NameValueCollection.cs
- Environment.cs
- CellIdBoolean.cs
- SiteMapSection.cs
- ConstraintEnumerator.cs
- _FixedSizeReader.cs
- LongTypeConverter.cs
- TypeInfo.cs
- SqlExpander.cs
- ExpandCollapsePatternIdentifiers.cs
- CqlLexer.cs
- UniqueEventHelper.cs
- HtmlToClrEventProxy.cs
- ToolboxItemCollection.cs
- ScaleTransform3D.cs
- ServiceOperationParameter.cs
- DataGridItemCollection.cs
- FastPropertyAccessor.cs
- Rfc2898DeriveBytes.cs
- ActivityTrace.cs
- EmbossBitmapEffect.cs
- _ScatterGatherBuffers.cs
- DeleteMemberBinder.cs
- HtmlInputReset.cs
- MulticastNotSupportedException.cs
- XhtmlCssHandler.cs
- Visual.cs
- RemoteWebConfigurationHostServer.cs
- Char.cs
- APCustomTypeDescriptor.cs
- WmpBitmapEncoder.cs
- AtomParser.cs
- ToolStripItemEventArgs.cs
- Registry.cs
- TreeWalkHelper.cs
- _DisconnectOverlappedAsyncResult.cs
- EndpointDiscoveryBehavior.cs
- FontSource.cs
- QilScopedVisitor.cs
- NameValueSectionHandler.cs
- CachedFontFamily.cs
- SrgsGrammarCompiler.cs
- UInt16Converter.cs
- CompModSwitches.cs
- SqlFileStream.cs
- MiniParameterInfo.cs
- ToolboxDataAttribute.cs
- ErrorsHelper.cs
- CatalogPartCollection.cs