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
- Matrix3DConverter.cs
- SmtpDigestAuthenticationModule.cs
- Parameter.cs
- ASCIIEncoding.cs
- Timeline.cs
- ListViewItemEventArgs.cs
- HttpCapabilitiesEvaluator.cs
- XsdDateTime.cs
- ResourceReferenceExpression.cs
- HMACSHA384.cs
- ReaderWriterLockWrapper.cs
- ReadWriteSpinLock.cs
- DataGridViewCellStyleConverter.cs
- handlecollector.cs
- PackWebResponse.cs
- NavigationCommands.cs
- PolyBezierSegment.cs
- PopupRootAutomationPeer.cs
- SqlHelper.cs
- FontStretches.cs
- ClaimTypes.cs
- OleDbConnectionFactory.cs
- InkPresenterAutomationPeer.cs
- DataBindEngine.cs
- TextBox.cs
- ListBase.cs
- ListChangedEventArgs.cs
- HuffCodec.cs
- IntersectQueryOperator.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- FixedSOMSemanticBox.cs
- MailBnfHelper.cs
- SystemIPv4InterfaceProperties.cs
- XmlSchemaExporter.cs
- MdiWindowListItemConverter.cs
- DependencyObject.cs
- EncryptedKey.cs
- NameValueCollection.cs
- WebServicesInteroperability.cs
- Knowncolors.cs
- FlowDocumentReader.cs
- EpmSyndicationContentDeSerializer.cs
- ExpressionPrefixAttribute.cs
- SourceFilter.cs
- SoapConverter.cs
- DataControlReference.cs
- ZipIOExtraField.cs
- XPathExpr.cs
- CacheMemory.cs
- FixedBufferAttribute.cs
- NotifyInputEventArgs.cs
- ComEventsInfo.cs
- FreezableCollection.cs
- NativeWrapper.cs
- X509ServiceCertificateAuthenticationElement.cs
- CommandTreeTypeHelper.cs
- FileSecurity.cs
- SoapAttributeAttribute.cs
- RequestCachingSection.cs
- ModelItemCollection.cs
- XMLUtil.cs
- safex509handles.cs
- ToolStripManager.cs
- InvalidEnumArgumentException.cs
- RSAOAEPKeyExchangeFormatter.cs
- RelationshipEndCollection.cs
- Stack.cs
- SafeFileMappingHandle.cs
- DbConnectionPool.cs
- LeafCellTreeNode.cs
- EpmSyndicationContentSerializer.cs
- SqlFacetAttribute.cs
- DiscreteKeyFrames.cs
- BuildProvidersCompiler.cs
- Thickness.cs
- CompilerGeneratedAttribute.cs
- ExecutionScope.cs
- SvcMapFileSerializer.cs
- IdnMapping.cs
- XmlQualifiedName.cs
- GroupBoxAutomationPeer.cs
- StyleBamlRecordReader.cs
- WCFModelStrings.Designer.cs
- Translator.cs
- CorrelationManager.cs
- StateRuntime.cs
- Int16Storage.cs
- PointValueSerializer.cs
- FontUnitConverter.cs
- KnownAssemblyEntry.cs
- PartialTrustVisibleAssembly.cs
- DataGridCommandEventArgs.cs
- MenuBindingsEditor.cs
- SHA512Cng.cs
- Byte.cs
- EdmPropertyAttribute.cs
- Registry.cs
- NamespaceMapping.cs
- HierarchicalDataBoundControl.cs
- FixedPage.cs