Example #1
0
        //////////////////////////////////////////////////////////////////////////////////////////////
        // Internal Methods
        //

        /// <summary>
        /// Initializes an instance of this class.
        /// </summary>
        ///
        /// <param name="value">The value of the <c>Value</c> property.</param>
        ///
        /// <param name="sortKey">The value of the <c>SortKey</c> property.</param>
        ///
        /// <param name="id">The value of the <c>Id</c> property.</param>
        ///
        /// <param name="toolTip">The value of the <c>ToolTip</c> property.</param>
        ///
        /// <param name="wrap">The value of the <c>Wrap</c> property.</param>
        ///
        /// <param name="spSiteGuid">The value of the <c>SPSiteGuid</c> property.</param>
        ///
        /// <param name="spWebGuid">The value of the <c>SPWebGuid</c> property.</param>
        ///
        /// <param name="spWebUrl">The value of the <c>SPWebUrl</c> property.</param>
        ///
        internal WebNameRenderedCell(object value, object sortKey, LearningStoreItemIdentifier id,
                                     string toolTip, bool wrap, Guid spSiteGuid, Guid spWebGuid, string spWebUrl) :
            base(value, sortKey, id, toolTip, wrap)
        {
            m_spSiteGuid = spSiteGuid;
            m_spWebGuid  = spWebGuid;
            m_spWebUrl   = spWebUrl;
            RenderAsLink = true;
        }
        //////////////////////////////////////////////////////////////////////////////////////////////
        // Internal Methods
        //

        /// <summary>
        /// Initializes an instance of this class.
        /// </summary>
        ///
        /// <param name="value">The value of the <c>Value</c> property.</param>
        ///
        /// <param name="sortKey">The value of the <c>SortKey</c> property.</param>
        ///
        /// <param name="id">The value of the <c>Id</c> property.</param>
        ///
        /// <param name="toolTip">The value of the <c>ToolTip</c> property.</param>
        ///
        /// <param name="wrap">The value of the <c>Wrap</c> property.</param>
        ///
        internal RenderedCell(object value, object sortKey, LearningStoreItemIdentifier id,
                              string toolTip, bool wrap)
        {
            m_value   = value;
            m_sortKey = sortKey;
            m_id      = id;
            m_toolTip = toolTip;
            m_wrap    = wrap;
        }
Example #3
0
 /// <summary>
 /// Converts a value returned from a LearningStore query to a
 /// <c>LearningStoreItemIdentifier</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 LearningStoreItemIdentifier result)
 {
     if (value is DBNull)
     {
         throw new ArgumentException("Unexpected DBNull value");
     }
     else
     {
         result = (LearningStoreItemIdentifier)value;
     }
 }
Example #4
0
        [SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods")] // parameter is verified
        public static string GetValueAsParameter(LearningStoreItemIdentifier value)
        {
            FramesetUtil.ValidateNonNullParameter("value", value);

            return(value.GetKey().ToString(NumberFormatInfo.InvariantInfo));
        }
Example #5
0
        [SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods")] // parameter is verified
        public static string GetValueAsParameter(LearningStoreItemIdentifier value)
        {
            FramesetUtil.ValidateNonNullParameter("value", value);

            return value.GetKey().ToString(NumberFormatInfo.InvariantInfo);
        }
Example #6
0
 [SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods")] // parameter is validated
 public static string GetString(LearningStoreItemIdentifier id)
 {
     ValidateNonNullParameter("id", id);
     return(id.GetKey().ToString(NumberFormatInfo.InvariantInfo));
 }
Example #7
0
 [SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods")] // parameter is validated
 public static string GetString(LearningStoreItemIdentifier id)
 {
     ValidateNonNullParameter("id", id);
     return id.GetKey().ToString(NumberFormatInfo.InvariantInfo);
 }