Click here to Skip to main content
15,884,472 members
Articles / Programming Languages / C#

C# CodeDOM parser

Rate me:
Please Sign up or sign in to vote.
4.56/5 (14 votes)
27 Jun 20026 min read 247.7K   4.3K   70  
This is a utility which parses C# source code and creates the CODEDOM tree of the code.
// Enums.cs: Different enumerations 
//
// Written by IZ for purposes of CS CODEDOM Parser, 2002
//(c) 2002 Ivan Zderadicka (ivan.zderadicka@seznam.cz)
using System;

namespace IvanZ.CSParser
{
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	public enum Types
	{
		Class,
		Interface,
		Struct,
		Enum,
		Delegate
	}

	public enum Members
	{
		Constant,
		Field,
		Method,
		Property,
		Event,
		Indexer,
		Operator,
		Constructor,
		StaticConstructor,
		Destructor,
		NestedType
	}

	[Flags]
	public enum ModifierAttribs
	{
		// Access 
		Private   = 0x0001,
		Internal  = 0x0002,
		Protected = 0x0004,
		Public    = 0x0008,
	 
		// Scope
		Abstract  = 0x0010, 
		Virtual   = 0x0020,
		Sealed    = 0x0040,
		Static    = 0x0080,
		Override  = 0x0100,
		Readonly  = 0x0200,
		Const	  = 0X0400,
		New       = 0x0800,
	 	 
		// Special 
		Extern    = 0x1000,
		Volatile  = 0x2000,
		Unsafe    = 0x4000
	}

	public enum ParamModifiers
	{
		In,
		Out,
		Ref
	}

	[Flags]
	public enum AttributeTargets
	{
		Assembly=0x0001,
		Field=0x0002,
	    Event=0x0004,
	    Method=0x0008,
	    Module=0x0010,
	    Param=0x0020,
	    Property=0x0040,
	    Return=0x0080,
	    Type=0x0100 

	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Czech Republic Czech Republic
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions