PageRenderTime 14ms CodeModel.GetById 7ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/BlogEngine/BlogEngine.NET/App_Code/Extensions/CodeFormatter/CSharpFormat.cs

#
C# | 63 lines | 31 code | 4 blank | 28 comment | 0 complexity | 3586925dde7e9780347ef31f87f3d7d1 MD5 | raw file
 1#region Copyright © 2001-2003 Jean-Claude Manoli [jc@manoli.net]
 2/*
 3 * This software is provided 'as-is', without any express or implied warranty.
 4 * In no event will the author(s) be held liable for any damages arising from
 5 * the use of this software.
 6 * 
 7 * Permission is granted to anyone to use this software for any purpose,
 8 * including commercial applications, and to alter it and redistribute it
 9 * freely, subject to the following restrictions:
10 * 
11 *   1. The origin of this software must not be misrepresented; you must not
12 *      claim that you wrote the original software. If you use this software
13 *      in a product, an acknowledgment in the product documentation would be
14 *      appreciated but is not required.
15 * 
16 *   2. Altered source versions must be plainly marked as such, and must not
17 *      be misrepresented as being the original software.
18 * 
19 *   3. This notice may not be removed or altered from any source distribution.
20 */
21#endregion
22
23namespace CodeFormatter
24{
25    /// <summary>
26    /// Generates color-coded HTML 4.01 from C# source code.
27    /// </summary>
28    public class CSharpFormat : CLikeFormat
29    {
30        #region Properties
31
32        /// <summary>
33        ///     The list of C# keywords.
34        /// </summary>
35        protected override string Keywords
36        {
37            get
38            {
39                return "abstract as base bool break byte case catch char " +
40                       "checked class const continue decimal default delegate do double else " +
41                       "enum event explicit extern false finally fixed float for foreach goto " +
42                       "if implicit in int interface internal is lock long namespace new null " +
43                       "object operator out override partial params private protected public readonly " +
44                       "ref return sbyte sealed short sizeof stackalloc static string struct " +
45                       "switch this throw true try typeof uint ulong unchecked unsafe ushort " +
46                       "using value virtual void volatile where while yield";
47            }
48        }
49
50        /// <summary>
51        ///     The list of C# preprocessors.
52        /// </summary>
53        protected override string Preprocessors
54        {
55            get
56            {
57                return "#if #else #elif #endif #define #undef #warning #error #line #region #endregion #pragma";
58            }
59        }
60
61        #endregion
62    }
63}