C# 클래스 NStub.CSharp.CSharpCodeGenerator

The CSharpCodeGenerator is responsible for the generation of the individual class files which will make up the actual test project. For information regarding the generation of the project file, see CSharpProjectGenerator.
상속: NStub.Core.ICodeGenerator
파일 보기 프로젝트 열기: Jedzia/NStub

공개 메소드들

메소드 설명
CSharpCodeGenerator ( IBuildSystem buildSystem, CodeNamespace codeNamespace, IMemberBuilderFactory testBuilders, ICodeGeneratorParameters configuration ) : System

Initializes a new instance of the CSharpCodeGenerator class based the given CodeNamespace which will output to the given directory.

GenerateCode ( ) : void

This methods actually performs the code generation for the file current System.CodeDom.CodeNamespace. All classes within the namespace will have exactly one file generated for them.

비공개 메소드들

메소드 설명
CreateStubForCodeMemberMethod ( CodeMemberMethod codeMemberMethod ) : void

Creates the stub for the code member method. This method actually implements the method body for the test method.

RemoveDuplicatedMembers ( CodeTypeDeclaration codeTypeDeclaration ) : void

Since types can contain multiple overloads of the same method, once we remove the parameters from every method our type may have the many duplicates of the same method. This method removes those duplicates.

WriteClassFile ( string className, CodeNamespace codenamespace ) : void

Writes the class file. This method actually creates the physical class file and populates it accordingly.

메소드 상세

CSharpCodeGenerator() 공개 메소드

Initializes a new instance of the CSharpCodeGenerator class based the given CodeNamespace which will output to the given directory.
or /// outputDirectory is . outputDirectory is an /// empty string. outputDirectory /// cannot be found. ApplicationException Directory Cannot Be Found.
public CSharpCodeGenerator ( IBuildSystem buildSystem, CodeNamespace codeNamespace, IMemberBuilderFactory testBuilders, ICodeGeneratorParameters configuration ) : System
buildSystem IBuildSystem The build system.
codeNamespace System.CodeDom.CodeNamespace The code namespace.
testBuilders IMemberBuilderFactory The test builders.
configuration ICodeGeneratorParameters The configuration.
리턴 System

GenerateCode() 공개 메소드

This methods actually performs the code generation for the file current System.CodeDom.CodeNamespace. All classes within the namespace will have exactly one file generated for them.
public GenerateCode ( ) : void
리턴 void