Click here to Skip to main content
15,898,134 members
Articles / Programming Languages / Visual Basic

CuttingEdge.Conditions

Rate me:
Please Sign up or sign in to vote.
4.59/5 (19 votes)
23 Jun 2011MIT3 min read 125.8K   67   84  
A pre- and postcondition validation framework based on .NET 3.5 extension methods
<TemplatesExport family="Live Templates">
  <Template uid="ef94acb4-182f-44ff-bb33-b3451eb1eb06" text="Condition.Requires($argument$, &quot;$argument$&quot;)$END$" shortcut="requires" description="Tests a method precondition." reformat="true" shortenQualifiedReferences="true">
    <Context>
      <VBContext context="Statement" />
    </Context>
    <Categories />
    <Variables>
      <Variable name="argument" expression="" initialRange="0" />
    </Variables>
    <CustomProperties />
  </Template>
  <Template uid="9bea7298-983e-435d-b3b1-e1dd0d3ca922" text="Condition.Ensures($argument$, &quot;$argument$&quot;)$END$" shortcut="ensures" description="Tests a postcondition." reformat="true" shortenQualifiedReferences="true">
    <Context>
      <VBContext context="Statement" />
    </Context>
    <Categories />
    <Variables>
      <Variable name="argument" expression="" initialRange="0" />
    </Variables>
    <CustomProperties />
  </Template>
  <Template uid="d6993420-e1b6-4710-8f3b-49fe1eb20bb2" text="Condition.Requires($argument$, &quot;$argument$&quot;)$END$" shortcut="requires" description="Tests a method precondition." reformat="true" shortenQualifiedReferences="true">
    <Context>
      <CSharpContext context="Statement" minimumLanguageVersion="3.0" />
    </Context>
    <Categories />
    <Variables>
      <Variable name="argument" expression="" initialRange="0" />
    </Variables>
    <CustomProperties />
  </Template>
  <Template uid="3094555b-3d0f-4938-bb6a-8bbeb089e607" text="Condition.Ensures($argument$, &quot;$argument$&quot;)$END$" shortcut="ensures" description="Tests a postcondition." reformat="true" shortenQualifiedReferences="true">
    <Context>
      <CSharpContext context="Statement" minimumLanguageVersion="3.0" />
    </Context>
    <Categories />
    <Variables>
      <Variable name="argument" expression="" initialRange="0" />
    </Variables>
    <CustomProperties />
  </Template>
</TemplatesExport>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Software Developer (Senior)
Netherlands Netherlands
I'm a freelance developer from the Netherlands, working with .NET technology on a daily basis, and officially diagnosed as a workaholic.

Comments and Discussions