Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / GetRecipientListRequest.cs / 1 / GetRecipientListRequest.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards { using System; using System.IO; 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 GetRecipientListRequest : UIAgentRequest { IListm_recipientList; // // Summary // Create a new request to return the list of recipients // public GetRecipientListRequest( IntPtr rpcHandle, Stream inArgs, Stream outArgs, ClientUIRequest parent ) : base( rpcHandle, inArgs, outArgs, parent ) { } protected override void OnMarshalInArgs() { } // // Summary // Retrive the recipient list // protected override void OnProcess() { StoreConnection connection = StoreConnection.GetConnection(); try { // // Retrieve the recipient objects from the store // IList rows = ( IList )connection.Query( QueryDetails.FullRow, new QueryParameter( SecondaryIndexDefinition.ObjectTypeIndex, ( Int32 )StorableObjectType.Recipient ) ); if( null != rows ) { IList recipientList = new List ( rows.Count ); foreach( DataRow row in rows ) { recipientList.Add( new Recipient( new MemoryStream( row.GetDataField() ) ) ); } m_recipientList = recipientList; } } finally { connection.Close(); } } // // Summary // Serialize the output in the following order // Count of objects // Recipient objects // // protected override void OnMarshalOutArgs() { BinaryWriter writer = new BinaryWriter( OutArgs, System.Text.Encoding.Unicode ); UInt32 count = 0; IDT.TraceDebug( "Serialize the recipient List" ); if( null != m_recipientList ) { count = ( UInt32 )m_recipientList.Count; writer.Write( count ); foreach( Recipient rec in m_recipientList ) { rec.Serialize( writer ); } } else { writer.Write( count ); } } } } // 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
- SqlNodeAnnotations.cs
- NativeMethods.cs
- FrameworkEventSource.cs
- UnsafeNativeMethods.cs
- SystemWebSectionGroup.cs
- TextRangeAdaptor.cs
- ISAPIApplicationHost.cs
- HttpCookiesSection.cs
- LoginUtil.cs
- CodeAttachEventStatement.cs
- UrlParameterWriter.cs
- StdValidatorsAndConverters.cs
- ContextCorrelationInitializer.cs
- NonClientArea.cs
- WmfPlaceableFileHeader.cs
- BindingSource.cs
- SchemaTableOptionalColumn.cs
- DataGridPageChangedEventArgs.cs
- FirewallWrapper.cs
- EncryptedType.cs
- SystemInfo.cs
- WindowsGraphicsCacheManager.cs
- WmfPlaceableFileHeader.cs
- BuilderPropertyEntry.cs
- PageThemeBuildProvider.cs
- DbConnectionPoolIdentity.cs
- SubMenuStyle.cs
- RoutingSection.cs
- EntityContainer.cs
- TypeResolver.cs
- Marshal.cs
- DirectoryNotFoundException.cs
- UIElementParagraph.cs
- ResourceContainerWrapper.cs
- CompilerGeneratedAttribute.cs
- SocketConnection.cs
- KnownBoxes.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- WorkItem.cs
- PerformanceCounter.cs
- EndPoint.cs
- SyndicationPerson.cs
- CodeGeneratorOptions.cs
- ControlUtil.cs
- Random.cs
- DefaultBinder.cs
- MessageEventSubscriptionService.cs
- ActivityPreviewDesigner.cs
- HttpHandlerActionCollection.cs
- PropertySet.cs
- MobileControl.cs
- Internal.cs
- ValidationHelper.cs
- System.Data_BID.cs
- InstanceNotReadyException.cs
- AppDomain.cs
- RoleManagerEventArgs.cs
- SelectiveScrollingGrid.cs
- Types.cs
- parserscommon.cs
- AudioLevelUpdatedEventArgs.cs
- mongolianshape.cs
- BuildProviderAppliesToAttribute.cs
- Formatter.cs
- DataContractSerializerSection.cs
- ConfigUtil.cs
- AspCompat.cs
- DesignerUtility.cs
- XpsS0ValidatingLoader.cs
- WinFormsSpinner.cs
- GenericTextProperties.cs
- Image.cs
- FocusManager.cs
- DataGridViewTextBoxEditingControl.cs
- SafeRightsManagementQueryHandle.cs
- WebBrowsableAttribute.cs
- FlowDocumentPageViewerAutomationPeer.cs
- ExpressionBuilderCollection.cs
- VectorCollectionConverter.cs
- UnicastIPAddressInformationCollection.cs
- SecurityUtils.cs
- ListItemCollection.cs
- ListViewDeletedEventArgs.cs
- HttpResponseInternalBase.cs
- ShutDownListener.cs
- Base64Decoder.cs
- QilUnary.cs
- ServicePointManagerElement.cs
- ASCIIEncoding.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- TableTextElementCollectionInternal.cs
- SqlXmlStorage.cs
- EtwTrace.cs
- OdbcError.cs
- ControllableStoryboardAction.cs
- AutomationPropertyInfo.cs
- ViewBase.cs
- CalendarDay.cs
- XmlSchemaException.cs
- StringValidatorAttribute.cs