Beispiel #1
0
        /// <summary>
        /// Converts a value returned from a LearningStore query to a
        /// <c>ActivityObjectiveItemIdentifier</c>.  Throws an exception if the value is
        /// <c>DBNull</c>.
        /// </summary>
        ///
        /// <param name="value">A value from a <c>DataRow</c> within a <c>DataTable</c>
        /// returned from a LearningStore query.</param>
        ///
        /// <param name="result">Where to store the result.</param>
        ///
        public static void CastNonNull(object value, out ActivityObjectiveItemIdentifier result)
        {
            LearningStoreItemIdentifier id;

            CastNonNull(value, out id);
            result = new ActivityObjectiveItemIdentifier(id);
        }
Beispiel #2
0
        /// <summary>
        /// Converts a value returned from a LearningStore query to a
        /// <c>ActivityObjectiveItemIdentifier</c>, or <c>null</c> if the value is <c>DBNull</c>.
        /// </summary>
        ///
        /// <param name="value">A value from a <c>DataRow</c> within a <c>DataTable</c>
        /// returned from a LearningStore query.</param>
        ///
        /// <param name="result">Where to store the result.</param>
        ///
        public static void Cast(object value, out ActivityObjectiveItemIdentifier result)
        {
            LearningStoreItemIdentifier id;

            Cast(value, out id);
            result = (id == null) ? null : new ActivityObjectiveItemIdentifier(id);
        }