コード例 #1
0
        /// <summary>Infrastructure. Converts contracts to entities.</summary>
        /// <param name="content">The content.</param>
        /// <returns>A collection of entities.</returns>
        private static ICollection <DateTimeOffset> ConvertShiftCollectionContract(ShiftCollectionContract content)
        {
            Debug.Assert(content != null, "content != null");

            // Create a new collection of rotating shifts
            var values = new List <DateTimeOffset>(content.Count);

            // Set the rotating shifts
            values.AddRange(content.Select(DateTimeOffset.Parse));

            // Return the collection
            return(values);
        }
コード例 #2
0
        /// <summary>Converts contracts to entities.</summary>
        /// <param name="content">The content.</param>
        /// <returns>A collection of entities.</returns>
        private static ICollection<DateTimeOffset> ConvertShiftCollectionContract(ShiftCollectionContract content)
        {
            Debug.Assert(content != null, "content != null");

            // Create a new collection of rotating shifts
            var values = new List<DateTimeOffset>(content.Count);

            // Set the rotating shifts
            values.AddRange(content.Select(DateTimeOffset.Parse));

            // Return the collection
            return values;
        }