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
- CompilationRelaxations.cs
- XmlObjectSerializerWriteContext.cs
- SqlRowUpdatedEvent.cs
- ContractType.cs
- ConnectionOrientedTransportChannelListener.cs
- ArrayList.cs
- CounterCreationData.cs
- CodeIdentifier.cs
- ExtendedProtectionPolicy.cs
- WriteableBitmap.cs
- SingleStorage.cs
- RecordManager.cs
- Int32CollectionValueSerializer.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- OleDbErrorCollection.cs
- ConfigurationElementProperty.cs
- SafeReadContext.cs
- XmlAttribute.cs
- DbDataRecord.cs
- ExceptionUtil.cs
- StringFormat.cs
- DoubleAnimation.cs
- SqlRowUpdatedEvent.cs
- HtmlHead.cs
- UTF7Encoding.cs
- ExtendedPropertyInfo.cs
- KeyConstraint.cs
- RemotingSurrogateSelector.cs
- SqlDependencyListener.cs
- ViewStateException.cs
- OrCondition.cs
- SqlXml.cs
- TypeTypeConverter.cs
- WindowsFormsSectionHandler.cs
- DocumentSequenceHighlightLayer.cs
- PersistenceProviderFactory.cs
- BinHexDecoder.cs
- SmiContextFactory.cs
- PersistChildrenAttribute.cs
- ExceptionRoutedEventArgs.cs
- RadioButton.cs
- SchemaType.cs
- CmsUtils.cs
- ConversionHelper.cs
- WinCategoryAttribute.cs
- AssemblyCollection.cs
- Profiler.cs
- Assembly.cs
- Floater.cs
- PreviewPrintController.cs
- CurrentTimeZone.cs
- TimelineGroup.cs
- FixUpCollection.cs
- DataGridViewColumnStateChangedEventArgs.cs
- RepeaterCommandEventArgs.cs
- InstanceStoreQueryResult.cs
- DataSysAttribute.cs
- CellQuery.cs
- HwndSourceParameters.cs
- RootContext.cs
- XmlCharCheckingReader.cs
- CollectionConverter.cs
- HttpCachePolicy.cs
- CommentEmitter.cs
- XsdBuilder.cs
- PngBitmapDecoder.cs
- Paragraph.cs
- IsolatedStorage.cs
- XhtmlBasicListAdapter.cs
- ObjectView.cs
- MouseGesture.cs
- StyleBamlRecordReader.cs
- TransformerConfigurationWizardBase.cs
- DbException.cs
- MetadataItemSerializer.cs
- XmlChildEnumerator.cs
- CompositeControlDesigner.cs
- UniformGrid.cs
- Encoder.cs
- StateBag.cs
- CollectionChangeEventArgs.cs
- WebCategoryAttribute.cs
- Decimal.cs
- ConstructorArgumentAttribute.cs
- HostingEnvironment.cs
- WebHttpBinding.cs
- EditorBrowsableAttribute.cs
- DocumentPageHost.cs
- BinHexEncoder.cs
- AppearanceEditorPart.cs
- Reference.cs
- RSAPKCS1SignatureDeformatter.cs
- XmlSchemaObjectTable.cs
- DataTemplateKey.cs
- PrintEvent.cs
- ListViewDesigner.cs
- Pair.cs
- WebPartActionVerb.cs
- PowerStatus.cs
- ParameterExpression.cs