Skip to content

modulexcite/CR_WrapInTryFunction

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CR_WrapInTryFunction

A CodeRush plugin which creates a method that wraps the active method in the same way that 'TryParse' wraps 'Parse'.

For example, given the code...

private string GetString(string P1)
{
  return "A string";
}

...the plugin will provide...

bool TryGetString(string P1, out string result)
{
    try
    {
        result = GetString(P1);
        return true;
    }
    catch
    {
        result = null;
        return false;
    }
}

About

A CodeRush plugin which creates a method that wraps the active method in the same way that 'TryParse' wraps 'Parse'

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%