Skip to content

ackmanFork/Lever

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lever

Foundation

Lever

Extension

Lever Visual Studio Extension ToolSuite is a powerful visual studio extensions help developer improve velocity.
Only support C# project currently.

Open Containing Folder
Custom Command. User could open containing folder for a project item (file) in "Solution Explorer" window. Dia

Open Output Folder Custom Command. User could open output folder for active configuration of selected project.

Singleton Class
Item Template. The Singleton pattern ensures that a class has only one instance and provides a global point of access to that instance.

  1. Right click on project folder, and choose "Add -> New Item...".
  2. In the "Add new item" dialog, choose "Singleton Class" under "Code" category. Dia
  3. Modify filename and click "Add" button.

Languages Excel
Item Template. Languages Excel is an approach which intend to replace the Resx file for internationalization.
Typically, you use separated "resx" files(Strings.resx, Strings.zh-Hans.resx, Strings.en-US.resx) to provide languages strings. However, it is difficult to "aligning" entries, which means a string key may miss in other resx file, as well as the interpreters could not easy to guess the meaning from string key.

  1. Right click on project folder, and choose "Add -> New Item...".
  2. In the "Add new item" dialog, choose "Languages Excel" under "General" category. Dia
  3. Modify filename like "Strings.xlsx" and click "Add" button.
  4. Ensure "Identifier" is first column and "Invariant Language (Invariant Country)" as second column, and extra "NativeName" from "References" worksheet. Dia
  5. By cooperating with interpreter, edit "Languages" worksheet for your business requirement and save.
  6. Right click "Strings.xlsx" in "Solution Explorer" window, and choose "Run Custom Tool" (or "Generate Languages" if excel file is opened). Dia

TestData Excel
Item Template. TestData Excel used for provide test data for XUnit.Net [Theory] test method.

  1. Right click on project folder, and choose "Add -> New Item...".
  2. In the "Add new item" dialog, choose "TestData Excel" under "Data" category. Dia
  3. Modify filename like "TestData.xlsx" and click "Add" button.
  4. Assume you have follow XUnit.net test class FoundationShould, ignore [ExcelTestData] error in this moment.
namespace XUnitTestProject1
{
    public class FoundationShould
    {
        [Theory]
        [ExcelTestData]
        public void AddTest(int x, float y, float expected)
        {
            float result = x + y;
            Assert.Equal(expected, result);
        }

        [Theory]
        [ExcelTestData]
        public void EncodingSubString(byte[] data, int index, int length, string expected)
        {
            string result = Encoding.UTF8.GetString(data, index, length);
            Assert.Equal(expected, result);
        }
    }
}
  1. Edit "TestData.xlsx", make sure sheet name is match with test class name, and insert rows. Each row consist of Method name and Parameter0-9. Dia
  2. Right click "TestData.xlsx" in "Solution Explorer" window, and choose "Run Custom Tool" (or "Generate Test Data" if excel file is opened).
  3. Finally, build the test project and Run Tests.

Lineup Images
Custom Command. Combine all png files under folder (top level) as a line and generate a new png image.

Format And Clean Codes
Custom Command. Run "Format Document" and "Remove and Sort Usings" for all .cs files under solution.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%