App_Code/Sidebar.cs

(开头部分) 14KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

//===============================================================================================
//
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.
//
//===============================================================================================

using System;
using System.Web;
using MyWebPagesStarterKit;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Xml;

namespace MyWebPagesStarterKit
{
    /// <summary>
    /// Manages sidebar sections including adding/removing them and returns sidebar rss data feed
    /// </summary>
    [Serializable]
    public class Sidebar : MyWebPagesStarterKit.Persistable<Sidebar.SidebarData>
    {
        #region Attributes
        /// <summary>
        /// Holds static reference to one and only sidebar instance
        /// </summary>
        private static Sidebar _instance;
        #endregion

        #region Private Singleton Methods
        /// <summary>
        /// Private constructor for the singleton instance
        /// </summary>
        private Sidebar() : base()
        {
            
        }

        /// <summary>
        /// Gets the one and only instance of sidebar, as it is a singleton
        /// </summary>
        /// <returns>Singleton sidebar instance</returns>
        public static Sidebar GetInstance()
        {
            if (_instance == null)
            {
                _instance = new Sidebar();
                if (File.Exists(HttpContext.Current.Server.MapPath(_instance.GetDataFilename())))
                {
                    _instance.LoadData();
                }
            }
            return _instance;
        }
        #endregion

        /// <summary>
后面还有 324 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。