Ejemplo n.º 1
0
        public static TrackbackManager GetInstance()
        {
            lock (typeof(TrackbackManager))
            {
                if( instance == null )
                    instance = new TrackbackManager();

                return instance;
            }
        }
Ejemplo n.º 2
0
        public static TrackbackManager GetInstance()
        {
            lock (typeof(TrackbackManager))
            {
                if (instance == null)
                {
                    instance = new TrackbackManager();
                }

                return(instance);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 트랙백을 받는다.
        /// </summary>
        /// <param name="articleNo"></param>
        /// <param name="context"></param>
        /// <returns></returns>
        public bool ReceiveTrackback(int articleNo, HttpContext context)
        {
            TrackbackModel model = new TrackbackModel();

            model.ArticleNo = articleNo;
            model.Url       = GetParamString("url", context);
            model.Blog_Name = GetParamString("blog_name", context);
            model.Title     = GetParamString("title", context);
            model.Exceprt   = GetParamString("exceprt", context);
            model.UserIP    = context.Request.UserHostAddress;

            if (model.Url == null || model.Blog_Name == null || model.Title == null)
            {
                WriteXml("1", "REQUIRED PARAMETER IS MISSING", context);
                return(false);
            }

            TrackbackManager.GetInstance().InsertTrackback(model);
            WriteXml("0", "Registed Trackback", context);

            return(true);
        }