当前位置: 首页>>代码示例>>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;未经允许,请勿转载。