Ejemplo n.º 1
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);
 }
Ejemplo n.º 2
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);
 }