_Core/Lang/Plugins/Parser/FluentPlugin.cs

(开头部分) 18KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using ComLib.Lang;
using ComLib.Lang.Helpers;

namespace ComLib.Lang.Extensions
{

    /* *************************************************************************
    <doc:example>	
    // Fluent plugin allows methods to be called in different ways instead of the 
    // typicall <class>.<method>( <arg1> ,<arg2 etc )
   
    // Supported ways of calling methods:
    // 1. <method> <class> .
    // 2. <method> <class> <arg1> <arg2> .
    // 3. <class>  <arg1>  <method> .
    // 4. <method> <class> <arg1_name> : <arg1_value>, <arg2_name> : <arg2_value> .
    // 5. <method> <class> <arg1>, 
    
    // FLUENT CALLS
    // Example 1 : method class
    activate user         
     
    // Example 2 : method class param1
    delete file c:\temp.txt.     
    
    // Example 3 : class param1 method
    file c:\temp.txt exists.
     
    // Example 4 : class method param1, named param2, named param3
    run program "msbuild.exe", solution: 'comlib.sln', mode: "debug", style: "rebuild all".      
     
    // The above calls translate to:
    // 1. user.activate();
    // 2. File.Delete("c:\temp.txt");
    // 3. File.Exists("c:\temp.txt")
    // 4. Program.Run("msbuild.exe", solution: "comlib.sln', mode: "debug", style: "rebuild all");
    // 5. orderToBuy( shares(300), "IBM", 40.50, new Date(2012, 3, 30), "premium policy")
    </doc:example>
    ***************************************************************************/
    /// <summary>
    /// Represents one of the parts of a fluent function/method call.
    /// </summary>
    public enum FluentPart
    {
        /// <summary>
        /// Fluent part not applicable.
        /// </summary>
        None,


        /// <summary>
        /// Class name
        /// </summary>
        Class,

后面还有 476 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。