/// <summary>
        /// Returns a <see cref="ReadOnlyCollection{T}"/> representing the data of the <see cref="DomainObjectCollection"/>.
        /// The data is not copied; instead, the returned collection holds the same data store as the original collection and will therefore reflect
        /// any changes made to the original.
        /// </summary>
        /// <returns>A <see cref="ReadOnlyCollection{T}"/> representing the data of the <see cref="DomainObjectCollection"/>.</returns>
        public static ReadOnlyCollection <DomainObject> AsReadOnlyCollection(this DomainObjectCollection collection)
        {
            ArgumentUtility.CheckNotNull("collection", collection);

            var listAdapter = collection.AsList <DomainObject> ();

            return(new ReadOnlyCollection <DomainObject> (listAdapter));
        }