📄 codedata.cs
字号:
{
return this.vsObjectReference;
}
set
{
this.vsObjectReference = value;
}
}
/// <summary>
/// Reference the parent object
/// </summary>
protected object parent;
public object Parent
{
get
{
return this.parent;
}
set
{
this.parent = value;
}
}
/// <summary>
/// Returns an String defining the parent namespace.
/// </summary>
private String parentNameSpaceName;
public String ParentNameSpaceName
{
get
{
return this.parentNameSpaceName;
}
set
{
this.parentNameSpaceName = value;
}
}
/// <summary>
/// This object used to help other data operator object can
/// attach some data with code data .
/// Such as using it in DataUI class, it's can attach the object
/// position and display property data.
/// </summary>
private object extendDataObject;
public object ExtendDataObject
{
get
{
return this.extendDataObject;
}
set
{
this.extendDataObject = value;
}
}
#endregion
}
/// <summary>
/// Solution Data Class
/// </summary>
public class SolutionData : ElementData
{
public SolutionData()
{
elementType = enumElementType.elementTypeSolution;
}
#region Solution Data
#endregion
}
/// <summary>
/// Project Data Class
/// </summary>
public class ProjectData : ElementData
{
public ProjectData()
{
elementType = enumElementType.elementTypeProject;
}
#region Project Data
#endregion
}
/// <summary>
/// ProjectItem Data Class
/// </summary>
public class ProjectItemData : ElementData
{
public ProjectItemData()
{
elementType = enumElementType.elementTypeProjectItem;
}
#region Project Item Data
#endregion
}
/// <summary>
/// Code Model Data
/// Always only one code model, but here I defined as a array to be used in future...
/// </summary>
public class CodeModelData : ElementData
{
public CodeModelData ()
{
elementType = enumElementType.elementTypeCodeModel;
languageName = null;
}
#region Code Model Data
/// <summary>
/// the Lauguate Name of this project
/// </summary>
private String languageName;
public String LanguageName
{
get
{
return this.languageName;
}
set
{
this.languageName = value;
}
}
#endregion
}
/// <summary>
/// Code Element Data
/// The code element should NOT exist, but for keep to consis with VS.NET CODE MODEL
/// </summary>
public class CodeElementsData : ElementData
{
public CodeElementsData()
{
elementType = enumElementType.elementTypeCodeElements;
}
#region Code Element Datas
#endregion
}
/// <summary>
/// NameSpace Data
/// </summary>
public class NameSpaceData : ElementData
{
public NameSpaceData()
{
elementType = enumElementType.elementTypeNameSpace;
}
#region Name Space Data
#endregion
}
/// <summary>
/// Class data
/// </summary>
public class ClassData : ElementData
{
public ClassData()
{
elementType = enumElementType.elementTypeClass;
isAbstract = false;
}
#region Class Data
/// <summary>
/// Array List contain Base class or Interface
/// **** Here ****
/// I can't give a good way to save the base class object because it's might cause
/// memory overflew.
/// So, I only save the base class name in the array list
/// I got a idea about this but it's cost more time to do, may be i'll do it later
/// Best Way : Object Pool
/// Save only object reference
/// </summary>
private ArrayList baseList = new ArrayList();
public ArrayList BaseList
{
get
{
return this.baseList;
}
}
/// <summary>
/// Sets or returns whether or not an item is declared as abstract.
/// </summary>
private bool isAbstract;
public bool IsAbstract
{
get
{
return this.isAbstract;
}
set
{
this.isAbstract = value;
}
}
#endregion
}
/// <summary>
/// Function Data
/// </summary>
public class FunctionData : ElementData
{
public FunctionData()
{
elementType = enumElementType.elementTypeFunction;
canOverride = false;
isOverloaded = false;
mustImplement = false;
isShared = false;
}
#region Function Data
/// <summary>
/// Sets or returns if the function can be overridden.
/// </summary>
private bool canOverride;
public bool CanOverride
{
get
{
return this.canOverride;
}
set
{
this.canOverride = value;
}
}
/// <summary>
/// Indicates whether or not a function is overloaded.
/// </summary>
private bool isOverloaded;
public bool IsOverloaded
{
get
{
return this.isOverloaded;
}
set
{
this.isOverloaded = value;
}
}
/// <summary>
/// Sets or returns whether or not the item is declared abstract and
/// thus requires an implementation.
/// </summary>
private bool mustImplement;
private bool MustImplement
{
get
{
return this.mustImplement;
}
set
{
this.mustImplement = value;
}
}
/// <summary>
/// Sets or returns whether or not the item is statically defined; that is,
/// if the item is common to all instances of this object type, or only to
/// this object specifically.
/// </summary>
private bool isShared;
public bool IsShared
{
get
{
return this.isShared;
}
set
{
this.isShared = value;
}
}
/// <summary>
/// Set and Returns an enumeration describing how a function is used.
/// </summary>
private enumFunctionType functionType;
public enumFunctionType FunctionType
{
get
{
return this.functionType;
}
set
{
this.functionType = value;
}
}
#endregion
}
/// <summary>
/// Struct data
/// </summary>
public class StructData : ElementData
{
public StructData()
{
elementType = enumElementType.elementTypeStruct;
isAbstract = false;
}
#region Struct Data
/// <summary>
/// Array List contain Base Struct or Interface
/// **** Here ****
/// I can't give a good way to save the base class object because it's might cause
/// memory overflew.
/// So, I only save the base class name in the array list
/// I got a idea about this but it's cost more time to do, may be i'll do it later
/// Best Way : Object Pool
/// Save only object reference
/// </summary>
private ArrayList baseList = new ArrayList();
public ArrayList BaseList
{
get
{
return this.baseList;
}
}
/// <summary>
/// Sets or returns whether or not an item is declared as abstract.
/// </summary>
private bool isAbstract;
public bool IsAbstract
{
get
{
return this.isAbstract;
}
set
{
this.isAbstract = value;
}
}
#endregion
}
/// <summary>
/// Interface data
/// </summary>
public class InterfaceData : ElementData
{
public InterfaceData()
{
elementType = enumElementType.elementTypeInterface;
}
#region Interface Data
/// <summary>
/// Array List contain Base Interface
/// **** Here ****
/// I can't give a good way to save the base class object because it's might cause
/// memory overflew.
/// So, I only save the base class name in the array list
/// I got a idea about this but it's cost more time to do, may be i'll do it later
/// Best Way : Object Pool
/// Save only object reference
/// </summary>
private ArrayList baseList = new ArrayList();
public ArrayList BaseList
{
get
{
return this.baseList;
}
}
#endregion
}
/// <summary>
/// Variable Data
/// </summary>
public class VariableData : ElementData
{
public VariableData()
{
elementType = enumElementType.elementTypeVariable;
isConstant = false;
isShared = false;
}
#region Variable Data
/// <summary>
/// Describes if this item is a constant or not.
/// </summary>
private bool isConstant;
public bool IsConstant
{
get
{
return this.isConstant;
}
set
{
this.isConstant = value;
}
}
/// <summary>
/// Sets or returns whether or not the item is statically defined; that is,
/// if the item is common to all instances of this object type, or only to
/// this object specifically.
/// </summary>
private bool isShared;
public bool IsShared
{
get
{
return this.isShared;
}
set
{
this.isShared = value;
}
}
/// <summary>
/// Sets or returns an object defining the initialization code for an element.
/// </summary>
private object initExpression;
public object InitExpression
{
get
{
return this.initExpression;
}
set
{
this.initExpression = value;
}
}
#endregion
}
/// <summary>
/// Enum Data
/// </summary>
public class EnumData : ElementData
{
public EnumData()
{
elementType = enumElementType.elementTypeEnum;
isDerivdedFrom = false;
}
#region Enum Data
/// <summary>
/// Returns whether an object has another object as a base.
/// </summary>
private bool isDerivdedFrom;
public bool IsDerivdedFrom
{
get
{
return this.isDerivdedFrom;
}
set
{
this.isDerivdedFrom = value;
}
}
#endregion
}
/// <summary>
/// Object representing a delegate in source code.
/// </summary>
public class DelegateData : ElementData
{
public DelegateData()
{
elementType = enumElementType.elementTypeDelegate;
}
#region Delegate Data
#endregion
}
/// <summary>
/// An object defining a property construct in a source file.
/// </summary>
public class PropertyData : ElementData
{
public PropertyData()
{
elementType = enumElementType.elementTypeProperty;
}
#region Property Data
// Change those two function to the members
// Modify 06/10/2002.
/*
/// <summary>
/// Sets or returns an object defining the code to return a property.
/// </summary>
private FunctionData getter;
public FunctionData Getter
{
get
{
return getter;
}
set
{
getter = value;
}
}
/// <summary>
/// Sets or returns an object defining the code to set a property.
/// </summary>
private FunctionData setter;
public FunctionData Setter
{
get
{
return setter;
}
set
{
setter = value;
}
}
*/
#endregion
}
/// <summary>
/// The function parameter data class
/// </summary>
public class ParameterData : ElementData
{
public ParameterData()
{
elementType = enumElementType.elementTypeParameter;
}
#region Element Data
#endregion
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -