Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / SetUserPreferenceRequest.cs / 1 / SetUserPreferenceRequest.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards { using System; using System.Collections; using System.IO; using Microsoft.InfoCards.Diagnostics; using IDT = Microsoft.InfoCards.Diagnostics.InfoCardTrace; // // Summary: // This class handles the request from the UI Agent to set the user preferences // object into the store. // class SetUserPreferenceRequest : UIAgentRequest { UserPreference m_userPreferences; // // Summary: // Constructs a new SetUserPreferenceRequest instance. // // Parameters: // rpcHandle - Handle to the RPC call from the UI Agent // inArgs - Stream for the incoming information. Null in this case. // outArgs - Stream used to collect the outbound data. // connection - Store connection available to this request. // public SetUserPreferenceRequest( IntPtr rpcHandle, Stream inArgs, Stream outArgs, ClientUIRequest parent ) : base( rpcHandle, inArgs, outArgs, parent ) { } // // Summary // Event for marshalling the request information // protected override void OnMarshalInArgs() { IDT.Assert( InArgs.Length > 0, "The user preferences must be specified" ); m_userPreferences = new UserPreference( InArgs ); } // // Summary // Event for processing the user request // protected override void OnProcess() { IDT.Assert( null != m_userPreferences, "OnMarshalInArgs must be called prior to calling OnProcess" ); StoreConnection connection = StoreConnection.GetConnection(); try { connection.BeginTransaction(); try { m_userPreferences.Save( connection ); connection.CommitTransaction(); } catch { connection.RollbackTransaction(); throw; } } finally { connection.Close(); } } // // Summary // Event for marshalling the response information // // Remarks // Not used // 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
- EntityTransaction.cs
- HiddenField.cs
- Misc.cs
- BlurBitmapEffect.cs
- StringDictionary.cs
- UniqueIdentifierService.cs
- ProcessManager.cs
- HostProtectionException.cs
- HostingEnvironmentWrapper.cs
- QueryInterceptorAttribute.cs
- RtfFormatStack.cs
- ADMembershipProvider.cs
- RectangleF.cs
- ComponentCache.cs
- MembershipValidatePasswordEventArgs.cs
- SqlDataReaderSmi.cs
- WebPart.cs
- XmlMemberMapping.cs
- XPathEmptyIterator.cs
- CodeDOMProvider.cs
- XNameTypeConverter.cs
- AddInActivator.cs
- SamlAuthenticationClaimResource.cs
- XmlReader.cs
- WeakEventTable.cs
- UIElement3DAutomationPeer.cs
- ModuleBuilder.cs
- ElementHostAutomationPeer.cs
- DisplayInformation.cs
- Win32Native.cs
- SoundPlayer.cs
- UITypeEditors.cs
- ErrorTolerantObjectWriter.cs
- RelationshipEndCollection.cs
- EmbeddedMailObjectsCollection.cs
- SyndicationPerson.cs
- ChannelSinkStacks.cs
- WindowsListViewGroupHelper.cs
- SafeTokenHandle.cs
- AsyncCompletedEventArgs.cs
- PrintingPermission.cs
- UrlParameterWriter.cs
- GPRECT.cs
- BlockCollection.cs
- ManagementExtension.cs
- ConfigurationSectionGroup.cs
- XamlPointCollectionSerializer.cs
- ChangePassword.cs
- UrlMapping.cs
- _AuthenticationState.cs
- GiveFeedbackEvent.cs
- ImageFormat.cs
- Camera.cs
- ProjectionCamera.cs
- SecurityTimestamp.cs
- OverflowException.cs
- HtmlInputPassword.cs
- XmlSchemaFacet.cs
- DiscreteKeyFrames.cs
- DropTarget.cs
- XamlReaderHelper.cs
- ToolboxItemSnapLineBehavior.cs
- ExpressionVisitorHelpers.cs
- ToolboxItemFilterAttribute.cs
- MdImport.cs
- LinqDataSourceContextEventArgs.cs
- XmlnsPrefixAttribute.cs
- ScriptingSectionGroup.cs
- Visual3D.cs
- IPipelineRuntime.cs
- XslAst.cs
- DynamicDataResources.Designer.cs
- NativeMethods.cs
- WsatServiceCertificate.cs
- Sentence.cs
- HttpModuleActionCollection.cs
- HtmlInputFile.cs
- TagPrefixCollection.cs
- URI.cs
- VisualBasicDesignerHelper.cs
- FolderBrowserDialog.cs
- SynchronizationContext.cs
- ToolbarAUtomationPeer.cs
- Logging.cs
- ChangePasswordDesigner.cs
- StrokeNodeEnumerator.cs
- ValidationSummary.cs
- LinearKeyFrames.cs
- Attributes.cs
- HighContrastHelper.cs
- SelectionEditor.cs
- UnknownBitmapDecoder.cs
- CustomPopupPlacement.cs
- SiblingIterators.cs
- BookmarkInfo.cs
- ScaleTransform3D.cs
- Point3D.cs
- DataGridCommandEventArgs.cs
- ForceCopyBuildProvider.cs
- FormatException.cs