Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (32 sloc) 2.05 KB
<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ assembly name="EnvDTE" #>
<#@ import namespace="EnvDTE" #>
<#@ include file="$(SolutionDir)T4Aspects\LoggingAspect.tt" #><##>
<#@ include file="$(SolutionDir)T4Aspects\LoggingDataCodeGeneratorForArgumentsBasedOnTheLogAttribute.tt" #><##>
<#@ include file="$(SolutionDir)T4Aspects\LoggingDataCodeGeneratorForArgumentsBasedOnTheLogCountAttribute.tt" #><##>
<#@ include file="$(SolutionDir)T4Aspects\LoggingDataCodeGeneratorForReturnValueBasedOnTheLogAttribute.tt" #><##>
<#@ include file="$(SolutionDir)T4Aspects\LoggingDataCodeGeneratorForReturnValueBasedOnTheLogCountAttribute.tt" #><##>
<#@ include file="$(SolutionDir)T4Aspects\CompositePostInvocationLoggingDataCodeGenerator.tt" #><##>
<#@ include file="$(SolutionDir)T4Aspects\CompositePreInvocationLoggingDataCodeGenerator.tt" #><##>
<#@ include file="$(SolutionDir)T4Aspects\MethodDescriptionLoggingDataCodeGenerator.tt" #><##>
<#@include once="true" file="$(SolutionDir)T4Aspects\LoggingAspect.Core.tt"#><##>
<#@include once="true" file="$(SolutionDir)T4Aspects\Utilities\ClassFinder.tt"#><##>
<#@ output extension="cs"#><##>
<#
var hostServiceProvider = (IServiceProvider) Host;
var dte = (DTE) hostServiceProvider.GetService(typeof(DTE));
var classes = ClassFinder.FindClassesInSolution(dte, new[] {"DocumentSource"});
foreach (var @class in classes)
{
GenerateLoggingDecoratorForClass(
@class,
@class.ImplementedInterfaces.Cast<CodeInterface>().Single(),
new CompositePreInvocationLoggingDataCodeGenerator(
new MethodDescriptionLoggingDataCodeGenerator(),
new LoggingDataCodeGeneratorForArgumentsBasedOnTheLogAttribute(),
new LoggingDataCodeGeneratorForArgumentsBasedOnTheLogCountAttribute()),
new CompositePostInvocationLoggingDataCodeGenerator(
new LoggingDataCodeGeneratorForReturnValueBasedOnTheLogAttribute(),
new LoggingDataCodeGeneratorForReturnValueBasedOnTheLogCountAttribute()));
}
#>