That's the approach Code Contracts are using.
这是合同的使用方法代码。
The Code Contracts API offers a workaround for this.
代码合同API提供了这样一种解决方法。
The Code Contracts classes themselves have been a part of .
代码合同类本身已部分。
Even with Code Contracts, we are still doing a check of course.
即使代码的合同,我们仍然在做检查的过程。
Specifies that a separate type contains the code contracts for this type.
指定不同的型别包含此型别的程序码合约。
Code Contracts is the.net implementation of the Design by Contract concept.
代码契约(Code Contracts)是“契约式设计”的。NET实现。
Code Contracts aren't entirely like assertions and other debug instruments.
代码合同不完全像断言和调试的其他文书。
You control implicit Code Contracts through the checkboxes shown in Figure 3 .
您可以控制通过复选框中所示的隐式代码合同图3 。
There is hope here with Code Contracts, but that technology is still far from being production ready.
还有一种新方法是代码契约,但目前该技术还不成熟,没有形成产品。
NET Framework, a special Static Checker tool works by learning facts about your code from Code Contracts.
NET框架中,特殊的静态检查器工具可以学习关于您的代码从代码合同。
Useful links: Code Contracts online documentation, Microsoft Research Code Contracts website, related forum.
有用的链接:代码契约在线文档、微软研究院的代码契约网站和相关论坛。
Note that enabling implicit Code Contracts may flood your output window with a ton of messages and warnings.
请注意启用隐式代码合同可能充斥大量消息,警告您输出窗口。
To do that we need the code contracts rewriter which will be called by the C# compiler when generating your code.
这样做,我们需要重写代码合同将由C编译器生成代码时#。
On the domain layer, though, you often need more than just attributes, and Code Contracts are an ideal replacement.
域层,不过,您经常需要不仅仅是属性,和代码合同是理想的替代品。
I'm not necessarily stating that you can't get the same capabilities with attributes that you can with Code Contracts.
我不说你不能得到相同的功能,你可以用代码合同的属性。
Nicely enough, Code Contracts can help significantly in this area, if only you take a careful look at compiler warnings.
好不够,代码合同可以帮助大大在这一领域,只要你仔细看看编译器警告。
I find, however, that in terms of readability and expressivity, the results are better with Code Contracts than attributes.
我找到的可读性和表现力,结果却与代码合同属性比任何时候都更好。
The end result of using Code Contracts is better and safer code, more appropriate usage of external APIs, in the end better software.
使用代码契约能够得到更好、更安全的代码,并为外部API提供合适的使用指导,最终有助于开发出更高质量的软件。
It should be clear by now that, to get the most out of the Static Checker, you must use code Contracts all throughout your code.
既然要获得最大的静态检查器,则必须使用整个代码中的所有代码合同,它应该是清楚了。
In this article, I'll discuss a few scenarios where Code Contracts prove particularly helpful in driving you toward a higher quality of overall software design.
在本文中,我将讨论在代码合同证明特别有用的驾驶您对软件的总体设计的高质量的几个方案。
Not only are the contracts executable, they are also part of the user-visible code and documentation, information that would be more obscure if captured in separate aspects.
合约不仅可以执行,还是用户可见的代码、文档和信息的组成部分,而如果是在分散的方面中捕获到的,这些信息则会很模糊。
The design illustrated in Figure 1 guarantees a highly flexible solution that lets you apply and remove contracts without changing either the contract implementation or the application code.
图1所展示的设计保证了高度灵活的解决方案,它使您可以不用改变契约实现或者应用程序代码就可以应用或者删除契约。
Most of this is just boiler-plate code used to define the various contracts, adapters, and views needed to make everything work.
其中大多数都属于样板式代码(Boiler-plate),用于定义能够让所有内容工作的各种契约、适配器以及视图。
The groups tend to overcompensate by creating contracts and specifications prior to designing, developing, and integrating code.
组织倾向于过度在创建合同和规格上工作,而不是在设计、开发和集成上。
Microsoft is adding support for contracts, which combine asserts with static code analysis.
微软也在为他们提供越来越多的支持,让他们更好地在静态代码分析上做投入。
Start adding the Contract4J annotations to your source code to define your contracts!
现在请开始把 Contract4J标注添加到源代码中,以定义自己的合约!
The MicroC profile includes new stereotypes for ports without contracts that optimize the implementation of port code.
MicroC profile文件包含了无协议关联的端口新模板,优化了端口号码的实现。
If such choice has not been made, the provisions of the Code on the conflict of laws for contracts will apply.
当事人未作选择的,适用该法有关合同冲突法的规定。
Postal communications contract is in essence a kind of civil contracts, which should be included in the contract subsection of future civil code.
邮政通信合同在性质上是一种民事合同,应将其纳入未来民法典合同分则予以规定。
Postal communications contract is in essence a kind of civil contracts, which should be included in the contract subsection of future civil code.
邮政通信合同在性质上是一种民事合同,应将其纳入未来民法典合同分则予以规定。
应用推荐