Exemplo n.º 1
0
 public static IMarkdownContext SetDependency(this IMarkdownContext context, HashSet<string> dependency)
 {
     if (context == null)
     {
         throw new ArgumentNullException(nameof(context));
     }
     return context.CreateContext(context.Variables.SetItem(DependencyKey, dependency));
 }
Exemplo n.º 2
0
 public static IMarkdownContext SetBaseFolder(this IMarkdownContext context, string baseFolder)
 {
     if (context == null)
     {
         throw new ArgumentNullException(nameof(context));
     }
     return context.CreateContext(context.Variables.SetItem(BaseFolderKey, baseFolder));
 }
Exemplo n.º 3
0
 public static IMarkdownContext SetFilePathStack(this IMarkdownContext context, ImmutableStack<string> filePathStack)
 {
     if (context == null)
     {
         throw new ArgumentNullException(nameof(context));
     }
     return context.CreateContext(context.Variables.SetItem(FilePathStackKey, filePathStack));
 }
Exemplo n.º 4
0
        public static IMarkdownContext SetFallbackFolders(this IMarkdownContext context, IReadOnlyList<string> fallbackFolders)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            return context.CreateContext(context.Variables.SetItem(FallbackFoldersKey, (IReadOnlyList<string>)fallbackFolders.Select(folder => folder.Replace('/', '\\')).ToList()));
        }
Exemplo n.º 5
0
 public static IMarkdownContext SetIsInclude(this IMarkdownContext context)
 {
     if (context == null)
     {
         throw new ArgumentNullException(nameof(context));
     }
     return context.CreateContext(context.Variables.SetItem(IsIncludeKey, null));
 }
 public static Microsoft.AspNet.Http.HttpContext CreateContext(this System.Web.HttpContext systemWebHttpContext)
 {
     return systemWebHttpContext.CreateContext(null);
 }