本文整理汇总了C#中System.IO.Concat方法的典型用法代码示例。如果您正苦于以下问题:C# System.IO.Concat方法的具体用法?C# System.IO.Concat怎么用?C# System.IO.Concat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO
的用法示例。
在下文中一共展示了System.IO.Concat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetViewLocations
private void SetViewLocations()
{
//these are the originals:
//base.AreaViewLocationFormats = new string[] { "~/Areas/{2}/Views/{1}/{0}.cshtml", "~/Areas/{2}/Views/{1}/{0}.vbhtml", "~/Areas/{2}/Views/Shared/{0}.cshtml", "~/Areas/{2}/Views/Shared/{0}.vbhtml" };
//base.AreaMasterLocationFormats = new string[] { "~/Areas/{2}/Views/{1}/{0}.cshtml", "~/Areas/{2}/Views/{1}/{0}.vbhtml", "~/Areas/{2}/Views/Shared/{0}.cshtml", "~/Areas/{2}/Views/Shared/{0}.vbhtml" };
//base.AreaPartialViewLocationFormats = new string[] { "~/Areas/{2}/Views/{1}/{0}.cshtml", "~/Areas/{2}/Views/{1}/{0}.vbhtml", "~/Areas/{2}/Views/Shared/{0}.cshtml", "~/Areas/{2}/Views/Shared/{0}.vbhtml" };
//base.ViewLocationFormats = new string[] { "~/Views/{1}/{0}.cshtml", "~/Views/{1}/{0}.vbhtml", "~/Views/Shared/{0}.cshtml", "~/Views/Shared/{0}.vbhtml" };
//base.MasterLocationFormats = new string[] { "~/Views/{1}/{0}.cshtml", "~/Views/{1}/{0}.vbhtml", "~/Views/Shared/{0}.cshtml", "~/Views/Shared/{0}.vbhtml" };
//base.PartialViewLocationFormats = new string[] { "~/Views/{1}/{0}.cshtml", "~/Views/{1}/{0}.vbhtml", "~/Views/Shared/{0}.cshtml", "~/Views/Shared/{0}.vbhtml" };
//base.FileExtensions = new string[] { "cshtml", "vbhtml" };
var viewLocationsArray = new[]
{
string.Concat(Constants.PluginsLocation, "/{2}/Views/{1}/{0}.cshtml"),
string.Concat(Constants.PluginsLocation, "/{2}/Views/{1}/{0}.vbhtml")
};
//set all of the area view locations to the plugin folder
AreaViewLocationFormats = viewLocationsArray
.Concat(new[]
{
string.Concat(Constants.PluginsLocation, "/{2}/Views/Shared/{0}.cshtml"),
string.Concat(Constants.PluginsLocation, "/{2}/Views/Shared/{0}.vbhtml")
})
.ToArray();
AreaMasterLocationFormats = viewLocationsArray;
AreaPartialViewLocationFormats = new[]
{
//will be used when we have partial view and child action macros
string.Concat(Constants.PluginsLocation, "/{2}/Views/Partials/{0}.cshtml"),
string.Concat(Constants.PluginsLocation, "/{2}/Views/Partials/{0}.vbhtml"),
string.Concat(Constants.PluginsLocation, "/{2}/Views/MacroPartials/{0}.cshtml"),
string.Concat(Constants.PluginsLocation, "/{2}/Views/MacroPartials/{0}.vbhtml"),
//for partials
string.Concat(Constants.PluginsLocation, "/{2}/Views/{1}/{0}.cshtml"),
string.Concat(Constants.PluginsLocation, "/{2}/Views/{1}/{0}.vbhtml"),
string.Concat(Constants.PluginsLocation, "/{2}/Views/Shared/{0}.cshtml"),
string.Concat(Constants.PluginsLocation, "/{2}/Views/Shared/{0}.vbhtml")
};
}