Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / Binding / EntityCollectionChangedParams.cs / 1305376 / EntityCollectionChangedParams.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// EntityCollectionChangedParams class // // //--------------------------------------------------------------------- namespace System.Data.Services.Client { #region Namespaces using System.Collections; using System.Collections.Specialized; #endregion ///Encapsulates the arguments of an EntityCollectionChanged delegate [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704", Justification = "Name gets too long with Parameters")] public sealed class EntityCollectionChangedParams { #region Fields ///Context associated with the BindingObserver. private readonly DataServiceContext context; ////// The source object that references the target object through a collection navigation property. /// private readonly object sourceEntity; ///The property of the source object that references the collection that has changed. private readonly string propertyName; ///The entity set of the source object. private readonly string sourceEntitySet; ///The collection that has changed. private readonly ICollection collection; ///The target entity object involved in the change. private readonly object targetEntity; ///The entity set name of the target object. private readonly string targetEntitySet; ////// The action that indicates how the collection was changed. The value will be Add or Remove. /// private readonly NotifyCollectionChangedAction action; #endregion #region Constructor ////// Construct an EntityCollectionChangedParams object. /// /// The DataServiceContext associated with the BindingObserver. /// The source object that references the target object through a collection navigation property. /// The property of the source object that references the collection that has changed. /// The entity set of the source object. /// The collection that has changed. /// The target entity object involved in the change. /// The entity set name of the target object. /// The action that indicates how the collection was changed. The value will be Add or Remove. internal EntityCollectionChangedParams( DataServiceContext context, object sourceEntity, string propertyName, string sourceEntitySet, ICollection collection, object targetEntity, string targetEntitySet, NotifyCollectionChangedAction action) { this.context = context; this.sourceEntity = sourceEntity; this.propertyName = propertyName; this.sourceEntitySet = sourceEntitySet; this.collection = collection; this.targetEntity = targetEntity; this.targetEntitySet = targetEntitySet; this.action = action; } #endregion #region Properties ///Context to which source and target entities belong. public DataServiceContext Context { get { return this.context; } } ////// The source object that references the target object through a collection navigation property. /// public object SourceEntity { get { return this.sourceEntity; } } ////// The property of the source object that references the collection that has changed. /// public string PropertyName { get { return this.propertyName; } } ///The entity set of the source object. public string SourceEntitySet { get { return this.sourceEntitySet; } } ///The target entity object involved in the change. public object TargetEntity { get { return this.targetEntity; } } ///The entity set name of the target object. public string TargetEntitySet { get { return this.targetEntitySet; } } ///The collection that has changed. public ICollection Collection { get { return this.collection; } } ////// The action that indicates how the collection was changed. The value will be Add or Remove. /// public NotifyCollectionChangedAction Action { get { return this.action; } } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// EntityCollectionChangedParams class // // //--------------------------------------------------------------------- namespace System.Data.Services.Client { #region Namespaces using System.Collections; using System.Collections.Specialized; #endregion ///Encapsulates the arguments of an EntityCollectionChanged delegate [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704", Justification = "Name gets too long with Parameters")] public sealed class EntityCollectionChangedParams { #region Fields ///Context associated with the BindingObserver. private readonly DataServiceContext context; ////// The source object that references the target object through a collection navigation property. /// private readonly object sourceEntity; ///The property of the source object that references the collection that has changed. private readonly string propertyName; ///The entity set of the source object. private readonly string sourceEntitySet; ///The collection that has changed. private readonly ICollection collection; ///The target entity object involved in the change. private readonly object targetEntity; ///The entity set name of the target object. private readonly string targetEntitySet; ////// The action that indicates how the collection was changed. The value will be Add or Remove. /// private readonly NotifyCollectionChangedAction action; #endregion #region Constructor ////// Construct an EntityCollectionChangedParams object. /// /// The DataServiceContext associated with the BindingObserver. /// The source object that references the target object through a collection navigation property. /// The property of the source object that references the collection that has changed. /// The entity set of the source object. /// The collection that has changed. /// The target entity object involved in the change. /// The entity set name of the target object. /// The action that indicates how the collection was changed. The value will be Add or Remove. internal EntityCollectionChangedParams( DataServiceContext context, object sourceEntity, string propertyName, string sourceEntitySet, ICollection collection, object targetEntity, string targetEntitySet, NotifyCollectionChangedAction action) { this.context = context; this.sourceEntity = sourceEntity; this.propertyName = propertyName; this.sourceEntitySet = sourceEntitySet; this.collection = collection; this.targetEntity = targetEntity; this.targetEntitySet = targetEntitySet; this.action = action; } #endregion #region Properties ///Context to which source and target entities belong. public DataServiceContext Context { get { return this.context; } } ////// The source object that references the target object through a collection navigation property. /// public object SourceEntity { get { return this.sourceEntity; } } ////// The property of the source object that references the collection that has changed. /// public string PropertyName { get { return this.propertyName; } } ///The entity set of the source object. public string SourceEntitySet { get { return this.sourceEntitySet; } } ///The target entity object involved in the change. public object TargetEntity { get { return this.targetEntity; } } ///The entity set name of the target object. public string TargetEntitySet { get { return this.targetEntitySet; } } ///The collection that has changed. public ICollection Collection { get { return this.collection; } } ////// The action that indicates how the collection was changed. The value will be Add or Remove. /// public NotifyCollectionChangedAction Action { get { return this.action; } } #endregion } } // 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
- ServerValidateEventArgs.cs
- UnicodeEncoding.cs
- SystemWebCachingSectionGroup.cs
- Sql8ConformanceChecker.cs
- XPathChildIterator.cs
- ScriptBehaviorDescriptor.cs
- Accessible.cs
- SqlServices.cs
- HttpModuleCollection.cs
- IPHostEntry.cs
- BitmapDownload.cs
- ObjectNavigationPropertyMapping.cs
- SignatureConfirmations.cs
- querybuilder.cs
- SEHException.cs
- TypeNameParser.cs
- x509utils.cs
- TextProviderWrapper.cs
- Types.cs
- PresentationAppDomainManager.cs
- CalendarAutomationPeer.cs
- MarkupExtensionParser.cs
- TableLayoutPanelBehavior.cs
- Part.cs
- HighlightVisual.cs
- ActiveDesignSurfaceEvent.cs
- WrappingXamlSchemaContext.cs
- Missing.cs
- XmlDocumentType.cs
- UndoUnit.cs
- ExtensibleClassFactory.cs
- WriteableBitmap.cs
- SchemaElement.cs
- OperationParameterInfo.cs
- GenericUriParser.cs
- CustomErrorsSectionWrapper.cs
- PropertyConverter.cs
- DrawingVisual.cs
- infer.cs
- ConfigurationManagerInternal.cs
- AbsoluteQuery.cs
- UrlPropertyAttribute.cs
- InitiatorServiceModelSecurityTokenRequirement.cs
- XmlCollation.cs
- SecurityDocument.cs
- CornerRadiusConverter.cs
- ProviderBase.cs
- SymmetricKey.cs
- WebPartZoneCollection.cs
- ViewGenResults.cs
- Transform.cs
- MonitoringDescriptionAttribute.cs
- DataListItemCollection.cs
- DiscoveryClientDocuments.cs
- ValueTable.cs
- GeneralTransform.cs
- TheQuery.cs
- GenericAuthenticationEventArgs.cs
- SchemaNotation.cs
- HttpAsyncResult.cs
- ResponseStream.cs
- UnknownBitmapEncoder.cs
- TextEditorSelection.cs
- XDRSchema.cs
- MsmqHostedTransportManager.cs
- XmlSchemaInclude.cs
- TextViewBase.cs
- VerticalAlignConverter.cs
- ThreadAttributes.cs
- LazyTextWriterCreator.cs
- XmlAnyElementAttributes.cs
- AsymmetricKeyExchangeDeformatter.cs
- Registration.cs
- JsonWriter.cs
- TableItemStyle.cs
- SeekableReadStream.cs
- ScrollProviderWrapper.cs
- TreeViewHitTestInfo.cs
- LogSwitch.cs
- COM2ExtendedTypeConverter.cs
- RoleManagerEventArgs.cs
- unitconverter.cs
- IsolatedStorageFileStream.cs
- XamlFxTrace.cs
- SiteOfOriginContainer.cs
- Label.cs
- PolyLineSegmentFigureLogic.cs
- TCPClient.cs
- WebPartTransformerAttribute.cs
- QueryOutputWriterV1.cs
- Rotation3DAnimation.cs
- UriExt.cs
- Mutex.cs
- SqlDataSourceCache.cs
- ProjectionCamera.cs
- XmlAttributeProperties.cs
- IteratorFilter.cs
- NonVisualControlAttribute.cs
- Convert.cs
- HtmlEmptyTagControlBuilder.cs