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
- ReaderContextStackData.cs
- ManagedWndProcTracker.cs
- Point.cs
- VariableDesigner.xaml.cs
- KeysConverter.cs
- Identifier.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- TextRunCache.cs
- SectionVisual.cs
- CommandLibraryHelper.cs
- CryptoApi.cs
- SmiSettersStream.cs
- WindowsScroll.cs
- AssertFilter.cs
- RequestCache.cs
- RtfToXamlLexer.cs
- Events.cs
- WebConfigurationFileMap.cs
- querybuilder.cs
- HtmlControl.cs
- XmlSchemaRedefine.cs
- JumpItem.cs
- DeferredBinaryDeserializerExtension.cs
- FilterException.cs
- RemoteWebConfigurationHost.cs
- PaintValueEventArgs.cs
- XmlWellformedWriter.cs
- LoadedOrUnloadedOperation.cs
- DataRowChangeEvent.cs
- TableChangeProcessor.cs
- SafeCoTaskMem.cs
- HandleValueEditor.cs
- TCEAdapterGenerator.cs
- MarkupWriter.cs
- TextParaClient.cs
- SqlXml.cs
- AnonymousIdentificationModule.cs
- TransferRequestHandler.cs
- DesignSurfaceEvent.cs
- loginstatus.cs
- PassportAuthenticationEventArgs.cs
- XmlDataSource.cs
- SqlAliaser.cs
- SwitchAttribute.cs
- OletxVolatileEnlistment.cs
- SoapObjectReader.cs
- ExpressionEvaluator.cs
- CollectionContainer.cs
- NumberEdit.cs
- DocumentViewerBase.cs
- WorkflowDefinitionDispenser.cs
- NonBatchDirectoryCompiler.cs
- COM2PictureConverter.cs
- CodeDomExtensionMethods.cs
- FieldNameLookup.cs
- DataSourceControlBuilder.cs
- PointLight.cs
- MulticastNotSupportedException.cs
- ActivityExecutionWorkItem.cs
- GeneralTransform3DTo2DTo3D.cs
- LassoHelper.cs
- ResourceSet.cs
- RoutedEvent.cs
- SlotInfo.cs
- DictionaryContent.cs
- DiscreteKeyFrames.cs
- OracleParameterBinding.cs
- XmlElementCollection.cs
- FieldMetadata.cs
- WebBrowserEvent.cs
- JsonDeserializer.cs
- Pkcs7Recipient.cs
- ToolZoneDesigner.cs
- DataListCommandEventArgs.cs
- NamespaceListProperty.cs
- DesignConnectionCollection.cs
- Cell.cs
- LayoutEvent.cs
- SqlConnectionManager.cs
- XmlWhitespace.cs
- MapPathBasedVirtualPathProvider.cs
- TileModeValidation.cs
- SiteMapNode.cs
- ItemContainerProviderWrapper.cs
- SamlDelegatingWriter.cs
- WebPartExportVerb.cs
- JobDuplex.cs
- WebMessageFormatHelper.cs
- SubMenuStyle.cs
- DocumentViewerConstants.cs
- PictureBox.cs
- Opcode.cs
- BindingSource.cs
- EncoderExceptionFallback.cs
- NameValueConfigurationCollection.cs
- ProvideValueServiceProvider.cs
- GeneralTransform3DGroup.cs
- BufferManager.cs
- AsyncPostBackTrigger.cs
- DesigntimeLicenseContextSerializer.cs