directorydoozer.cs
来自「SharpDevelop2.0.0 c#开发免费工具」· CS 代码 · 共 35 行
CS
35 行
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision: 915 $</version>
// </file>
using System;
using System.Collections;
using System.IO;
namespace ICSharpCode.Core
{
/// <summary>
/// Creates path names using a relative to the folder containing the addin file.
/// </summary>
/// <attribute name="path" use="required">
/// Path relative to the directory which contains the .addin file defining the codon.
/// </attribute>
/// <usage>Where directory paths to a folder inside the addin directory are expected, e.g.
/// /SharpDevelop/BackendBindings/Templates</usage>
/// <returns>
/// A string containing the full path name.
/// </returns>
public class DirectoryDoozer : IDoozer
{
public bool HandleConditions { get { return false; } }
public object BuildItem(object caller, Codon codon, ArrayList subItems)
{
return Path.Combine(Path.GetDirectoryName(codon.AddIn.FileName), codon.Properties["path"]);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?