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


C# Arguments.CoerceAndAdd方法代码示例

本文整理汇总了C#中System.Arguments.CoerceAndAdd方法的典型用法代码示例。如果您正苦于以下问题:C# Arguments.CoerceAndAdd方法的具体用法?C# Arguments.CoerceAndAdd怎么用?C# Arguments.CoerceAndAdd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Arguments的用法示例。


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

示例1: lt

/// <summary>
/// <para>Test if the first value is less than other.</para>
/// </summary>
/// <example><para>Example: Is 2 less than 2?</para>
/// <code>r.expr(2).lt(2).run(conn, callback)
/// </code></example>
                        public Lt lt ( Object exprA, params object[] exprs )
                        {
                        Arguments arguments = new Arguments(this);
                                arguments.CoerceAndAdd(exprA);
                                arguments.CoerceAndAddAll(exprs);
                        return new Lt (arguments );
                        }
开发者ID:gitter-badger,项目名称:RethinkDb.Driver,代码行数:13,代码来源:ReqlExpr.cs

示例2: typeOf_

/// <summary>
/// <para>Gets the type of a value.</para>
///</summary>
/// <example><para>Example: Get the type of a string.</para>
/// <code>r.expr("foo").typeOf().run(conn, callback)
/// </code></example>
                    public TypeOf typeOf_ ( Object expr )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAdd(expr);
                        return new TypeOf (arguments);
                    }
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:12,代码来源:TopLevel.cs

示例3: Grant

/// <summary>
/// <para>Grant or deny access permissions for a user account, globally or on a per-database or per-table basis.</para>
/// </summary>
/// <example><para>Example: Grant the <code>chatapp</code> user account read and write permissions on the <code>users</code> database.</para>
/// <code>r.db('users').grant('chatapp', {read: true, write: true}).run(conn, callback);
/// 
/// // Result passed to callback
/// {
///     "granted": 1,
///     "permissions_changes": [
///         {
///             "new_val": { "read": true, "write": true },
///             "old_val": { null }
///         }
///     ]
/// </code></example>
                        public Grant Grant ( Object expr, Object exprA )
                        {
                            Arguments arguments = new Arguments(this);
                            arguments.CoerceAndAdd(expr);
                            arguments.CoerceAndAdd(exprA);
                            return new Grant (arguments );
                        }
开发者ID:fjsnogueira,项目名称:RethinkDb.Driver,代码行数:23,代码来源:Db.cs

示例4: literal

/// <summary>
/// <para>Replace an object in a field instead of merging it with an existing object in a <code>merge</code> or <code>update</code> operation.</para>
/// <para><code>js
/// r.table('users').get(1).update({ data: r.literal({ age: 19, job: 'Engineer' }) }).run(conn, callback)</code></para>
///</summary>
/// <example></example>
                    public Literal literal ( Object expr )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAdd(expr);
                        return new Literal (arguments);
                    }
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:12,代码来源:TopLevel.cs

示例5: db

/// <summary>
/// <para>Reference a database.</para>
///</summary>
/// <example><para>Example: Explicitly specify a database for a query.</para>
/// <code>r.db('heroes').table('marvel').run(conn, callback)
/// </code></example>
                    public Db db ( Object expr )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAdd(expr);
                        return new Db (arguments);
                    }
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:12,代码来源:TopLevel.cs

示例6: iso8601

/// <summary>
/// <para>Create a time object based on an ISO 8601 date-time string (e.g. '2013-01-01T01:01:01+00:00'). We support all valid ISO 8601 formats except for week dates. If you pass an ISO 8601 date-time without a time zone, you must specify the time zone with the <code>defaultTimezone</code> argument. Read more about the ISO 8601 format at <a href="http://en.wikipedia.org/wiki/ISO_8601">Wikipedia</a>.</para>
///</summary>
/// <example><para>Example: Update the time of John's birth.</para>
/// <code>r.table("user").get("John").update({birth: r.ISO8601('1986-11-03T08:30:00-07:00')}).run(conn, callback)
/// </code></example>
                    public Iso8601 iso8601 ( Object expr )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAdd(expr);
                        return new Iso8601 (arguments);
                    }
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:12,代码来源:TopLevel.cs

示例7: info

/// <summary>
/// <para>Get information about a ReQL value.</para>
///</summary>
/// <example><para>Example: Get information about a table such as primary key, or cache size.</para>
/// <code>r.table('marvel').info().run(conn, callback)
/// </code></example>
                    public Info info ( Object expr )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAdd(expr);
                        return new Info (arguments);
                    }
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:12,代码来源:TopLevel.cs

示例8: and

