• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# DocumentConfig类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: WriteFiles

        /// <summary>
        /// Uses a delegate to describe where to write the content of each document. 
        /// The output of the function should be either a full path to the disk 
        /// location (including file name) or a path relative to the output folder.
        /// </summary>
        /// <param name="path">A delegate that returns a <c>string</c> with the desired path.</param>
        public WriteFiles(DocumentConfig path)
        {
            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }

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


示例17: Sidecar

        /// <summary>
        /// Uses a delegate to describe where to find the sidecar file for each input document.
        /// If a sidecar file is found, it's content is passed to the specified child modules for processing.
        /// </summary>
        /// <param name="sidecarPath">A delegate that returns a <see cref="FilePath"/> with the desired sidecar path.</param>
        /// <param name="modules">The modules to execute against the sidecar file.</param>
        public Sidecar(DocumentConfig sidecarPath, params IModule[] modules)
        {
            if (sidecarPath == null)
            {
                throw new ArgumentNullException(nameof(sidecarPath));
            }

            _sidecarPath = sidecarPath;
            _modules = modules;
        }
开发者ID:ibebbs,项目名称:Wyam,代码行数:16,代码来源:Sidecar.cs


示例18: Append

 /// <summary>
 /// Appends the string value of the returned object to to content of each document. 
 /// This allows you to specify different content to append for each document depending 
 /// on the input document.
 /// </summary>
 /// <param name="content">A delegate that returns the content to append.</param>
 public Append(DocumentConfig content)
     : base(content)
 {
 }
开发者ID:ryanrousseau,项目名称:Wyam,代码行数:10,代码来源:Append.cs


示例19: ContentModule

 protected ContentModule(DocumentConfig content)
 {
     _content = new ConfigHelper<object>(content);
 }
开发者ID:martinvobr,项目名称:Wyam,代码行数:4,代码来源:ContentModule.cs


示例20: UnwrittenFiles

 public UnwrittenFiles(DocumentConfig path)
     : base(path)
 {
 }
开发者ID:JasonKoopmans,项目名称:Wyam,代码行数:4,代码来源:UnwrittenFiles.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DocumentContext类代码示例发布时间:2022-05-24
下一篇:
C# DocumentCollection类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap