Subtext.Framework.Format.UrlFormats.GetFeedbackEditLink C# (CSharp) 메소드

GetFeedbackEditLink() 공개 정적인 메소드

public static GetFeedbackEditLink ( FeedbackItem feedback ) : string
feedback Subtext.Framework.Components.FeedbackItem
리턴 string
        public static string GetFeedbackEditLink(FeedbackItem feedback)
        {
            if (feedback == null)
            {
                throw new ArgumentNullException("feedback");
            }

            //This is too small a concatenation to create a
            //the overhead of a StringBuilder. If perf is really a hit here,
            //we can pass in a string builder.
            String app = Config.CurrentBlog.Subfolder;

            string url = (String.IsNullOrEmpty(app)) ? "~" : "~/" + app;
            if (feedback.FeedbackType == FeedbackType.Comment||feedback.FeedbackType==FeedbackType.PingTrack)
            {
                url += "/Admin/Feedback/Default.aspx?return-to-post=true&FeedbackID=" + feedback.Id;
            }
            else
            {
                throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Feedback {0} not expected to have an edit link.", feedback.FeedbackType));
            }

            return url;
        }