Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / SaveRecipientRequest.cs / 1 / SaveRecipientRequest.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards { using System; using System.IO; using IDT = Microsoft.InfoCards.Diagnostics.InfoCardTrace; // // Summary // This class handles requests from the UI which need to save the updated recipient information // class SaveRecipientRequest : UIAgentRequest { Recipient m_recipient; // recipient to be saved to the store public SaveRecipientRequest( 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 outArgs" ); IDT.TraceDebug( "Intiating a request to save the updated recipient object" ); } protected override void OnInitializeAsSystem() { base.OnInitializeAsSystem(); } // // Summary // Deserialize the incoming arguments. // // Remarks // The expected order of data is // Recipient // protected override void OnMarshalInArgs() { IDT.Assert( null != InArgs, "Null inArgs" ); m_recipient = new Recipient( InArgs ); } // // Summary // Persist the recipient to the store. // protected override void OnProcess() { StoreConnection connection = StoreConnection.GetConnection(); try { IDT.Assert( null != m_recipient, " Null Recipient" ); connection.BeginTransaction(); try { m_recipient.Save( connection ); connection.CommitTransaction(); } catch { connection.RollbackTransaction(); throw; } } finally { connection.Close(); } } protected override void OnMarshalOutArgs() { } } } // 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
- ValidationErrorEventArgs.cs
- Shape.cs
- COM2IProvidePropertyBuilderHandler.cs
- sqlcontext.cs
- SynchronizationLockException.cs
- EncodingDataItem.cs
- ImportOptions.cs
- BlockCollection.cs
- TimeoutStream.cs
- PowerStatus.cs
- WebBrowser.cs
- CodeArrayCreateExpression.cs
- WrapperSecurityCommunicationObject.cs
- _KerberosClient.cs
- ObjectDataProvider.cs
- PageSettings.cs
- XPathDocumentIterator.cs
- QuaternionKeyFrameCollection.cs
- ACE.cs
- TextBoxLine.cs
- CounterSampleCalculator.cs
- UpdateCommand.cs
- CustomAttributeFormatException.cs
- Environment.cs
- AmbiguousMatchException.cs
- PaperSource.cs
- BufferedMessageData.cs
- GregorianCalendar.cs
- SqlDataRecord.cs
- File.cs
- SHA384.cs
- CollectionViewSource.cs
- DateTimeOffset.cs
- TableProviderWrapper.cs
- TypeExtensionConverter.cs
- ThousandthOfEmRealPoints.cs
- OleDbConnectionFactory.cs
- RedBlackList.cs
- Parser.cs
- NonClientArea.cs
- ResourceCodeDomSerializer.cs
- InputLanguageManager.cs
- ApplicationServiceHelper.cs
- GroupItemAutomationPeer.cs
- TextBlock.cs
- ProbeDuplexAsyncResult.cs
- MetabaseReader.cs
- Effect.cs
- XmlSchemaObjectTable.cs
- DisableDpiAwarenessAttribute.cs
- ConfigurationStrings.cs
- RunInstallerAttribute.cs
- BlockUIContainer.cs
- FixedSOMTableRow.cs
- DragDrop.cs
- CodeCatchClauseCollection.cs
- SqlCacheDependency.cs
- QilLiteral.cs
- ListViewTableRow.cs
- TaskForm.cs
- InlineCollection.cs
- TypeDescriptionProvider.cs
- DirectoryInfo.cs
- HttpCapabilitiesEvaluator.cs
- XNameTypeConverter.cs
- UrlAuthFailedErrorFormatter.cs
- EntityDataSourceWizardForm.cs
- HwndProxyElementProvider.cs
- PropertyMetadata.cs
- DataTable.cs
- cache.cs
- DataServiceProviderWrapper.cs
- Utilities.cs
- Point3D.cs
- XPathDocumentBuilder.cs
- CodeConditionStatement.cs
- FactoryId.cs
- SqlInternalConnection.cs
- UIElementAutomationPeer.cs
- VectorCollection.cs
- FixedBufferAttribute.cs
- MobileFormsAuthentication.cs
- BaseCAMarshaler.cs
- DataGridViewDataConnection.cs
- MLangCodePageEncoding.cs
- SimpleLine.cs
- OrderedDictionary.cs
- ContourSegment.cs
- ConnectionInterfaceCollection.cs
- TemplateControl.cs
- GroupDescription.cs
- SymmetricCryptoHandle.cs
- QilValidationVisitor.cs
- TypeConverterValueSerializer.cs
- ContentPlaceHolderDesigner.cs
- Int32EqualityComparer.cs
- RequestCachePolicy.cs
- ContentPlaceHolder.cs
- FragmentQueryKB.cs
- CqlParser.cs