using System;
using System.Collections;
namespace AnticipatingMinds.Genesis.CodeDOM{
/// <summary>
/// Represents an assembly file.
/// </summary>
/// <remarks>
/// CodeAssemblyFile represents an assembly file and can be a source code file , resource file,
/// image or any other kind of a file included in the assembly.</remarks>
[Serializable()]
public abstract class CodeAssemblyFile
{
/// <summary>
/// Initializes new instance of <see cref="CodeAssemblyFile"/> class.
/// </summary>
protected CodeAssemblyFile()
{
}
/// <summary>
/// Gets or sets an assembly to which compile unit belongs.
/// </summary>
public CodeAssembly Assembly
{
get
{
return codeAssembly;
}
set
{
codeAssembly = value;
}
}
/// <summary>
/// Name of the source file for this compile unit.
/// </summary>
public string SourceFileName
{
get
{
return sourceFileName;
}
set
{
sourceFileName = value;
}
}
/// <summary>
/// Gets or sets compile unit source code language.
/// </summary>
public virtual CodeLanguage Language
{
get
{
return sourceCodeLanguage;
}
set
{
sourceCodeLanguage = value;
}
}
public virtual bool IsCaseSensitive
{
get
{
return Language == CodeLanguage.CSharp;
}
}
/// <summary>
/// Gets a dictinary object to store any data associated with code element.
/// </summary>
public IDictionary ApplicationData
{
get
{
if(applicationData == null)
{
lock(this)
{
if(applicationData == null)
applicationData = new Hashtable() as IDictionary;
}
}
return applicationData;
}
}
private string sourceFileName = string.Empty;
private CodeAssembly codeAssembly;
private IDictionary applicationData = null;
private CodeLanguage sourceCodeLanguage = CodeLanguage.Unknown;
}
}
|