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
- Fx.cs
- RichTextBoxAutomationPeer.cs
- _DigestClient.cs
- QueryReaderSettings.cs
- DefaultValueAttribute.cs
- Viewport2DVisual3D.cs
- Separator.cs
- DataServiceHost.cs
- CompiledELinqQueryState.cs
- DataTemplateSelector.cs
- MatrixAnimationUsingKeyFrames.cs
- RequestUriProcessor.cs
- AxisAngleRotation3D.cs
- IndexOutOfRangeException.cs
- CompositeKey.cs
- TcpTransportElement.cs
- BatchStream.cs
- SchemaTableColumn.cs
- XmlSchemaChoice.cs
- Content.cs
- ComponentChangedEvent.cs
- LinqDataSourceSelectEventArgs.cs
- Run.cs
- TypeForwardedToAttribute.cs
- BinaryFormatterWriter.cs
- MILUtilities.cs
- ArgumentNullException.cs
- ButtonColumn.cs
- OAVariantLib.cs
- RemotingConfiguration.cs
- ToolTipAutomationPeer.cs
- Ipv6Element.cs
- XmlNodeReader.cs
- StringConcat.cs
- PopupControlService.cs
- PathSegment.cs
- CodeDirectoryCompiler.cs
- StateManager.cs
- SchemaHelper.cs
- DataFormats.cs
- EditorZoneBase.cs
- AstNode.cs
- XmlBufferReader.cs
- SamlNameIdentifierClaimResource.cs
- ObsoleteAttribute.cs
- FacetChecker.cs
- TextUtf8RawTextWriter.cs
- RegexCharClass.cs
- MultilineStringConverter.cs
- ApplicationId.cs
- SignHashRequest.cs
- DesigntimeLicenseContextSerializer.cs
- SharedPersonalizationStateInfo.cs
- ValueProviderWrapper.cs
- ItemList.cs
- PageParserFilter.cs
- HtmlSelect.cs
- MailWebEventProvider.cs
- NativeMethods.cs
- ComponentDispatcher.cs
- SqlCacheDependency.cs
- SqlNotificationEventArgs.cs
- EventToken.cs
- StreamingContext.cs
- CultureInfoConverter.cs
- XmlHierarchicalEnumerable.cs
- HtmlInputButton.cs
- SinglePhaseEnlistment.cs
- UnicastIPAddressInformationCollection.cs
- ZipIOExtraFieldPaddingElement.cs
- DeleteHelper.cs
- Configuration.cs
- EncodingInfo.cs
- PartitionedStreamMerger.cs
- SqlUdtInfo.cs
- ThemeDirectoryCompiler.cs
- AvTraceFormat.cs
- objectresult_tresulttype.cs
- CodeTypeConstructor.cs
- WindowsAuthenticationModule.cs
- Point3DAnimationBase.cs
- UnaryOperationBinder.cs
- FileNotFoundException.cs
- ActiveXHost.cs
- ScriptManagerProxy.cs
- ControlDesignerState.cs
- ProtocolViolationException.cs
- MethodCallConverter.cs
- XamlTypeMapper.cs
- TreeNodeStyle.cs
- SocketInformation.cs
- CircleHotSpot.cs
- SourceFileBuildProvider.cs
- Rect3DConverter.cs
- XsltLoader.cs
- HopperCache.cs
- Attributes.cs
- NumericUpDownAccelerationCollection.cs
- View.cs
- ObjectCloneHelper.cs