Exemplo n.º 1
0
        /// <summary>
        /// Converts a value returned from a LearningStore query to a
        /// <c>CorrectResponseItemIdentifier</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 CorrectResponseItemIdentifier result)
        {
            LearningStoreItemIdentifier id;

            CastNonNull(value, out id);
            result = new CorrectResponseItemIdentifier(id);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Converts a value returned from a LearningStore query to a
        /// <c>CorrectResponseItemIdentifier</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 CorrectResponseItemIdentifier result)
        {
            LearningStoreItemIdentifier id;

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