Skip to content

Commit a321afb

Browse files
committed
Remove Ticks member and fixup some languages
1 parent c6c667a commit a321afb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Nerdbank.GitVersioning.Tasks/AssemblyVersionInfo.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ private void GenerateThisAssemblyClass()
350350
{ "AssemblyCompany", this.AssemblyCompany },
351351
{ "AssemblyConfiguration", this.AssemblyConfiguration },
352352
{ "GitCommitId", this.GitCommitId },
353-
{ "GitCommitDateTicks", this.GitCommitDateTicks },
354353
};
355354
if (hasKeyInfo)
356355
{
@@ -464,7 +463,7 @@ internal override void DeclareAttribute(Type type, string arg)
464463

465464
internal override void AddCommitDateProperty(long ticks)
466465
{
467-
this.codeBuilder.AppendLine($" static member this.GitCommitDate = new DateTimeOffset({ticks}, TimeZpan.Zero)");
466+
this.codeBuilder.AppendLine($" static member internal GitCommitDate = new DateTimeOffset({ticks}, TimeZpan.Zero)");
468467
}
469468

470469
internal override void EndThisAssemblyClass()
@@ -505,7 +504,7 @@ internal override void AddThisAssemblyMember(string name, string value)
505504

506505
internal override void AddCommitDateProperty(long ticks)
507506
{
508-
this.codeBuilder.AppendLine($" internal static System.DateTimeOffset GitCommitDate {{ get; }} = new System.DateTimeOffset({ticks}, System.TimeSpan.Zero);");
507+
this.codeBuilder.AppendLine($" internal static readonly System.DateTimeOffset GitCommitDate = new System.DateTimeOffset({ticks}, System.TimeSpan.Zero);");
509508
}
510509

511510
internal override void EndThisAssemblyClass()
@@ -539,7 +538,7 @@ internal override void AddThisAssemblyMember(string name, string value)
539538

540539
internal override void AddCommitDateProperty(long ticks)
541540
{
542-
this.codeBuilder.AppendLine($" Friend Shared ReadOnly Property GitCommitDate As System.DateTimeOffset = New System.DateTimeOffset({ticks}, System.TimeSpan.Zero)");
541+
this.codeBuilder.AppendLine($" Friend Shared ReadOnly GitCommitDate As System.DateTimeOffset = New System.DateTimeOffset({ticks}, System.TimeSpan.Zero)");
543542
}
544543

545544
internal override void EndThisAssemblyClass()

0 commit comments

Comments
 (0)