. NET Applet--source counter

Source: Internet
Author: User

Title: Source Counter
Date:2018-05-11 08:47:38
tags:c#
Categories:. NET
---

. NET Applet--source counter
    • Application Scenarios

In programming, some documents need to fill in the amount of code, such as applying for software copyrights. After reviewing the relevant information, the small program was written.

    • Programming Ideas

The main idea is to analyze the project file, find the code file according to the project file, and then traverse the code file
For analysis

  • Related Technologies
    • Abstract class
    • File operations
    • String parsing
  • Project structure
    • Abstract class
      • Fileanalyser file Analysis class, responsible for validating files, and defining analysis file methods
      • Projectdocument Project Engineering class, responsible for defining project file properties and methods
    • Entity class
      • Fileentity file entity class, responsible for storing code file information
      • Projectfileentity Project Engineering entity class, responsible for storing project file information
      • Lineentity Code line entity class, responsible for storing code line information
    • Collection Class
      • FileCollection file Entity collection, responsible for file collection statistics
    • Function class
      • Csprojectdocument C # Project Engineering class, inheriting Projectdocument class, responsible for analyzing C # project engineering files
      • Csfileanalyser CS File Analysis class, inheriting fileanalyser, responsible for parsing CS file
  • code example

    Calling methods

            ProjectDocument mDocument = ProjectDocument.Create(this.txtFileName.Text);        if (mDocument == null)        {            MessageBox.Show("Analyse for " + this.txtFileName.Text + " error !");            return;        }        mDocument.ClearResults();        mDocument.AnalyseAllFile();
  • GitHub Address

Bmbh/.net-app Codecalc Folder

. NET Applet--source counter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.