Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / DeleteStoreRequest.cs / 1 / DeleteStoreRequest.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards { using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Threading; using Microsoft.InfoCards.Diagnostics; using IDT = Microsoft.InfoCards.Diagnostics.InfoCardTrace; // // Summary: // This class handles the request from the UI Agent to delete the store. // This is achieved by deleting all the data in the store. // class DeleteStoreRequest : UIAgentRequest { // // Summary: // Constructs a new DeleteStoreRequest 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. // public DeleteStoreRequest( IntPtr rpcHandle, Stream inArgs, Stream outArgs, ClientUIRequest parentRequest ) : base( rpcHandle, inArgs, outArgs, parentRequest ) { } // // Summary // Event for marshalling the request information // protected override void OnMarshalInArgs() { // // No input arguments. // ; } // // Summary // Event for processing the user request // protected override void OnProcess() { StoreConnection connection = StoreConnection.GetConnection(); try { connection.BeginTransaction(); try { QueryParameter delStoreQuery = DataSource.CreateDeleteStoreTypeQuery(); ICollection list = ( ICollection ) connection.Query( QueryDetails.Identifiers, connection.LocalDataSource, delStoreQuery ); if( null != list && list.Count > 0 ) { foreach( DataRow row in list ) { connection.Delete( row ); } } connection.CommitTransaction(); AuditLog.AuditStoreDeletion(); } catch { connection.RollbackTransaction(); throw; } } finally { connection.Close(); } } // // Summary // Event for marshalling the response information // // Remarks // Nothing. // protected override void OnMarshalOutArgs() { // // Nothing to marshal out. // ; } } } // 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
- LinqDataSourceView.cs
- RijndaelManagedTransform.cs
- ResourceSetExpression.cs
- StylusPointPropertyInfo.cs
- SuspendDesigner.cs
- PrintPreviewGraphics.cs
- XmlSchemaExporter.cs
- WebEventTraceProvider.cs
- BindingExpressionUncommonField.cs
- BindingOperations.cs
- OleTxTransaction.cs
- JsonFormatReaderGenerator.cs
- TickBar.cs
- RuleSetReference.cs
- TextEndOfLine.cs
- BindingSource.cs
- ValidatedControlConverter.cs
- SqlConnectionHelper.cs
- cache.cs
- TaskSchedulerException.cs
- TargetParameterCountException.cs
- BitmapCodecInfoInternal.cs
- CodeVariableDeclarationStatement.cs
- RawStylusInputCustomDataList.cs
- StreamResourceInfo.cs
- CacheSection.cs
- HtmlInputSubmit.cs
- DataRow.cs
- TraceInternal.cs
- CommandField.cs
- WindowsScrollBar.cs
- Memoizer.cs
- InvalidDocumentContentsException.cs
- LogicalExpr.cs
- AutomationPropertyInfo.cs
- PerfCounterSection.cs
- CommonObjectSecurity.cs
- BitmapFrame.cs
- JoinGraph.cs
- DriveNotFoundException.cs
- CompareInfo.cs
- XDeferredAxisSource.cs
- Script.cs
- DataObject.cs
- FilteredXmlReader.cs
- WinFormsUtils.cs
- BaseDataBoundControlDesigner.cs
- AppDomainProtocolHandler.cs
- BamlBinaryWriter.cs
- SystemThemeKey.cs
- ResourceType.cs
- Or.cs
- MissingMemberException.cs
- DescendantBaseQuery.cs
- AlgoModule.cs
- BordersPage.cs
- Axis.cs
- NumberAction.cs
- TreeNodeClickEventArgs.cs
- tabpagecollectioneditor.cs
- TabletDeviceInfo.cs
- ByteConverter.cs
- ProtocolsConfiguration.cs
- ConvertEvent.cs
- HtmlObjectListAdapter.cs
- InputScopeAttribute.cs
- ScalarOps.cs
- CorrelationService.cs
- SoapClientProtocol.cs
- TableAdapterManagerHelper.cs
- CodeTypeReferenceCollection.cs
- CrossSiteScriptingValidation.cs
- COM2IDispatchConverter.cs
- MaskedTextBox.cs
- CaretElement.cs
- TableSectionStyle.cs
- ImportOptions.cs
- CodeConditionStatement.cs
- OleDbRowUpdatingEvent.cs
- ResourceSet.cs
- PathFigureCollection.cs
- ElapsedEventArgs.cs
- XappLauncher.cs
- OLEDB_Util.cs
- DisplayInformation.cs
- GradientBrush.cs
- TriState.cs
- PropertiesTab.cs
- AssociationEndMember.cs
- DataServiceException.cs
- CodeIndexerExpression.cs
- httpapplicationstate.cs
- Grammar.cs
- ControlEvent.cs
- UpdateException.cs
- CacheMode.cs
- ClassImporter.cs
- TransformedBitmap.cs
- messageonlyhwndwrapper.cs
- IdentityModelStringsVersion1.cs