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
- Win32MouseDevice.cs
- CheckPair.cs
- SqlCommandBuilder.cs
- CounterCreationDataConverter.cs
- AutomationPropertyInfo.cs
- FilteredDataSetHelper.cs
- DetailsViewInsertedEventArgs.cs
- FixedDSBuilder.cs
- TreeNodeStyle.cs
- DefaultCommandExtensionCallback.cs
- DesigntimeLicenseContextSerializer.cs
- DataGridViewToolTip.cs
- ObjectStateEntry.cs
- CodeTypeMemberCollection.cs
- ButtonBase.cs
- TextSelectionHighlightLayer.cs
- TagMapCollection.cs
- ScrollContentPresenter.cs
- Identity.cs
- XamlContextStack.cs
- XhtmlBasicValidationSummaryAdapter.cs
- ColorAnimation.cs
- GenericIdentity.cs
- ReturnValue.cs
- AppLevelCompilationSectionCache.cs
- ComplexObject.cs
- Activity.cs
- Focus.cs
- _NegotiateClient.cs
- DifferencingCollection.cs
- ConversionHelper.cs
- CompiledXpathExpr.cs
- ScanQueryOperator.cs
- XmlSchemaType.cs
- cookieexception.cs
- BamlCollectionHolder.cs
- Formatter.cs
- GridViewAutomationPeer.cs
- URLAttribute.cs
- TablePattern.cs
- BroadcastEventHelper.cs
- DataRowChangeEvent.cs
- DebugView.cs
- NavigationHelper.cs
- SpellerHighlightLayer.cs
- TreeNodeBindingDepthConverter.cs
- FlagsAttribute.cs
- BufferedMessageData.cs
- TreeNodeCollectionEditor.cs
- ContentTextAutomationPeer.cs
- ConditionCollection.cs
- WSSecurityJan2004.cs
- MimeWriter.cs
- InlineObject.cs
- Pkcs7Recipient.cs
- FormClosingEvent.cs
- DefaultValueTypeConverter.cs
- CombinedGeometry.cs
- ApplicationCommands.cs
- HwndKeyboardInputProvider.cs
- tabpagecollectioneditor.cs
- TcpProcessProtocolHandler.cs
- SoapSchemaImporter.cs
- MembershipPasswordException.cs
- ParenthesizePropertyNameAttribute.cs
- ListViewItemEventArgs.cs
- RoutedUICommand.cs
- BamlCollectionHolder.cs
- Panel.cs
- UnsafePeerToPeerMethods.cs
- XmlResolver.cs
- ActivityExecutorOperation.cs
- XmlSchemaAttribute.cs
- TrackBarRenderer.cs
- FontStyleConverter.cs
- OutOfProcStateClientManager.cs
- _Semaphore.cs
- TraceSection.cs
- TypeUtil.cs
- FamilyTypeface.cs
- QueryStringParameter.cs
- TextElementEditingBehaviorAttribute.cs
- BooleanToVisibilityConverter.cs
- TreeChangeInfo.cs
- LinkButton.cs
- DateTimeUtil.cs
- OperationPickerDialog.cs
- ResourcesGenerator.cs
- MenuItem.cs
- GridViewRowEventArgs.cs
- DataGridViewCellConverter.cs
- ConfigurationProviderException.cs
- SHA384CryptoServiceProvider.cs
- VariableExpressionConverter.cs
- SectionVisual.cs
- HttpCapabilitiesSectionHandler.cs
- LocalFileSettingsProvider.cs
- CompositeDataBoundControl.cs
- SelectionService.cs
- TextCollapsingProperties.cs