当前位置: 首页>>代码示例>>C#>>正文


C# System.IO.Concat方法代码示例

本文整理汇总了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")
				};

		}
开发者ID:elrute,项目名称:Triphulcas,代码行数:44,代码来源:PluginViewEngine.cs


注:本文中的System.IO.Concat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。