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
- LongValidator.cs
- Typography.cs
- NullableFloatMinMaxAggregationOperator.cs
- CriticalHandle.cs
- StorageEntityContainerMapping.cs
- AdjustableArrowCap.cs
- DataErrorValidationRule.cs
- MappingItemCollection.cs
- ColorConverter.cs
- AuthStoreRoleProvider.cs
- BuildResult.cs
- ProviderSettings.cs
- DataGridViewCell.cs
- StreamGeometry.cs
- LoadedEvent.cs
- SyndicationSerializer.cs
- GridItemCollection.cs
- AttachedProperty.cs
- XamlTemplateSerializer.cs
- VectorAnimationBase.cs
- MailWebEventProvider.cs
- ToolStripItemEventArgs.cs
- WsatServiceAddress.cs
- ProviderConnectionPointCollection.cs
- TraceListeners.cs
- SpeechRecognizer.cs
- CodeConditionStatement.cs
- ImageList.cs
- Image.cs
- XmlLanguage.cs
- BinHexDecoder.cs
- Point.cs
- SaveFileDialogDesigner.cs
- oledbconnectionstring.cs
- CalendarAutoFormat.cs
- XmlSchemaSimpleContentExtension.cs
- LeaseManager.cs
- IntegrationExceptionEventArgs.cs
- ExtentKey.cs
- XmlSchemaRedefine.cs
- MergeFilterQuery.cs
- CompatibleIComparer.cs
- AspNetRouteServiceHttpHandler.cs
- WindowsRegion.cs
- WindowShowOrOpenTracker.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- HtmlPageAdapter.cs
- ListComponentEditor.cs
- DataViewListener.cs
- Rule.cs
- Stack.cs
- PageWrapper.cs
- ScrollChangedEventArgs.cs
- SafeBitVector32.cs
- ServiceContractGenerationContext.cs
- CodeValidator.cs
- InheritanceContextChangedEventManager.cs
- SqlRecordBuffer.cs
- CacheModeValueSerializer.cs
- DatatypeImplementation.cs
- TitleStyle.cs
- CommandConverter.cs
- X509Certificate2.cs
- PrintPreviewGraphics.cs
- DocobjHost.cs
- RenderContext.cs
- DrawingVisual.cs
- ILGenerator.cs
- ComplexBindingPropertiesAttribute.cs
- EdgeProfileValidation.cs
- State.cs
- PathSegmentCollection.cs
- NavigationCommands.cs
- CodeGeneratorOptions.cs
- BamlRecordHelper.cs
- DeferredSelectedIndexReference.cs
- NameValuePair.cs
- HostingPreferredMapPath.cs
- SoapSchemaImporter.cs
- DbConnectionStringBuilder.cs
- ServiceDiscoveryBehavior.cs
- TimelineClockCollection.cs
- StandardBindingImporter.cs
- DataMemberConverter.cs
- DBParameter.cs
- ToolStripContentPanelDesigner.cs
- BaseParser.cs
- ShapingWorkspace.cs
- SafeFileHandle.cs
- DataBoundControl.cs
- TableItemStyle.cs
- FrameworkContentElement.cs
- ProxyGenerator.cs
- TextElementCollectionHelper.cs
- EventHandlingScope.cs
- TypeCodeDomSerializer.cs
- QuaternionConverter.cs
- ThousandthOfEmRealDoubles.cs
- StreamGeometryContext.cs
- X509ClientCertificateAuthenticationElement.cs