示例#1
0
 public bool IsSupported(CodeGenerationContext context)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     return(ScaffolderFilter.DisplayMvcScaffolders(context));
 }
示例#2
0
 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);
 }
示例#3
0
 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);
 }
示例#4
0
 public static bool DisplayWebApiScaffolders(CodeGenerationContext codeGenerationContext)
 {
     return(ScaffolderFilter.DisplayScaffolders(codeGenerationContext, AssemblyVersions.WebApiAssemblyName, AssemblyVersions.WebApiAssemblyMinVersion, AssemblyVersions.WebApiAssemblyMaxVersion));
 }