Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Server / System / Data / Services / ChangeInterceptorAttribute.cs / 1305376 / ChangeInterceptorAttribute.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Provides a class to decorate change callback methods.
//
//
// @owner [....]
//---------------------------------------------------------------------
namespace System.Data.Services
{
using System;
using System.Diagnostics;
///
/// Use this attribute on a DataService method to indicate that
/// this method should be invoked with data changes.
///
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public sealed class ChangeInterceptorAttribute : Attribute
{
/// Container name that the method filters.
private readonly string entitySetName;
/// Declares a new instance.
/// Name of entity set that the method intercepts changes to.
public ChangeInterceptorAttribute(string entitySetName)
{
if (entitySetName == null)
{
throw Error.ArgumentNull("entitySetName");
}
this.entitySetName = entitySetName;
}
/// Entity set name that the method intercepts changes to.
public string EntitySetName
{
[DebuggerStepThrough]
get { return this.entitySetName; }
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Provides a class to decorate change callback methods.
//
//
// @owner [....]
//---------------------------------------------------------------------
namespace System.Data.Services
{
using System;
using System.Diagnostics;
///
/// Use this attribute on a DataService method to indicate that
/// this method should be invoked with data changes.
///
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public sealed class ChangeInterceptorAttribute : Attribute
{
/// Container name that the method filters.
private readonly string entitySetName;
/// Declares a new instance.
/// Name of entity set that the method intercepts changes to.
public ChangeInterceptorAttribute(string entitySetName)
{
if (entitySetName == null)
{
throw Error.ArgumentNull("entitySetName");
}
this.entitySetName = entitySetName;
}
/// Entity set name that the method intercepts changes to.
public string EntitySetName
{
[DebuggerStepThrough]
get { return this.entitySetName; }
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WindowsListViewGroup.cs
- SoapFault.cs
- ComboBox.cs
- Encoder.cs
- TemplateControlParser.cs
- RSAPKCS1KeyExchangeFormatter.cs
- BufferModesCollection.cs
- TextTreeTextBlock.cs
- Rule.cs
- XmlEnumAttribute.cs
- DbConnectionStringBuilder.cs
- RequestCachePolicy.cs
- XmlNamespaceMapping.cs
- SafeThemeHandle.cs
- XmlConverter.cs
- altserialization.cs
- StylusPointPropertyId.cs
- SubclassTypeValidatorAttribute.cs
- PreloadHost.cs
- MaterializeFromAtom.cs
- BaseHashHelper.cs
- WebBrowserBase.cs
- UDPClient.cs
- HotSpot.cs
- PolicyValidationException.cs
- SecureConversationDriver.cs
- BindableTemplateBuilder.cs
- NetMsmqBinding.cs
- InheritablePropertyChangeInfo.cs
- MetadataItem.cs
- TheQuery.cs
- __FastResourceComparer.cs
- TypeHelper.cs
- EventSetter.cs
- TabItemWrapperAutomationPeer.cs
- WindowsHyperlink.cs
- Condition.cs
- WCFServiceClientProxyGenerator.cs
- DataControlImageButton.cs
- XmlUtilWriter.cs
- SafeNativeMethodsMilCoreApi.cs
- TraceProvider.cs
- MouseEventArgs.cs
- NetMsmqBindingCollectionElement.cs
- TypeConverterMarkupExtension.cs
- ImpersonationContext.cs
- AssemblyAttributesGoHere.cs
- FontConverter.cs
- RelatedView.cs
- Transform3DCollection.cs
- FrameworkContextData.cs
- GPPOINT.cs
- LockedAssemblyCache.cs
- Attribute.cs
- QueryableFilterUserControl.cs
- CheckedListBox.cs
- login.cs
- CustomValidator.cs
- compensatingcollection.cs
- _WinHttpWebProxyDataBuilder.cs
- DesignerDataView.cs
- OracleFactory.cs
- Msec.cs
- SignedInfo.cs
- WebPartCatalogCloseVerb.cs
- MemberHolder.cs
- UTF7Encoding.cs
- WebPartAddingEventArgs.cs
- HwndMouseInputProvider.cs
- SSmlParser.cs
- PatternMatcher.cs
- FullTextLine.cs
- SqlVisitor.cs
- EventSetterHandlerConverter.cs
- ToolStripScrollButton.cs
- DynamicValidator.cs
- SqlXml.cs
- StorageScalarPropertyMapping.cs
- AuthenticationService.cs
- InteropExecutor.cs
- DataGridViewColumnTypePicker.cs
- DebugInfoGenerator.cs
- ValidateNames.cs
- ContractUtils.cs
- RestHandler.cs
- SQLInt32.cs
- TableAdapterManagerHelper.cs
- AuthenticationSection.cs
- RoleGroupCollectionEditor.cs
- ResourceAttributes.cs
- CacheHelper.cs
- SqlWorkflowInstanceStoreLock.cs
- PeerNeighborManager.cs
- VScrollProperties.cs
- CorePropertiesFilter.cs
- ScriptingWebServicesSectionGroup.cs
- ProgressBarBrushConverter.cs
- ResourceContainerWrapper.cs
- UnmanagedMemoryStream.cs
- PictureBox.cs