Пример #1
0
        internal static string GetContentTypeToMarkup(SegmentSection.ContentType contentType, string contentText, string contentId)
        {
            var rs = "";

            switch (contentType)
            {
            case SegmentSection.ContentType.Text:
            {
                //ignore
            } break;

            case SegmentSection.ContentType.Tag:
            {
                rs = "<xProtected_ type=\"" + contentType.ToString() + "\" id=\"" + contentId + "\">" + contentText + "</xProtected_>";
            } break;

            case SegmentSection.ContentType.TagClosing:
            {
                rs = "<xProtected_ type=\"" + contentType.ToString() + "\" id=\"" + contentId + "\">" + contentText + "</xProtected_>";
            } break;

            case SegmentSection.ContentType.Placeholder:
            {
                rs = "<xProtected_ type=\"" + contentType.ToString() + "\" id=\"" + contentId + "\">" + contentText + "</xProtected_>";
            } break;

            case SegmentSection.ContentType.LockedContent:
            {
                rs = "<xProtected_ type=\"" + contentType.ToString() + "\" id=\"" + contentId + "\">" + contentText + "</xProtected_>";
            } break;
            }

            return(rs);
        }
Пример #2
0
        internal static string GetContentTypeToMarkup(SegmentSection.ContentType contentType, string contentText, string contentId)
        {
            var rs = "";

            switch (contentType)
            {
            case SegmentSection.ContentType.Text:
            {
                //ignore
            } break;

            case SegmentSection.ContentType.Tag:
            {
                rs = "<xProtected_ type=\"" + contentType + "\" id=\"" + contentId + "\">" + contentText + "</xProtected_>";
            } break;

            case SegmentSection.ContentType.TagClosing:
            {
                rs = "<xProtected_ type=\"" + contentType + "\" id=\"" + contentId + "\">" + contentText + "</xProtected_>";
            } break;

            case SegmentSection.ContentType.Placeholder:
            {
                rs = "<xProtected_ type=\"" + contentType + "\" id=\"" + contentId + "\">" + contentText + "</xProtected_>";
            } break;

            case SegmentSection.ContentType.LockedContent:
            {
                rs = "<xProtected_ type=\"" + contentType + "\" id=\"" + contentId + "\">" + contentText + "</xProtected_>";
            } break;

            default:
                throw new ArgumentOutOfRangeException("contentType", contentType, null);
            }

            return(rs);
        }