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

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

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