/// <summary>
/// <para>Compute the logical "and" of two or more values.</para>
///</summary>
/// <example><para>Example: Return whether both <code>a</code> and <code>b</code> evaluate to true.</para>
/// <code>var a = true, b = false;
/// r.expr(a).and(b).run(conn, callback);
/// // result passed to callback
/// false
/// </code></example>
                    public And and ( Object expr, params object[] exprs )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAdd(expr);
                        arguments.CoerceAndAddAll(exprs);
                        return new And (arguments);
                    }
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:16,代码来源:TopLevel.cs

示例9: reconfigure

/// <summary>
/// <para>Reconfigure a table's sharding and replication.</para>
///</summary>
/// <example><para>Example: Reconfigure a table.</para>
/// <code>&gt; r.table('superheroes').reconfigure({shards: 2, replicas: 1}).run(conn, callback);
/// </code></example>
                    public Reconfigure reconfigure ( Table table )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAdd(table);
                        return new Reconfigure (arguments);
                    }
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:12,代码来源:TopLevel.cs

示例10: wait_

/// <summary>
/// <para>Wait for a table or all the tables in a database to be ready. A table may be temporarily unavailable after creation, rebalancing or reconfiguring. The <code>wait</code> command blocks until the given table (or database) is fully up to date.</para>
///</summary>
/// <example><para>Example: Wait for a table to be ready.</para>
/// <code>&gt; r.table('superheroes').wait().run(conn, callback);
/// </code></example>
                    public Wait wait_ ( Db db )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAdd(db);
                        return new Wait (arguments);
                    }
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:12,代码来源:TopLevel.cs

示例11: http

/// <summary>
/// <para>Retrieve data from the specified URL over HTTP.  The return type depends on the <code>resultFormat</code> option, which checks the <code>Content-Type</code> of the response by default.</para>
///</summary>
/// <example><para>Example: Perform a simple HTTP <code>GET</code> request, and store the result in a table.</para>
/// <code>r.table('posts').insert(r.http('http://httpbin.org/get')).run(conn, callback)
/// </code></example>
                    public Http http ( Object expr )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAdd(expr);
                        return new Http (arguments);
                    }
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:12,代码来源:TopLevel.cs

示例12: tableList

/// <summary>
/// <para>List all table names in a database. The result is a list of strings.</para>
///</summary>
/// <example><para>Example: List all tables of the 'test' database.</para>
/// <code>r.db('test').tableList().run(conn, callback)
/// </code></example>
                    public TableList tableList ( Db db )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAdd(db);
                        return new TableList (arguments);
                    }
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:12,代码来源:TopLevel.cs

示例13: tableDrop

/// <summary>
/// <para>Drop a table. The table and all its data will be deleted.</para>
///</summary>
/// <example><para>Example: Drop a table named 'dc_universe'.</para>
/// <code>r.db('test').tableDrop('dc_universe').run(conn, callback)
/// </code></example>
                    public TableDrop tableDrop ( Db db, Object expr )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAdd(db);
                        arguments.CoerceAndAdd(expr);
                        return new TableDrop (arguments);
                    }
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:13,代码来源:TopLevel.cs

示例14: dbCreate

/// <summary>
/// <para>Create a database. A RethinkDB database is a collection of tables, similar to
/// relational databases.</para>
/// <para>If successful, the operation returns an object: <code>{created: 1}</code>. If a database with the
/// same name already exists the operation throws <code>RqlRuntimeError</code>.</para>
/// <para>Note: that you can only use alphanumeric characters and underscores for the database name.</para>
///</summary>
/// <example><para>Example: Create a database named 'superheroes'.</para>
/// <code>r.dbCreate('superheroes').run(conn, callback)
/// </code></example>
                    public DbCreate dbCreate ( Object expr )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAdd(expr);
                        return new DbCreate (arguments);
                    }
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:16,代码来源:TopLevel.cs

示例15: or

/// <summary>
/// <para>Compute the logical "or" of two or more values.</para>
///</summary>
/// <example><para>Example: Return whether either <code>a</code> or <code>b</code> evaluate to true.</para>
/// <code>var a = true, b = false;
/// r.expr(a).or(b).run(conn, callback);
/// // result passed to callback
/// true
/// </code></example>
                    public Or or ( Object expr, Object exprA, params object[] exprs )
                    {
                        Arguments arguments = new Arguments();
                        arguments.CoerceAndAdd(expr);
                        arguments.CoerceAndAdd(exprA);
                        arguments.CoerceAndAddAll(exprs);
                        return new Or (arguments);
                    }
开发者ID:cadabloom,项目名称:RethinkDb.Driver,代码行数:17,代码来源:TopLevel.cs


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