Skip to content

Commit ce90d66

Browse files
author
Stephan
committed
OutOfDateModelsStatus cleanup
1 parent 65b809a commit ce90d66

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Zbu.ModelsBuilder.AspNet/OutOfDateModelsStatus.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ private static void Write()
3535

3636
public static void Clear()
3737
{
38+
if (Config.FlagOutOfDateModels == false) return;
3839
var path = GetFlagPath();
3940
if (path == null || !File.Exists(path)) return;
4041
File.Delete(path);
@@ -49,6 +50,7 @@ public static bool IsOutOfDate
4950
{
5051
get
5152
{
53+
if (Config.FlagOutOfDateModels == false) return false;
5254
var path = GetFlagPath();
5355
return path != null && File.Exists(path);
5456
}

Zbu.ModelsBuilder/Configuration/Config.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ static Config()
4444

4545
if (count > 1)
4646
throw new Exception("Configuration error: you can enable only one of Dll, AppCode or AppData models at a time.");
47+
48+
// not flagging if not generating, or live
49+
if (count == 0 || EnableLiveModels)
50+
FlagOutOfDateModels = false;
4751
}
4852

4953
// note: making setters internal below for testing purposes

0 commit comments

Comments
 (0)