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
- RoleManagerModule.cs
- DataGridTablesFactory.cs
- AnimationLayer.cs
- _HeaderInfoTable.cs
- StylusPointProperties.cs
- TileBrush.cs
- WebPartMenu.cs
- SaveRecipientRequest.cs
- ZoneLinkButton.cs
- JsonDeserializer.cs
- WebResourceAttribute.cs
- InkPresenterAutomationPeer.cs
- PartitionedDataSource.cs
- ErrorHandler.cs
- InfoCardCryptoHelper.cs
- LinearQuaternionKeyFrame.cs
- IntegerValidator.cs
- WindowsIdentity.cs
- FilterException.cs
- FlowDocumentFormatter.cs
- TableLayoutStyle.cs
- InstanceKeyView.cs
- FixedPageProcessor.cs
- ModulesEntry.cs
- GridViewDeleteEventArgs.cs
- SoapSchemaExporter.cs
- StateBag.cs
- RowSpanVector.cs
- TextBoxView.cs
- DocumentPage.cs
- PageStatePersister.cs
- CommandBindingCollection.cs
- DataRow.cs
- mactripleDES.cs
- TimeIntervalCollection.cs
- Label.cs
- SourceFilter.cs
- OdbcConnectionPoolProviderInfo.cs
- Cursor.cs
- TraceHandlerErrorFormatter.cs
- GridItemProviderWrapper.cs
- BindValidator.cs
- ComponentEditorPage.cs
- BoolExpressionVisitors.cs
- EntityDataSourceViewSchema.cs
- Point3DAnimation.cs
- NetworkInformationPermission.cs
- ShutDownListener.cs
- SqlNodeTypeOperators.cs
- ToolStripOverflowButton.cs
- EventData.cs
- MimeTypeMapper.cs
- __Filters.cs
- ProfileSettings.cs
- DataObjectEventArgs.cs
- LogicalCallContext.cs
- DelegatingTypeDescriptionProvider.cs
- ErrorWebPart.cs
- WeakReferenceEnumerator.cs
- WinEventHandler.cs
- AuthenticationSection.cs
- WebConfigurationManager.cs
- ClientRoleProvider.cs
- XMLSyntaxException.cs
- CodeObject.cs
- DataSourceSelectArguments.cs
- ExpandSegment.cs
- MsmqTransportElement.cs
- WbemProvider.cs
- SortedDictionary.cs
- DesignOnlyAttribute.cs
- XmlElement.cs
- AutoGeneratedField.cs
- ExpandSegmentCollection.cs
- ComponentSerializationService.cs
- DynamicResourceExtension.cs
- TreeNodeBindingCollection.cs
- LogSwitch.cs
- XmlSchemaAnnotated.cs
- SqlTopReducer.cs
- StreamSecurityUpgradeInitiatorAsyncResult.cs
- GridErrorDlg.cs
- TypeUtil.cs
- NamespaceEmitter.cs
- XmlParserContext.cs
- SqlInternalConnectionTds.cs
- DBSchemaRow.cs
- DocumentPaginator.cs
- PackagePart.cs
- COM2PropertyPageUITypeConverter.cs
- ProviderConnectionPoint.cs
- TreeChangeInfo.cs
- SqlDataSourceEnumerator.cs
- XmlSchemaAttributeGroup.cs
- Triplet.cs
- RSAPKCS1SignatureDeformatter.cs
- StringStorage.cs
- TemplatePropertyEntry.cs
- LinqDataSourceDisposeEventArgs.cs
- Matrix.cs