Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Impove string-contained code snippets #190

Closed

Description

@Dennis-Petrov

cresn/cesn code snippets should generate string type name:

    Contract.Ensures(!string.IsNullOrEmpty(Contract.Result<string>()));
    Contract.Requires<ArgumentException>(!string.IsNullOrEmpty(arg));

instead of String:

    Contract.Ensures(!String.IsNullOrEmpty(Contract.Result<string>()));
    Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(arg));

Also, something like cresnw/cesnw will be suitable:

    Contract.Ensures(!string.IsNullOrWhitespace(Contract.Result<string>()));
    Contract.Requires<ArgumentException>(!string.IsNullOrWhitespace(arg));

I know, that I could fix/add snippets by myself, but out-of-the-box always better :).

Activity

  1. sharwell commented on Aug 7, 2015

    @sharwell
    Contributor

    I completely agree!

    Want to try your hand at a pull request? The snippets are located here.

  2. Dennis-Petrov commented on Aug 8, 2015

    @Dennis-Petrov
    Author

    Sure, I didn't know that I can add something here. :)

  3. added a commit that references this issue on Aug 13, 2015
  4. Dennis-Petrov commented on Feb 26, 2016

    @Dennis-Petrov
    Author

    New snippets are included in RC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions