Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / GetLedgerRequest.cs / 1 / GetLedgerRequest.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards { using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Text; using IDT = Microsoft.InfoCards.Diagnostics.InfoCardTrace; // // This class handles a UI request to retrieve all the ledger enteries for a card // class GetLedgerRequest :UIAgentRequest { Uri m_cardId; LedgerEntryCollection m_ledger; // // Summary // Creates a GetLedgerRequest object. // public GetLedgerRequest( IntPtr rpcHandle, Stream inArgs, Stream outArgs, ClientUIRequest parent ) : base( rpcHandle, inArgs, outArgs, parent ) { IDT.Assert ( IntPtr.Zero != rpcHandle, "Null rpc handle" ); IDT.Assert ( null != inArgs, "Null inArgs" ); IDT.Assert ( null != outArgs, "Null out args" ); IDT.TraceDebug ( "Processing a edger retrival request" ); } protected override void OnInitializeAsSystem() { base.OnInitializeAsSystem(); } // // Summary // Read the card ID from in input stream. // // Remarks // Expected sequence of data // string - Id of the infocard // protected override void OnMarshalInArgs() { IDT.Assert ( null != InArgs, "null request argument" ); BinaryReader reader = new InfoCardBinaryReader( InArgs, Encoding.Unicode ); m_cardId = Utility.DeserializeUri( reader ); } // // Collect the ledger entries from the store. // protected override void OnProcess() { IDT.Assert( null != m_cardId, "No CardId passed to GetLedgerRequest" ); StoreConnection connection = StoreConnection.GetConnection(); try { // // Retrieve ledger entries from the database // m_ledger = new LedgerEntryCollection( m_cardId ); m_ledger.Get( connection ); } finally { connection.Close(); } } // // Summary // Write the ledger entries to the out stream. // // Remarks // Sequence of serialization // ledgercollection // protected override void OnMarshalOutArgs() { IDT.Assert ( null != m_ledger, "No ledger collection exists to be serialized" ); m_ledger.Serialize( OutArgs ); } } } // 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
- SafeFileHandle.cs
- DataGridCell.cs
- HandledMouseEvent.cs
- CodeDirectoryCompiler.cs
- CallContext.cs
- ErrorItem.cs
- TTSEvent.cs
- BaseCollection.cs
- CodeSnippetTypeMember.cs
- DisposableCollectionWrapper.cs
- CompositeScriptReferenceEventArgs.cs
- HMACMD5.cs
- TagElement.cs
- Size3DConverter.cs
- FormViewUpdateEventArgs.cs
- EdmProperty.cs
- SignatureToken.cs
- __Filters.cs
- StateDesigner.CommentLayoutGlyph.cs
- ByteStorage.cs
- XamlClipboardData.cs
- ComponentResourceKey.cs
- TemplatedWizardStep.cs
- WrapperEqualityComparer.cs
- OracleConnectionString.cs
- PackageDigitalSignature.cs
- MsmqHostedTransportConfiguration.cs
- UserPersonalizationStateInfo.cs
- TextRunTypographyProperties.cs
- StreamingContext.cs
- SetterBase.cs
- OdbcRowUpdatingEvent.cs
- SymbolEqualComparer.cs
- SolidColorBrush.cs
- SoapHeaderAttribute.cs
- SynchronizationLockException.cs
- filewebrequest.cs
- ScriptIgnoreAttribute.cs
- GridViewColumnHeader.cs
- Message.cs
- ErrorWrapper.cs
- BaseTreeIterator.cs
- WebCategoryAttribute.cs
- CategoryEditor.cs
- DataBindingExpressionBuilder.cs
- EntityClassGenerator.cs
- UIElement.cs
- ISAPIWorkerRequest.cs
- DataGridViewCellLinkedList.cs
- VectorKeyFrameCollection.cs
- IdnMapping.cs
- ExpressionBuilderContext.cs
- AddInToken.cs
- ColumnMap.cs
- SlotInfo.cs
- TypeBuilder.cs
- TriggerCollection.cs
- StateBag.cs
- XmlDataCollection.cs
- RichTextBoxAutomationPeer.cs
- AttributeCollection.cs
- IntegerFacetDescriptionElement.cs
- HuffModule.cs
- Ops.cs
- LayoutEvent.cs
- InputLangChangeEvent.cs
- HMAC.cs
- WorkflowShape.cs
- GenericTypeParameterBuilder.cs
- FieldAccessException.cs
- DllNotFoundException.cs
- Page.cs
- SecuritySessionFilter.cs
- Int64Storage.cs
- RectConverter.cs
- CollectionViewGroupInternal.cs
- PeerCredential.cs
- BitmapEffectrendercontext.cs
- TypeDescriptor.cs
- ProfileService.cs
- ADRole.cs
- NTAccount.cs
- DetailsViewPageEventArgs.cs
- GetTokenRequest.cs
- COM2IProvidePropertyBuilderHandler.cs
- XmlDataSourceNodeDescriptor.cs
- ImageField.cs
- EnumerableCollectionView.cs
- CancellationState.cs
- ForEachAction.cs
- SaveWorkflowAsyncResult.cs
- ItemMap.cs
- DrawingGroup.cs
- PrinterUnitConvert.cs
- LinkConverter.cs
- CLRBindingWorker.cs
- InlineUIContainer.cs
- Accessible.cs
- PathFigure.cs
- CategoryValueConverter.cs