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


C# DocumentConfig类代码示例

本文整理汇总了C#中DocumentConfig的典型用法代码示例。如果您正苦于以下问题:C# DocumentConfig类的具体用法?C# DocumentConfig怎么用?C# DocumentConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DocumentConfig类属于命名空间,在下文中一共展示了DocumentConfig类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ReadWorkspace

 protected ReadWorkspace(DocumentConfig path)
 {
     if (path == null)
     {
         throw new ArgumentNullException(nameof(path));
     }
     _path = new ConfigHelper<string>(path);
 }
开发者ID:st1pps,项目名称:Wyam,代码行数:8,代码来源:ReadWorkspace.cs

示例2: OrderBy

 public OrderBy(DocumentConfig key)
 {
     if (key == null)
     {
         throw new ArgumentNullException(nameof(key));
     }
     _key = key;
 }
开发者ID:st1pps,项目名称:Wyam,代码行数:8,代码来源:OrderBy.cs

示例3: Where

 /// <summary>
 /// Limits the documents passed to the child modules to those that satisfy the 
 /// supplied predicate. All original input documents are output without 
 /// modification regardless of whether they satisfy the predicate.
 /// </summary>
 /// <param name="predicate">A delegate that should return a <c>bool</c>.</param>
 public ConcatBranch Where(DocumentConfig predicate)
 {
     Func<IDocument, IExecutionContext, bool> currentPredicate = _predicate;
     _predicate = currentPredicate == null
         ? (Func<IDocument, IExecutionContext, bool>)(predicate.Invoke<bool>)
         : ((x, c) => currentPredicate(x, c) && predicate.Invoke<bool>(x, c));
     return this;
 }
开发者ID:martinvobr,项目名称:Wyam,代码行数:14,代码来源:ConcatBranch.cs

示例4: GenerateMeta

 /// <summary>
 /// Uses a function to determine a text template which is processed and added as metadata for each document. 
 /// This allows you to specify different metadata for each document depending on the input.
 /// </summary>
 /// <param name="key">The metadata key for the generated text.</param>
 /// <param name="template">A delegate that returns the template to use.</param>
 public GenerateMeta(string key, DocumentConfig template) : base(template)
 {
     if (key == null)
     {
         throw new ArgumentNullException(nameof(key));
     }
     _key = key;
 }
开发者ID:martinvobr,项目名称:Wyam,代码行数:14,代码来源:GenerateMeta.cs

示例5: Switch

 /// <summary>
 /// Defines the delegate that will be invoked against each input document to get the case comparison value.
 /// </summary>
 /// <param name="value">A delegate that returns an object to compare cases against.</param>
 public Switch(DocumentConfig value)
 {
     if (value == null)
     {
         throw new ArgumentNullException(nameof(value));
     }
     _value = value;
 }
开发者ID:ibebbs,项目名称:Wyam,代码行数:12,代码来源:Switch.cs

示例6: Documents

 // This will get documents based on each input document - the result will be the aggregate of all returned documents for each input document
 // The delegate should return a IEnumerable<IDocument>
 public Documents(DocumentConfig documents)
 {
     if (documents == null)
     {
         throw new ArgumentNullException(nameof(documents));
     }
     _documentDocuments = documents;
 }
开发者ID:mgnslndh,项目名称:Wyam,代码行数:10,代码来源:Documents.cs

示例7: ReadWorkspace

 protected ReadWorkspace(DocumentConfig path)
 {
     if (path == null)
     {
         throw new ArgumentNullException(nameof(path));
     }
     _pathDelegate = path;
 }
开发者ID:ibebbs,项目名称:Wyam,代码行数:8,代码来源:ReadWorkspace.cs

示例8: FileName

 /// <summary>
 /// Sets the metadata key <c>WriteFileName</c> to an optimized version of the return value of the delegate.
 /// Also sets the metadata key <c>WritePath</c> to <c>Path.Combine(RelativeFileDir, WriteFileName)</c>.
 /// </summary>
 /// <param name="fileName">A delegate that should return a <c>string</c> with the filename to optimize.</param>
 public FileName(DocumentConfig fileName)
 {
     if (fileName == null)
     {
         throw new ArgumentNullException(nameof(fileName));
     }
     _fileName = fileName;
 }
