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
- OptionUsage.cs
- EntityClientCacheEntry.cs
- TextStore.cs
- EdmConstants.cs
- SafeFindHandle.cs
- EraserBehavior.cs
- TdsParser.cs
- DiscoveryClientRequestChannel.cs
- XmlSchemaSimpleContentRestriction.cs
- TypeUnloadedException.cs
- FormCollection.cs
- DataBindingList.cs
- Add.cs
- recordstate.cs
- __FastResourceComparer.cs
- CategoryGridEntry.cs
- HintTextMaxWidthConverter.cs
- DataSourceCacheDurationConverter.cs
- UIElementParagraph.cs
- OleDbParameter.cs
- DataRowExtensions.cs
- DataKeyArray.cs
- XmlDocumentFragment.cs
- SchemaCompiler.cs
- EventSchemaTraceListener.cs
- Crypto.cs
- CodeTypeDeclarationCollection.cs
- CheckBoxBaseAdapter.cs
- FolderLevelBuildProvider.cs
- IpcManager.cs
- Misc.cs
- ChainOfDependencies.cs
- XmlSerializerFaultFormatter.cs
- RubberbandSelector.cs
- ConfigXmlText.cs
- Base64Encoding.cs
- AdornerPresentationContext.cs
- LineServices.cs
- WebControl.cs
- MessageDescriptionCollection.cs
- EdmSchemaError.cs
- Helper.cs
- IdentityNotMappedException.cs
- HostingPreferredMapPath.cs
- StrokeIntersection.cs
- EnumerableValidator.cs
- DockingAttribute.cs
- FunctionMappingTranslator.cs
- CharacterMetricsDictionary.cs
- BaseAsyncResult.cs
- CopyNodeSetAction.cs
- Container.cs
- PersonalizationStateQuery.cs
- GPPOINT.cs
- NotCondition.cs
- TimeSpanStorage.cs
- DrawingAttributes.cs
- IdentifierCreationService.cs
- ReliableRequestSessionChannel.cs
- Rijndael.cs
- GlobalizationAssembly.cs
- HwndSource.cs
- Transform.cs
- HttpWriter.cs
- TransportManager.cs
- OrCondition.cs
- glyphs.cs
- ClockGroup.cs
- MultiView.cs
- PieceDirectory.cs
- FileCodeGroup.cs
- MissingFieldException.cs
- PropertyChangingEventArgs.cs
- DispatcherHookEventArgs.cs
- StorageMappingItemCollection.cs
- GestureRecognizer.cs
- Handle.cs
- TextParagraph.cs
- DelimitedListTraceListener.cs
- ComplexPropertyEntry.cs
- WriteTimeStream.cs
- Header.cs
- DocumentEventArgs.cs
- RepeatEnumerable.cs
- FormParameter.cs
- ArrangedElementCollection.cs
- DelegateTypeInfo.cs
- LongValidatorAttribute.cs
- TemplatePropertyEntry.cs
- Gdiplus.cs
- HttpRequestWrapper.cs
- DataGridViewSortCompareEventArgs.cs
- EnumerableRowCollectionExtensions.cs
- followingsibling.cs
- PropVariant.cs
- SqlServer2KCompatibilityCheck.cs
- Int32RectValueSerializer.cs
- CqlErrorHelper.cs
- SystemSounds.cs
- DateTime.cs