/// <summary>
        /// Gets the resource association set with the given values
        /// </summary>
        /// <param name="resourceSet">The resource set</param>
        /// <param name="resourceType">The resource type</param>
        /// <param name="resourceProperty">The resource property</param>
        /// <returns>The resource association set</returns>
        public virtual ResourceAssociationSet GetResourceAssociationSet(ResourceSet resourceSet, ResourceType resourceType, ResourceProperty resourceProperty)
        {
            ExceptionUtilities.CheckArgumentNotNull(resourceSet, "resourceSet");
            ExceptionUtilities.CheckArgumentNotNull(resourceType, "resourceType");
            ExceptionUtilities.CheckArgumentNotNull(resourceProperty, "resourceProperty");

            ExceptionUtilities.Assert(
                (resourceProperty.Kind & (ResourcePropertyKind.ResourceReference | ResourcePropertyKind.ResourceSetReference)) != 0,
                "GetResourceAssociationSet called with non-navigation property '{0}' of kind '{1}'.", 
                resourceProperty.Name,
                resourceProperty.Kind);

            ExceptionUtilities.Assert(resourceType.GetLocalPropertiesLazily().Contains(resourceProperty), "ResourceProperty '{0}' must be on the ResourceType '{1}' when finding the ResourceAssociationSet", resourceProperty.Name, resourceType.Name);
            ExceptionUtilities.Assert(this.metadataHelper.GetResourceTypesOfResourceSet(resourceSet).Contains(resourceType), "ResourceSet '{0}' does not contain ResourceType '{1}'", resourceSet.Name, resourceType.Name);

            foreach (var associationSet in this.metadataHelper.ResourceAssociationSets)
            {
                if (associationSet.End1.ResourceSet == resourceSet && associationSet.End1.ResourceType == resourceType && associationSet.End1.ResourceProperty == resourceProperty)
                {
                    return this.EnforceMetadataCache(associationSet, resourceSet, resourceType, resourceProperty, true);
                }

                if (associationSet.End2.ResourceSet == resourceSet && associationSet.End2.ResourceType == resourceType && associationSet.End2.ResourceProperty == resourceProperty)
                {
                    return this.EnforceMetadataCache(associationSet, resourceSet, resourceType, resourceProperty, true);
                }
            }

            return null;
        }