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
- UnsafeNativeMethods.cs
- ListItemCollection.cs
- InvokeGenerator.cs
- TabControlEvent.cs
- CompModSwitches.cs
- RectAnimation.cs
- ItemContainerGenerator.cs
- SrgsGrammar.cs
- UrlMappingCollection.cs
- GraphicsContainer.cs
- SchemaTypeEmitter.cs
- NavigationCommands.cs
- TextInfo.cs
- HtmlElement.cs
- ResourcesGenerator.cs
- NavigationService.cs
- TranslateTransform3D.cs
- CodeTypeParameter.cs
- TemplateColumn.cs
- DecimalConverter.cs
- AssemblyAttributesGoHere.cs
- WindowsHyperlink.cs
- OrderedDictionary.cs
- BaseParaClient.cs
- UpdateEventArgs.cs
- LogStore.cs
- GatewayIPAddressInformationCollection.cs
- ScriptResourceAttribute.cs
- GlyphRunDrawing.cs
- SessionStateSection.cs
- TreeViewImageIndexConverter.cs
- TryCatch.cs
- IsolatedStorage.cs
- SortQuery.cs
- AppDomain.cs
- EditorZone.cs
- CommandDevice.cs
- DataObjectPastingEventArgs.cs
- BooleanExpr.cs
- ApplicationDirectoryMembershipCondition.cs
- StylusPointPropertyId.cs
- DataControlCommands.cs
- _BufferOffsetSize.cs
- AppearanceEditorPart.cs
- SchemaTableOptionalColumn.cs
- DataSetViewSchema.cs
- UIElement3D.cs
- TimelineClockCollection.cs
- InertiaExpansionBehavior.cs
- EntitySetBaseCollection.cs
- JobCollate.cs
- IndexOutOfRangeException.cs
- EntityDataSourceContextCreatingEventArgs.cs
- TextEditorLists.cs
- DynamicILGenerator.cs
- CodeAssignStatement.cs
- SqlWebEventProvider.cs
- SoapFormatterSinks.cs
- ListViewHitTestInfo.cs
- ConfigXmlAttribute.cs
- ProgramNode.cs
- CorrelationTokenInvalidatedHandler.cs
- SettingsBase.cs
- ValidationPropertyAttribute.cs
- SqlErrorCollection.cs
- SoundPlayer.cs
- ConfigPathUtility.cs
- XmlSchemas.cs
- DetailsViewModeEventArgs.cs
- XPathMessageContext.cs
- RowTypePropertyElement.cs
- NumberFunctions.cs
- ArrangedElement.cs
- CmsUtils.cs
- Point3DCollectionValueSerializer.cs
- WsatServiceAddress.cs
- ViewManager.cs
- HotSpot.cs
- SqlDataSourceEnumerator.cs
- AssemblyName.cs
- BlurEffect.cs
- _LocalDataStore.cs
- SmtpCommands.cs
- UnionCqlBlock.cs
- RoleManagerEventArgs.cs
- StrokeDescriptor.cs
- AssemblyCache.cs
- MultiByteCodec.cs
- HttpStreamFormatter.cs
- COAUTHINFO.cs
- XmlHelper.cs
- CoreSwitches.cs
- TypeConverterMarkupExtension.cs
- SspiNegotiationTokenAuthenticatorState.cs
- WebContext.cs
- SerializationException.cs
- QuotaExceededException.cs
- XmlQualifiedName.cs
- DataListDesigner.cs
- Button.cs