本文整理汇总了C#中FullPath.EnsureNonEmpty方法的典型用法代码示例。如果您正苦于以下问题:C# FullPath.EnsureNonEmpty方法的具体用法?C# FullPath.EnsureNonEmpty怎么用?C# FullPath.EnsureNonEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FullPath
的用法示例。
在下文中一共展示了FullPath.EnsureNonEmpty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PhpSourceFile
public PhpSourceFile(FullPath root, FullPath fullPath)
{
root.EnsureNonEmpty("root");
fullPath.EnsureNonEmpty("fullPath");
this.fullPath = fullPath;
this.relativePath = RelativePath.Empty;
this.root = root;
}
示例2: LoadFromFile
/// <summary>
/// Loads compiler configuration values from a specified .config file into a given record.
/// </summary>
/// <param name="appContext">Application context where to load libraries.</param>
/// <param name="path">A full path to the .config file.</param>
/// <returns>The new configuration record.</returns>
/// <exception cref="ConfigurationErrorsException">An error in configuration.</exception>
public void LoadFromFile(ApplicationContext/*!*/ appContext, FullPath path)
{
if (appContext == null)
throw new ArgumentNullException("appContext");
path.EnsureNonEmpty("path");
ConfigXmlDocument doc = new ConfigXmlDocument();
try
{
doc.Load(path);
}
catch (XmlException e)
{
throw new ConfigurationErrorsException(e.Message);
}
XmlNode root = doc.DocumentElement;
if (root.Name == "configuration")
{
ProcessNodes(appContext, root, addedLibraries);
}
}