當前位置: 首頁>>代碼示例>>C#>>正文


C# VSNet.ProjectBase類代碼示例

本文整理匯總了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);
        }
開發者ID:smaclell,項目名稱:NAnt,代碼行數:29,代碼來源:ManagedProjectReference.cs

示例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();
        }
開發者ID:julianhaslinger,項目名稱:nant,代碼行數:31,代碼來源:ManagedWrapperReference.cs

示例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;
            }
        }
開發者ID:smaclell,項目名稱:NAnt,代碼行數:27,代碼來源:VcConfigurationBase.cs

示例4: MSBuildProjectReference

        public MSBuildProjectReference(
            ReferencesResolver referencesResolver, ProjectBase parent,
            ProjectBase project, bool isPrivateSpecified, bool isPrivate)

            :base(referencesResolver, parent) {
            _helper = new MSBuildReferenceHelper(isPrivateSpecified, isPrivate);
            _project = project;
        }
開發者ID:RoastBoy,項目名稱:nant,代碼行數:8,代碼來源:MSBuildProjectReference.cs

示例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();
        }
開發者ID:RoastBoy,項目名稱:nant,代碼行數:13,代碼來源:ConfigurationBase.cs

示例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;
        }
開發者ID:RoastBoy,項目名稱:nant,代碼行數:11,代碼來源:FileReferenceBase.cs

示例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();
 }
開發者ID:smaclell,項目名稱:NAnt,代碼行數:14,代碼來源:MSBuildAssemblyReference.cs

示例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();
        }
開發者ID:RoastBoy,項目名稱:nant,代碼行數:15,代碼來源:ManagedAssemblyReference.cs

示例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();
        }
開發者ID:RoastBoy,項目名稱:nant,代碼行數:16,代碼來源:VcAssemblyReference.cs

示例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();
        }
開發者ID:RoastBoy,項目名稱:nant,代碼行數:20,代碼來源:VcWrapperReference.cs

示例11: CreateProjectReference

 public override ProjectReferenceBase CreateProjectReference(ProjectBase project, bool isPrivateSpecified, bool isPrivate)
 {
     return new VcProjectReference(project, this, isPrivateSpecified,
         isPrivate);
 }
開發者ID:TheGreatMasterG,項目名稱:nant,代碼行數:5,代碼來源:VcProject.cs

示例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);
 }
開發者ID:smaclell,項目名稱:NAnt,代碼行數:12,代碼來源:ProjectBase.cs

示例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]);
     }
 }
開發者ID:smaclell,項目名稱:NAnt,代碼行數:10,代碼來源:ProjectBase.cs

示例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);
 }
開發者ID:smaclell,項目名稱:NAnt,代碼行數:9,代碼來源:ProjectBase.cs

示例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)
 {
 }
開發者ID:nantos,項目名稱:nant,代碼行數:11,代碼來源:WrapperReferenceBase.cs


注:本文中的NAnt.VSNet.ProjectBase類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。