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
- XamlHostingSectionGroup.cs
- MimeWriter.cs
- FunctionDetailsReader.cs
- XpsSerializerFactory.cs
- listitem.cs
- TagMapCollection.cs
- GACMembershipCondition.cs
- TextParaClient.cs
- OracleDataAdapter.cs
- ConnectionManagementSection.cs
- ReflectionServiceProvider.cs
- SapiAttributeParser.cs
- TextServicesCompartmentEventSink.cs
- PasswordValidationException.cs
- CompleteWizardStep.cs
- SspiHelper.cs
- MouseWheelEventArgs.cs
- HotSpotCollection.cs
- TransformedBitmap.cs
- WebBrowserBase.cs
- SoapConverter.cs
- IndexedDataBuffer.cs
- BuildProvider.cs
- HttpException.cs
- StrokeNodeOperations2.cs
- HMACRIPEMD160.cs
- OdbcUtils.cs
- InkCollectionBehavior.cs
- GifBitmapEncoder.cs
- TextTreeInsertUndoUnit.cs
- TextEncodedRawTextWriter.cs
- ProxyWebPartManager.cs
- BinaryNode.cs
- UnicodeEncoding.cs
- ChildChangedEventArgs.cs
- ConfigXmlComment.cs
- ClaimComparer.cs
- ListViewItem.cs
- SliderAutomationPeer.cs
- TransformerInfo.cs
- TableLayoutPanel.cs
- WebDisplayNameAttribute.cs
- PassportAuthentication.cs
- ReflectionPermission.cs
- ToolStripProgressBar.cs
- EventDrivenDesigner.cs
- DocumentViewer.cs
- MessageContractImporter.cs
- CryptoProvider.cs
- MeasurementDCInfo.cs
- FlowPanelDesigner.cs
- brushes.cs
- RepeaterDesigner.cs
- OnOperation.cs
- SystemFonts.cs
- PickBranch.cs
- KoreanLunisolarCalendar.cs
- ImageFormat.cs
- FirewallWrapper.cs
- Exception.cs
- BaseTemplateParser.cs
- X509SecurityTokenProvider.cs
- HttpPostedFile.cs
- StreamGeometry.cs
- NetCodeGroup.cs
- GeometryCollection.cs
- FixedDocumentPaginator.cs
- ChtmlPhoneCallAdapter.cs
- MultipartContentParser.cs
- TextSearch.cs
- CompositeDispatchFormatter.cs
- TraceSection.cs
- ExeContext.cs
- TypographyProperties.cs
- SyndicationItem.cs
- Barrier.cs
- HierarchicalDataTemplate.cs
- AmbiguousMatchException.cs
- SqlDataAdapter.cs
- ListBoxDesigner.cs
- CodeAccessSecurityEngine.cs
- ArgumentNullException.cs
- DependencyPropertyValueSerializer.cs
- DataGridViewCellStyle.cs
- QilIterator.cs
- FilteredXmlReader.cs
- ValidatedControlConverter.cs
- SubMenuStyleCollection.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- InputProcessorProfiles.cs
- DataControlImageButton.cs
- ComponentEditorPage.cs
- serverconfig.cs
- SiteMapNode.cs
- CustomCategoryAttribute.cs
- TdsParser.cs
- ContentPlaceHolder.cs
- TranslateTransform3D.cs
- HierarchicalDataTemplate.cs
- PipelineComponent.cs