要添加这个定制动作,可以使用如下代码。
这样的代码也可以写成如下的样子。
创建的模型可以被分析,并作为代码生成(如下所示)的基础被使用。
The created models can be analyzed and used as a basis for code generation (see below).
如下的代码显示了获得图书价格所需的对象和方法。
The code below illustrates the objects and methods necessary to get back a book's price.
然后将会使用批文件来运行构建工具,如下面的代码清单11所示。
The batch file used to run the build utility then looks like Listing 11, below.
要改变表格颜色,在我们刚编辑过的代码下面几行的如下注释。
To do this, look for the following comment in the code a few lines below where you've been editing.
代码如下面的清单2 所示。
视图代码如下面清单10所示。
输入如下的两行代码。
该代理的代码如下所示。
对应的代码片段如下。
进行这项操作的XSL代码如下所示
因此使用该操作的代码如下所示。
那么运行此代码时我们将得到如下错误。
要使用轮询,需要对代码进行如下修改。
The following code changes are necessary to use the polling strategy.
上面的代码会产生如下结果。
以上代码产生如下标记。
生成的XAML代码如下。
清单12中代码的效果如下。
处理这种工作的代码如下所示。
打开该文件并且添加用粗体显示的代码,如下所示。
如下面的代码所示,发现所有的异常并正确的处理他们仍是明智之举。
It is still advisable that you catch all exceptions and handle them appropriately, as shown in the following code.
如果运行这段新代码,您应当会看到大量信息,如下所示。
If you run this new code, you should see a great deal more information, as shown below.
编写如下面清单4所示的RC代码。
首先建立如下所示的代码。
代码复查结束以后,发现的所有问题将在代码复查视图中列出来,如下图1所示。
Once the code review has completed, any issues identified will be listed in the Code Review view, as shown in Figure 1 following.
检查WSDL文件,确保地址与服务器匹配,如下面的代码片段所示。
Examine the WSDL file to ensure the address matches your server as shown in the code snippet below.
使用该常量的代码如下所示。
编写这种递归函数需要执行的步骤如下所示,清单3给出了这个函数的源代码。
The steps required to write such a recursive function are listed below, and Listing 3 presents the source code of the function itself.
完整的代码块如下所示。
应用推荐