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
- BitmapEffectInputData.cs
- Stackframe.cs
- ProcessModule.cs
- TextTreeUndo.cs
- XmlSchemaSubstitutionGroup.cs
- precedingsibling.cs
- PlaceHolder.cs
- Encoder.cs
- BamlLocalizableResource.cs
- BaseDataBoundControl.cs
- AccessViolationException.cs
- CustomPopupPlacement.cs
- ChannelParameterCollection.cs
- InvokeProviderWrapper.cs
- WebPartConnectionsConnectVerb.cs
- DBSchemaRow.cs
- OleDbFactory.cs
- ItemsControlAutomationPeer.cs
- FixedStringLookup.cs
- FontFamilyIdentifier.cs
- MultiPageTextView.cs
- CodeDomComponentSerializationService.cs
- DataGridViewRowEventArgs.cs
- Ray3DHitTestResult.cs
- ListSurrogate.cs
- ManipulationPivot.cs
- TableRow.cs
- ExtensionWindowResizeGrip.cs
- UnaryExpression.cs
- GridViewRowPresenter.cs
- EndpointDiscoveryMetadata.cs
- CheckedPointers.cs
- EnumMemberAttribute.cs
- AppSettingsReader.cs
- Rotation3DAnimation.cs
- PerformanceCounterPermission.cs
- TextFormatterContext.cs
- SmiConnection.cs
- SmuggledIUnknown.cs
- _WebProxyDataBuilder.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- CacheOutputQuery.cs
- Pair.cs
- ProviderConnectionPointCollection.cs
- SignalGate.cs
- AsymmetricKeyExchangeFormatter.cs
- TextRangeProviderWrapper.cs
- MouseOverProperty.cs
- BufferedWebEventProvider.cs
- XmlReaderDelegator.cs
- WaitForChangedResult.cs
- HtmlHistory.cs
- SyndicationCategory.cs
- HtmlTable.cs
- Expressions.cs
- OletxDependentTransaction.cs
- ProcessThreadDesigner.cs
- MethodToken.cs
- AudioDeviceOut.cs
- ToolBar.cs
- RedirectionProxy.cs
- TreeNodeCollectionEditorDialog.cs
- HtmlTernaryTree.cs
- DataGridViewCellConverter.cs
- DbProviderFactories.cs
- HttpRequestCacheValidator.cs
- RuleSettings.cs
- ComponentGuaranteesAttribute.cs
- DataMisalignedException.cs
- Stack.cs
- Logging.cs
- InvalidCommandTreeException.cs
- DbInsertCommandTree.cs
- HtmlTextBoxAdapter.cs
- HighlightComponent.cs
- HostedHttpTransportManager.cs
- CaseInsensitiveOrdinalStringComparer.cs
- ListViewItem.cs
- Group.cs
- DataFieldConverter.cs
- LinqDataSourceView.cs
- ModuleBuilder.cs
- RepeatBehavior.cs
- PropertyValueEditor.cs
- SortedDictionary.cs
- DataSourceXmlSerializer.cs
- RuntimeIdentifierPropertyAttribute.cs
- BitmapVisualManager.cs
- Win32.cs
- BaseTreeIterator.cs
- MetadataCache.cs
- pingexception.cs
- CreateWorkflowOwnerCommand.cs
- XPathSelectionIterator.cs
- LinearGradientBrush.cs
- SoapObjectReader.cs
- CardSpacePolicyElement.cs
- CodeFieldReferenceExpression.cs
- RegexRunner.cs
- AdPostCacheSubstitution.cs