本文整理汇总了C#中NAnt.VSNet.ProjectBase类的典型用法代码示例。如果您正苦于以下问题:C# ProjectBase类的具体用法?C# ProjectBase怎么用?C# ProjectBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProjectBase类属于NAnt.VSNet命名空间,在下文中一共展示了ProjectBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ManagedProjectReference
public ManagedProjectReference(XmlElement xmlDefinition, ReferencesResolver referencesResolver, ProjectBase parent, SolutionBase solution, TempFileCollection tfc, GacCache gacCache, DirectoryInfo outputDir)
: base(referencesResolver, parent)
{
if (xmlDefinition == null) {
throw new ArgumentNullException("xmlDefinition");
}
if (solution == null) {
throw new ArgumentNullException("solution");
}
if (tfc == null) {
throw new ArgumentNullException("tfc");
}
if (gacCache == null) {
throw new ArgumentNullException("gacCache");
}
XmlAttribute privateAttribute = xmlDefinition.Attributes["Private"];
if (privateAttribute != null) {
_isPrivateSpecified = true;
_isPrivate = bool.Parse(privateAttribute.Value);
}
// determine path of project file
string projectFile = solution.GetProjectFileFromGuid(
xmlDefinition.GetAttribute("Project"));
// load referenced project
_project = LoadProject(solution, tfc, gacCache, outputDir, projectFile);
}
示例2: ManagedWrapperReference
public ManagedWrapperReference(XmlElement xmlDefinition, ReferencesResolver referencesResolver, ProjectBase parent, GacCache gacCache, ProjectSettings projectSettings)
: base(xmlDefinition, referencesResolver, parent, gacCache)
{
if (projectSettings == null) {
throw new ArgumentNullException("projectSettings");
}
_projectSettings = projectSettings;
// determine name of wrapper reference
XmlAttribute wrapperNameAttribute = XmlDefinition.Attributes["Name"];
if (wrapperNameAttribute != null) {
_name = wrapperNameAttribute.Value;
}
// determine wrapper tool
XmlAttribute toolAttribute = XmlDefinition.Attributes["WrapperTool"];
if (toolAttribute == null) {
throw new BuildException(string.Format(CultureInfo.InvariantCulture,
"Wrapper tool for reference \"{0}\" in project \"{1}\" could"
+ " not be determined.", Name, Parent.Name),
Location.UnknownLocation);
}
_wrapperTool = toolAttribute.Value;
// determine if there's a primary interop assembly for the typelib
_primaryInteropAssembly = GetPrimaryInteropAssembly();
// determine filename of wrapper assembly
_wrapperAssembly = ResolveWrapperAssembly();
}
示例3: VcConfigurationBase
protected VcConfigurationBase(XmlElement elem, ProjectBase parentProject, DirectoryInfo outputDir)
: base(parentProject)
{
if (elem == null) {
throw new ArgumentNullException("elem");
}
// output directory override (if specified)
_outputDir = outputDir;
// get name of configuration (also contains the targeted platform)
_name = elem.GetAttribute("Name");
XmlNodeList tools = elem.GetElementsByTagName("Tool");
foreach (XmlElement toolElem in tools) {
string toolName = toolElem.GetAttribute("Name");
Hashtable htToolSettings = CollectionsUtil.CreateCaseInsensitiveHashtable();
foreach(XmlAttribute attr in toolElem.Attributes) {
if (attr.Name != "Name") {
htToolSettings[attr.Name] = attr.Value;
}
}
Tools[toolName] = htToolSettings;
}
}
示例4: MSBuildProjectReference
public MSBuildProjectReference(
ReferencesResolver referencesResolver, ProjectBase parent,
ProjectBase project, bool isPrivateSpecified, bool isPrivate)
:base(referencesResolver, parent) {
_helper = new MSBuildReferenceHelper(isPrivateSpecified, isPrivate);
_project = project;
}
示例5: ConfigurationBase
/// <summary>
/// Initializes a new instance of the <see cref="ConfigurationBase" />
/// class with the given <see cref="ProjectBase" />.
/// </summary>
/// <param name="project">The project of the configuration.</param>
protected ConfigurationBase(ProjectBase project) {
if (project == null) {
throw new ArgumentNullException("project");
}
_project = project;
_extraOutputFiles = CollectionsUtil.CreateCaseInsensitiveHashtable();
}
示例6: FileReferenceBase
protected FileReferenceBase(XmlElement xmlDefinition, ReferencesResolver referencesResolver, ProjectBase parent, GacCache gacCache) : base(referencesResolver, parent) {
if (xmlDefinition == null) {
throw new ArgumentNullException("xmlDefinition");
}
if (gacCache == null) {
throw new ArgumentNullException("gacCache");
}
_xmlDefinition = xmlDefinition;
_gacCache = gacCache;
}
示例7: MSBuildAssemblyReference
public MSBuildAssemblyReference(XmlElement xe, ReferencesResolver referencesResolver, ProjectBase parent, GacCache gacCache, string name, string priv, string hintpath)
: base(new DummyXmlElement(xe.OwnerDocument), referencesResolver, parent, gacCache)
{
if (name.Contains(",")) {
//fully specified reference. Hmmm - just ignore it for now.
name = name.Split(',')[0];
if (hintpath.Length == 0) //hintpath workaround
hintpath = "." + Path.DirectorySeparatorChar + name + ".dll";
}
_name = name;
_helper = new MSBuildReferenceHelper(priv, false);
_hintpath = hintpath;
_assemblyFile = ResolveAssemblyReference();
}
示例8: ManagedAssemblyReference
public ManagedAssemblyReference(XmlElement xmlDefinition, ReferencesResolver referencesResolver, ProjectBase parent, GacCache gacCache) : base(xmlDefinition, referencesResolver, parent, gacCache) {
XmlAttribute privateAttribute = xmlDefinition.Attributes["Private"];
if (privateAttribute != null) {
_isPrivateSpecified = true;
_isPrivate = bool.Parse(privateAttribute.Value);
}
// determine name of reference
XmlAttribute assemblyNameAttribute = XmlDefinition.Attributes["AssemblyName"];
if (assemblyNameAttribute != null) {
_name = assemblyNameAttribute.Value;
}
_assemblyFile = ResolveAssemblyReference();
}
示例9: VcAssemblyReference
public VcAssemblyReference(XmlElement xmlDefinition, ReferencesResolver referencesResolver, ProjectBase parent, GacCache gacCache) : base(xmlDefinition, referencesResolver, parent, gacCache) {
XmlAttribute privateAttribute = xmlDefinition.Attributes["CopyLocal"];
if (privateAttribute != null) {
_isPrivateSpecified = true;
_isPrivate = bool.Parse(privateAttribute.Value);
}
// determine name of reference by taking filename part of relative
// path, without extension
XmlAttribute relativePathAttribute = XmlDefinition.Attributes["RelativePath"];
if (relativePathAttribute != null) {
_name = Path.GetFileNameWithoutExtension(relativePathAttribute.Value);
}
_assemblyFile = ResolveAssemblyReference();
}
示例10: VcWrapperReference
public VcWrapperReference(XmlElement xmlDefinition, ReferencesResolver referencesResolver, ProjectBase parent, GacCache gacCache) : base(xmlDefinition, referencesResolver, parent, gacCache) {
// determine name of type library
_name = GetTypeLibraryName(GetTypeLibrary());
// determine wrapper tool
XmlAttribute toolAttribute = XmlDefinition.Attributes["WrapperTool"];
if (toolAttribute == null) {
throw new BuildException(string.Format(CultureInfo.InvariantCulture,
"Wrapper tool for reference \"{0}\" in project \"{1}\" could"
+ " not be determined.", Name, Parent.Name),
Location.UnknownLocation);
}
_wrapperTool = toolAttribute.Value;
// determine if there's a primary interop assembly for the typelib
_primaryInteropAssembly = GetPrimaryInteropAssembly();
// determine filename of wrapper assembly
_wrapperAssembly = ResolveWrapperAssembly();
}
示例11: CreateProjectReference
public override ProjectReferenceBase CreateProjectReference(ProjectBase project, bool isPrivateSpecified, bool isPrivate)
{
return new VcProjectReference(project, this, isPrivateSpecified,
isPrivate);
}
示例12: Contains
/// <summary>
/// Determines whether a <see cref="ProjectBase"/> is in the collection.
/// </summary>
/// <param name="item">The <see cref="ProjectBase"/> to locate in the collection.</param>
/// <returns>
/// <see langword="true" /> if <paramref name="item"/> is found in the
/// collection; otherwise, <see langword="false" />.
/// </returns>
public bool Contains(ProjectBase item)
{
return base.List.Contains(item);
}
示例13: AddRange
/// <summary>
/// Adds the elements of a <see cref="ProjectBase"/> array to the end of the collection.
/// </summary>
/// <param name="items">The array of <see cref="ProjectBase"/> elements to be added to the end of the collection.</param>
public void AddRange(ProjectBase[] items)
{
for (int i = 0; (i < items.Length); i = (i + 1)) {
Add(items[i]);
}
}
示例14: Add
/// <summary>
/// Adds a <see cref="ProjectBase"/> to the end of the collection.
/// </summary>
/// <param name="item">The <see cref="ProjectBase"/> to be added to the end of the collection.</param>
/// <returns>The position into which the new element was inserted.</returns>
public int Add(ProjectBase item)
{
return base.List.Add(item);
}
示例15: WrapperReferenceBase
/// <summary>
/// Initializes a new instance of the <see cref="WrapperReferenceBase"/> class.
/// </summary>
/// <param name="xmlDefinition">The XML definition.</param>
/// <param name="referencesResolver">The references resolver.</param>
/// <param name="parent">The parent.</param>
/// <param name="gacCache">The gac cache.</param>
protected WrapperReferenceBase(XmlElement xmlDefinition, ReferencesResolver referencesResolver, ProjectBase parent, GacCache gacCache)
: base(xmlDefinition, referencesResolver, parent, gacCache)
{
}