public bool IsSupported(CodeGenerationContext context) { if (context == null) { throw new ArgumentNullException("context"); } return(ScaffolderFilter.DisplayMvcScaffolders(context)); }
private static bool DisplayScaffolders(CodeGenerationContext context, string projectReferenceName, Version minVersion, Version maxExcludedVersion) { if (!ScaffolderFilter.IsApplicableProject(context)) { return(false); } return(ScaffolderFilter.IsValidProjectReference(context, projectReferenceName, minVersion, maxExcludedVersion) != ScaffolderFilter.ReferenceDetails.ReferenceVersionNotSupported); }
public static bool DisplayMvcScaffolders(CodeGenerationContext codeGenerationContext) { if (!ScaffolderFilter.IsApplicableProject(codeGenerationContext)) { return(false); } ScaffolderFilter.ReferenceDetails referenceDetail = ScaffolderFilter.IsValidProjectReference(codeGenerationContext, AssemblyVersions.MvcAssemblyName, AssemblyVersions.MvcAssemblyMinVersion, AssemblyVersions.MvcAssemblyMaxVersion); ScaffolderFilter.ReferenceDetails referenceDetail1 = ScaffolderFilter.IsValidProjectReference(codeGenerationContext, AssemblyVersions.MobileServiceAssemblyName, new Version(1, 0, 0, 0), new Version(2147483647, 0, 0, 0)); if (referenceDetail == ScaffolderFilter.ReferenceDetails.ReferenceVersionSupported) { return(true); } if (referenceDetail != ScaffolderFilter.ReferenceDetails.ReferenceDoesNotExist) { return(false); } return(referenceDetail1 == ScaffolderFilter.ReferenceDetails.ReferenceDoesNotExist); }
public static bool DisplayWebApiScaffolders(CodeGenerationContext codeGenerationContext) { return(ScaffolderFilter.DisplayScaffolders(codeGenerationContext, AssemblyVersions.WebApiAssemblyName, AssemblyVersions.WebApiAssemblyMinVersion, AssemblyVersions.WebApiAssemblyMaxVersion)); }