public T4TemplateKind GetTemplateKind(IProjectFile file) { var properties = file?.Properties as ProjectFileProperties; string customTool = properties?.CustomTool; return(T4TemplateManagerConstants.ToTemplateKind(customTool)); }
private bool IsActionResult( [NotNull] IProjectFile generated, [NotNull] IProjectFile source, T4TemplateKind kind ) { if (!(source.Properties is ProjectFileProperties sourceProperties)) { return(false); } var templateKind = T4TemplateManagerConstants.ToTemplateKind(sourceProperties.CustomTool); if (templateKind != kind) { return(false); } if (sourceProperties.CustomToolOutput != generated.Name) { return(false); } if (!IsGeneratedFrom(generated, source)) { return(false); } return(true); }