C# Class OpenCover.Framework.Persistance.BasePersistance

Inheritance: IPersistance
ファイルを表示 Open project: OpenCover/opencover

Protected Properties

Property Type Description
CommandLine ICommandLine

Public Methods

Method Description
Commit ( ) : void

we are done and the data needs one last clean up

GetBranchPointsForFunction ( string modulePath, int functionToken, OpenCover.Framework.Model.BranchPoint &branchPoints ) : bool

Get the branch ponts for a function

GetClassFullName ( string modulePath, int functionToken ) : string

Get the class name of a function

GetSequencePointsForFunction ( string modulePath, int functionToken, OpenCover.Framework.Model.InstrumentationPoint &sequencePoints ) : bool

Get the sequence points for a function

GetTrackingMethod ( string modulePath, string assemblyName, int functionToken, uint &uniqueId ) : bool

determine if the method (test method) should be tracked

IsTracking ( string modulePath ) : bool

Is the module being tracked

PersistModule ( OpenCover.Framework.Model.Module module ) : void

Add the Module to the current session

SaveVisitData ( byte data ) : void

Save the visit data to the session model

Protected Methods

Method Description
BasePersistance ( ICommandLine commandLine, ILog logger ) : System

constructor

ClearCoverageSession ( ) : void

Clear the current coverage session data

ReassignCoverageSession ( OpenCover.Framework.Model.CoverageSession session ) : void

Private Methods

Method Description
AddPoints ( Summary parent, Summary child ) : void
BuildMethodMapForModule ( OpenCover.Framework.Model.Module module ) : void
CalculateCoverage ( ) : void
CalculateCoverage ( Summary summary ) : void
CalculateCrapScore ( Method method, OpenCover.Framework.Model.Class @class ) : void
CalculateCyclomaticComplexity ( Method method, OpenCover.Framework.Model.Class @class ) : void
CalculateNPathComplexity ( Method method ) : void
GetMethod ( string modulePath, int functionToken, OpenCover.Framework.Model.Class &@class ) : Method

Get Method data for a function

MapFileReferences ( IEnumerable points, uint>.IDictionary filesDictionary ) : void
MarkSkippedMethods ( ) : void
ProcessClassData ( OpenCover.Framework.Model.Class @class, OpenCover.Framework.Model.Module module ) : void
ProcessMethodData ( Method method, OpenCover.Framework.Model.Class @class ) : void
ProcessModuleData ( OpenCover.Framework.Model.Module module ) : void
ProcessSkippedAction ( SkippedMethod skippedMethod ) : void
RemoveEmptyClasses ( ) : void
RemoveSkippedClasses ( SkippedMethod skipped ) : void
RemoveSkippedMethods ( SkippedMethod skipped ) : void
RemoveSkippedModules ( SkippedMethod skipped ) : void
RemoveUnreferencedFiles ( ) : void
TransformSequences ( ) : void
TransformSequences_AddSources ( IEnumerable files, IEnumerable methods, CodeCoverageStringTextSource>.IDictionary sourceRepository ) : void
TransformSequences_Initialize ( IEnumerable methods ) : void
TransformSequences_JoinWithBranches ( IEnumerable methods ) : void
TransformSequences_ReduceBranches ( IEnumerable methods ) : void

Computes reduced SequencePoint branch coverage by finding common exit offset (switch/case)

TransformSequences_RemoveCompilerGeneratedBranches ( Method method, CodeCoverageStringTextSource source ) : bool
TransformSequences_RemoveCompilerGeneratedBranches ( Method method, CodeCoverageStringTextSource source, long startOffset, long finalOffset ) : bool
TransformSequences_RemoveCompilerGeneratedBranches ( IEnumerable methods, SourceRepository sourceRepository, System.DateTime moduleTime ) : void
TransformSequences_RemoveCompilerGeneratedBranches ( Method method, CodeCoverageStringTextSource source, long &startOffset, long &finalOffset ) : void
TransformSequences_RemoveFalsePositiveUnvisited ( IEnumerable methods, ISet sequencePointsSet ) : void
TransformSequences_RemoveFalsePositiveUnvisited ( IEnumerable methods, SourceRepository sourceRepository, System.DateTime moduleTime ) : void
TransformSequences_RemoveFalsePositiveUnvisited ( Method method, CodeCoverageStringTextSource source, SequencePoint>.ICollection toRemoveMethodSequencePoint ) : void

Method Details

BasePersistance() protected method

constructor
protected BasePersistance ( ICommandLine commandLine, ILog logger ) : System
commandLine ICommandLine
logger ILog
return System

ClearCoverageSession() protected method

Clear the current coverage session data
protected ClearCoverageSession ( ) : void
return void

Commit() public method

we are done and the data needs one last clean up
public Commit ( ) : void
return void

GetBranchPointsForFunction() public method

Get the branch ponts for a function
public GetBranchPointsForFunction ( string modulePath, int functionToken, OpenCover.Framework.Model.BranchPoint &branchPoints ) : bool
modulePath string
functionToken int
branchPoints OpenCover.Framework.Model.BranchPoint
return bool

GetClassFullName() public method

Get the class name of a function
public GetClassFullName ( string modulePath, int functionToken ) : string
modulePath string
functionToken int
return string

GetSequencePointsForFunction() public method

Get the sequence points for a function
public GetSequencePointsForFunction ( string modulePath, int functionToken, OpenCover.Framework.Model.InstrumentationPoint &sequencePoints ) : bool
modulePath string
functionToken int
sequencePoints OpenCover.Framework.Model.InstrumentationPoint
return bool

GetTrackingMethod() public method

determine if the method (test method) should be tracked
public GetTrackingMethod ( string modulePath, string assemblyName, int functionToken, uint &uniqueId ) : bool
modulePath string
assemblyName string
functionToken int
uniqueId uint
return bool

IsTracking() public method

Is the module being tracked
public IsTracking ( string modulePath ) : bool
modulePath string
return bool

PersistModule() public method

Add the Module to the current session
public PersistModule ( OpenCover.Framework.Model.Module module ) : void
module OpenCover.Framework.Model.Module
return void

ReassignCoverageSession() protected method

protected ReassignCoverageSession ( OpenCover.Framework.Model.CoverageSession session ) : void
session OpenCover.Framework.Model.CoverageSession
return void

SaveVisitData() public method

Save the visit data to the session model
public SaveVisitData ( byte data ) : void
data byte
return void

Property Details

CommandLine protected_oe property

Provides subclasses access to the command line object
protected ICommandLine CommandLine
return ICommandLine