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
- StylusSystemGestureEventArgs.cs
- TypeSystem.cs
- NavigationFailedEventArgs.cs
- SchemaTypeEmitter.cs
- CompiledRegexRunner.cs
- Utils.cs
- DeferredElementTreeState.cs
- BindingSourceDesigner.cs
- RowToFieldTransformer.cs
- GlyphsSerializer.cs
- LinkButton.cs
- SQLGuid.cs
- DrawTreeNodeEventArgs.cs
- FastPropertyAccessor.cs
- OverrideMode.cs
- DoubleSumAggregationOperator.cs
- ClonableStack.cs
- StackSpiller.Temps.cs
- QilFunction.cs
- DocumentPropertiesDialog.cs
- DataGridViewCellStyle.cs
- ExpressionCopier.cs
- ReadWriteSpinLock.cs
- IdentityReference.cs
- FlowDocumentReaderAutomationPeer.cs
- FlowNode.cs
- DbConnectionPoolGroup.cs
- StylusCollection.cs
- QuaternionAnimation.cs
- Site.cs
- RawMouseInputReport.cs
- IODescriptionAttribute.cs
- UpdateTranslator.cs
- KoreanCalendar.cs
- ExpressionQuoter.cs
- InputProcessorProfilesLoader.cs
- DataTemplateKey.cs
- TextFormatterImp.cs
- HebrewNumber.cs
- GeneralTransform3DCollection.cs
- storagemappingitemcollection.viewdictionary.cs
- StrongTypingException.cs
- SkipQueryOptionExpression.cs
- MarshalDirectiveException.cs
- DataGridViewCellValueEventArgs.cs
- FormatterConverter.cs
- EventlogProvider.cs
- RegularExpressionValidator.cs
- CompiledRegexRunner.cs
- EdmRelationshipRoleAttribute.cs
- HostProtectionException.cs
- DataControlLinkButton.cs
- _NestedSingleAsyncResult.cs
- Int32RectValueSerializer.cs
- TemplateComponentConnector.cs
- WmpBitmapEncoder.cs
- DataGridViewAdvancedBorderStyle.cs
- TableLayoutStyleCollection.cs
- BrowserCapabilitiesCompiler.cs
- FontFamily.cs
- PointAnimationClockResource.cs
- DiscoveryRequestHandler.cs
- EntityDesignerUtils.cs
- HandleCollector.cs
- IdentityValidationException.cs
- MetadataItem.cs
- DashStyles.cs
- CopyOfAction.cs
- RC2.cs
- StyleBamlTreeBuilder.cs
- TempEnvironment.cs
- RichTextBoxConstants.cs
- MessageRpc.cs
- FrameworkElementFactoryMarkupObject.cs
- StyleCollection.cs
- Keyboard.cs
- DateTimeFormat.cs
- InheritanceContextHelper.cs
- ResXResourceSet.cs
- MdiWindowListItemConverter.cs
- TreeNodeBinding.cs
- ProfileServiceManager.cs
- ListViewUpdatedEventArgs.cs
- ConcurrencyBehavior.cs
- TreeView.cs
- RenderCapability.cs
- SettingsSavedEventArgs.cs
- cookie.cs
- List.cs
- WebBrowserBase.cs
- AnimationLayer.cs
- _ListenerResponseStream.cs
- ScriptResourceMapping.cs
- DataTableMapping.cs
- HttpSocketManager.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- CodeObjectCreateExpression.cs
- ActivityValidationServices.cs
- UnsafeNativeMethods.cs
- RSAOAEPKeyExchangeDeformatter.cs