From 40d88ce9057babd28074afe803086bf415527dca Mon Sep 17 00:00:00 2001
From: lbsa71
Date: Thu, 19 Feb 2009 14:35:11 +0000
Subject: * Reverted the revert, as it seems the problem was the 1.0.* in the
separate projects.
---
Prebuild/src/Core/Targets/ToolInfo.cs | 197 ++++++++++++++++++++++++++++++++++
1 file changed, 197 insertions(+)
create mode 100644 Prebuild/src/Core/Targets/ToolInfo.cs
(limited to 'Prebuild/src/Core/Targets/ToolInfo.cs')
diff --git a/Prebuild/src/Core/Targets/ToolInfo.cs b/Prebuild/src/Core/Targets/ToolInfo.cs
new file mode 100644
index 0000000..935c674
--- /dev/null
+++ b/Prebuild/src/Core/Targets/ToolInfo.cs
@@ -0,0 +1,197 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Prebuild.Core.Targets
+{
+ ///
+ ///
+ ///
+ public struct ToolInfo
+ {
+ string name;
+ string guid;
+ string fileExtension;
+ string xmlTag;
+ string importProject;
+
+ ///
+ /// Gets or sets the name.
+ ///
+ /// The name.
+ public string Name
+ {
+ get
+ {
+ return name;
+ }
+ set
+ {
+ name = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the GUID.
+ ///
+ /// The GUID.
+ public string Guid
+ {
+ get
+ {
+ return guid;
+ }
+ set
+ {
+ guid = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the file extension.
+ ///
+ /// The file extension.
+ public string FileExtension
+ {
+ get
+ {
+ return fileExtension;
+ }
+ set
+ {
+ fileExtension = value;
+ }
+ }
+ public string LanguageExtension
+ {
+ get
+ {
+ switch (this.Name)
+ {
+ case "C#":
+ return ".cs";
+ case "VisualBasic":
+ return ".vb";
+ case "Boo":
+ return ".boo";
+ default:
+ return ".cs";
+ }
+ }
+ }
+ ///
+ /// Gets or sets the XML tag.
+ ///
+ /// The XML tag.
+ public string XmlTag
+ {
+ get
+ {
+ return xmlTag;
+ }
+ set
+ {
+ xmlTag = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the import project property.
+ ///
+ /// The ImportProject tag.
+ public string ImportProject
+ {
+ get
+ {
+ return importProject;
+ }
+ set
+ {
+ importProject = value;
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The name.
+ /// The GUID.
+ /// The file extension.
+ /// The XML.
+ /// The import project.
+ public ToolInfo(string name, string guid, string fileExtension, string xml, string importProject)
+ {
+ this.name = name;
+ this.guid = guid;
+ this.fileExtension = fileExtension;
+ this.xmlTag = xml;
+ this.importProject = importProject;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The name.
+ /// The GUID.
+ /// The file extension.
+ /// The XML.
+ public ToolInfo(string name, string guid, string fileExtension, string xml)
+ {
+ this.name = name;
+ this.guid = guid;
+ this.fileExtension = fileExtension;
+ this.xmlTag = xml;
+ this.importProject = "$(MSBuildBinPath)\\Microsoft." + xml + ".Targets";
+ }
+
+ ///
+ /// Equals operator
+ ///
+ /// ToolInfo to compare
+ /// true if toolInfos are equal
+ public override bool Equals(object obj)
+ {
+ if (obj == null)
+ {
+ throw new ArgumentNullException("obj");
+ }
+ if (obj.GetType() != typeof(ToolInfo))
+ return false;
+
+ ToolInfo c = (ToolInfo)obj;
+ return ((this.name == c.name) && (this.guid == c.guid) && (this.fileExtension == c.fileExtension) && (this.importProject == c.importProject));
+ }
+
+ ///
+ /// Equals operator
+ ///
+ /// ToolInfo to compare
+ /// ToolInfo to compare
+ /// True if toolInfos are equal
+ public static bool operator ==(ToolInfo c1, ToolInfo c2)
+ {
+ return ((c1.name == c2.name) && (c1.guid == c2.guid) && (c1.fileExtension == c2.fileExtension) && (c1.importProject == c2.importProject) && (c1.xmlTag == c2.xmlTag));
+ }
+
+ ///
+ /// Not equals operator
+ ///
+ /// ToolInfo to compare
+ /// ToolInfo to compare
+ /// True if toolInfos are not equal
+ public static bool operator !=(ToolInfo c1, ToolInfo c2)
+ {
+ return !(c1 == c2);
+ }
+
+ ///
+ /// Hash Code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ return name.GetHashCode() ^ guid.GetHashCode() ^ this.fileExtension.GetHashCode() ^ this.importProject.GetHashCode() ^ this.xmlTag.GetHashCode();
+
+ }
+ }
+}
--
cgit v1.1