コード例 #1
0
        /// <summary>
        /// Converts a value returned from a LearningStore query to a
        /// <c>ActivityAttemptItemIdentifier</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 ActivityAttemptItemIdentifier result)
        {
            LearningStoreItemIdentifier id;

            CastNonNull(value, out id);
            result = new ActivityAttemptItemIdentifier(id);
        }
コード例 #2
0
        /// <summary>
        /// Converts a value returned from a LearningStore query to a
        /// <c>ActivityAttemptItemIdentifier</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 ActivityAttemptItemIdentifier result)
        {
            LearningStoreItemIdentifier id;

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