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
- XmlEncoding.cs
- RowToFieldTransformer.cs
- NonSerializedAttribute.cs
- XsdBuildProvider.cs
- DecimalAnimationBase.cs
- BindingContext.cs
- HostingEnvironmentException.cs
- CodeArrayCreateExpression.cs
- Propagator.cs
- XPathItem.cs
- SplitterCancelEvent.cs
- StateManager.cs
- MapPathBasedVirtualPathProvider.cs
- MarkupWriter.cs
- BamlCollectionHolder.cs
- WebServicesDescriptionAttribute.cs
- BooleanAnimationBase.cs
- EnumBuilder.cs
- DomainLiteralReader.cs
- FormsAuthentication.cs
- securitymgrsite.cs
- ChameleonKey.cs
- SpotLight.cs
- Vector3D.cs
- BamlCollectionHolder.cs
- GridViewItemAutomationPeer.cs
- XmlNodeWriter.cs
- MailMessage.cs
- ObjectStorage.cs
- CqlParserHelpers.cs
- DataSourceHelper.cs
- VectorKeyFrameCollection.cs
- DataServiceQuery.cs
- BamlRecordWriter.cs
- DataMember.cs
- HtmlHead.cs
- ProcessThread.cs
- HttpCookieCollection.cs
- WpfPayload.cs
- Transform3DCollection.cs
- DataRelationCollection.cs
- XmlBinaryReader.cs
- FrameDimension.cs
- GifBitmapEncoder.cs
- CodeGroup.cs
- ResourcesBuildProvider.cs
- ParameterToken.cs
- HtmlProps.cs
- PointF.cs
- HttpListener.cs
- DeobfuscatingStream.cs
- CrossSiteScriptingValidation.cs
- CompensationDesigner.cs
- DriveInfo.cs
- DiscoveryClient.cs
- Expression.cs
- WindowInteropHelper.cs
- HostingPreferredMapPath.cs
- NativeMethods.cs
- KeyFrames.cs
- NativeMethodsOther.cs
- SystemWebCachingSectionGroup.cs
- LOSFormatter.cs
- DescendantOverDescendantQuery.cs
- Light.cs
- CornerRadiusConverter.cs
- AbstractDataSvcMapFileLoader.cs
- AssemblyName.cs
- SQLInt64.cs
- VersionUtil.cs
- PersistenceTypeAttribute.cs
- ListViewGroup.cs
- ExpandoClass.cs
- CqlIdentifiers.cs
- FontUnitConverter.cs
- CopyCodeAction.cs
- FactoryRecord.cs
- GraphicsPathIterator.cs
- StickyNoteHelper.cs
- GridViewUpdatedEventArgs.cs
- RoutedEventConverter.cs
- CodeIterationStatement.cs
- basenumberconverter.cs
- ModuleElement.cs
- TextEditorSelection.cs
- AutoGeneratedField.cs
- DataGridViewSelectedRowCollection.cs
- AjaxFrameworkAssemblyAttribute.cs
- XDRSchema.cs
- ChannelSinkStacks.cs
- DrawingContext.cs
- LazyTextWriterCreator.cs
- MatrixAnimationBase.cs
- DataGridViewImageColumn.cs
- DescendantOverDescendantQuery.cs
- __FastResourceComparer.cs
- WorkflowRuntimeService.cs
- MimeBasePart.cs
- CustomPopupPlacement.cs
- ProfileService.cs