//--------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Text; using System.Data.Objects.DataClasses; namespace System.Data.Objects.Internal { /// /// A strategy interface that defines methods used for setting and getting values of /// properties and collections on entities. /// Implementors of this interface are used by the EntityWrapper class. /// internal interface IPropertyAccessorStrategy { /// /// Gets the value of a navigation property for the given related end. /// /// Specifies the related end for which a value is required /// The property value object GetNavigationPropertyValue(RelatedEnd relatedEnd); /// /// Sets the value of a navigation property for the given related end. /// /// Specifies the related end for which a value should be set /// The value to set void SetNavigationPropertyValue(RelatedEnd relatedEnd, object value); /// /// Adds a value to the collection represented by the given related end. /// /// The related end for the collection to use /// The value to add to the collection void CollectionAdd(RelatedEnd relatedEnd, object value); /// /// Removes a value from the collection represented by the given related end. /// /// The related end for the collection to use /// The value to remove from the collection /// True if a value was found and removed; false otherwise bool CollectionRemove(RelatedEnd relatedEnd, object value); /// /// Creates a new collection for the given related end. /// /// The related end for which a collection should be created /// The new collection object CollectionCreate(RelatedEnd relatedEnd); } }