开发者ID:ryanrousseau,项目名称:Wyam,代码行数:13,代码来源:FileName.cs

示例9: Sitemap

 /// <summary>
 /// Creates a sitemap using the specified delegate which should return either a <c>string</c> that
 /// contains the location for each input document or a <c>SitemapItem</c> instance with the location
 /// and other information.
 /// </summary>
 /// <param name="sitemapItemOrLocation">A delegate that either returns a <c>SitemapItem</c> instance or a <c>string</c> 
 /// with the desired item location. If the delegate returns <c>null</c>, the input document is not added to the sitemap.</param>
 /// <param name="locationFormatter">A location formatter that will be applied to the location of each input after
 /// getting the value of the specified metadata key.</param>
 public Sitemap(DocumentConfig sitemapItemOrLocation, Func<string, string> locationFormatter = null)
 {
     if (sitemapItemOrLocation == null)
     {
         throw new ArgumentNullException(nameof(sitemapItemOrLocation));
     }
     _sitemapItemOrLocation = sitemapItemOrLocation;
     _locationFormatter = locationFormatter;
 }
开发者ID:ibebbs,项目名称:Wyam,代码行数:18,代码来源:Sitemap.cs

示例10: ThenBy

 public OrderBy ThenBy(DocumentConfig key)
 {
     if (key == null)
     {
         throw new ArgumentNullException(nameof(key));
     }
     _thenByList.Add(new ThenByEntry(key));
     return this;
 }
开发者ID:st1pps,项目名称:Wyam,代码行数:9,代码来源:OrderBy.cs

示例11: Meta

 /// <summary>
 /// Uses a function to determine an object to be added as metadata for each document. 
 /// This allows you to specify different metadata for each document depending on the input.
 /// </summary>
 /// <param name="key">The metadata key to set.</param>
 /// <param name="metadata">A delegate that returns the object to add as metadata.</param>
 public Meta(string key, DocumentConfig metadata)
 {
     if (key == null)
     {
         throw new ArgumentNullException(nameof(key));
     }
     _key = key;
     _metadata = new ConfigHelper<object>(metadata);
 }
开发者ID:martinvobr,项目名称:Wyam,代码行数:15,代码来源:Meta.cs

示例12: Meta

 public Meta(string key, DocumentConfig metadata)
 {
     if (key == null)
     {
         throw new ArgumentNullException(nameof(key));
     }
     _key = key;
     _metadata = metadata ?? ((x, y) => null);
 }
开发者ID:mgnslndh,项目名称:Wyam,代码行数:9,代码来源:Meta.cs

示例13: ReadFiles

        /// <summary>
        /// Reads all files that match the specified globbing patterns and/or absolute paths. This allows you to 
        /// specify different patterns and/or paths depending on the input.
        /// </summary>
        /// <param name="patterns">A delegate that returns one or more globbing patterns and/or absolute paths.</param>
        public ReadFiles(DocumentConfig patterns)
        {
            if (patterns == null)
            {
                throw new ArgumentNullException(nameof(patterns));
            }

            _patternsDelegate = patterns;
        }
开发者ID:ibebbs,项目名称:Wyam,代码行数:14,代码来源:ReadFiles.cs

示例14: GroupBy

 public GroupBy(DocumentConfig key, params IModule[] modules)
 {
     if (key == null)
     {
         throw new ArgumentNullException(nameof(key));
     }
     _key = key;
     _modules = modules;
 }
开发者ID:st1pps,项目名称:Wyam,代码行数:9,代码来源:GroupBy.cs

示例15: ReadFiles

        /// <summary>
        /// Reads all files that match the specified path. This allows you to specify different search paths depending on the input.
        /// </summary>
        /// <param name="path">A delegate that returns a <c>string</c> with the search path.</param>
        public ReadFiles(DocumentConfig path)
        {
            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }

            _path = path;
        }
开发者ID:Chandu,项目名称:Wyam,代码行数:13,代码来源:ReadFiles.cs


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