Skip to content

Commit

Permalink
Merge pull request #42 from Particular/update-interval-obsoletion
Browse files Browse the repository at this point in the history
UpdateInterval proper obsoletion
  • Loading branch information
seanfarmar authored Nov 7, 2017
2 parents 9f0bb89 + 156fb91 commit 3821d5f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@ public static NServiceBus.PerformanceCountersSettings EnableWindowsPerformanceCo
public class PerformanceCountersSettings
{
public void EnableSLAPerformanceCounters(System.TimeSpan sla) { }
[System.ObsoleteAttribute("This interval is no longer used for reporting. Counters values are updated as soo" +
"n as they are reported. Will be treated as an error from version 2.0.0. Will be " +
"removed in version 3.0.0.", false)]
public void UpdateCounterEvery(System.TimeSpan updateInterval) { }
}
}
4 changes: 4 additions & 0 deletions src/NServiceBus.Metrics.PerformanceCounters/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers>
<Obsolete />
</Weavers>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<ItemGroup>
<PackageReference Include="GitVersionTask" Version="4.0.0-*" PrivateAssets="All" />
<PackageReference Include="NServiceBus.Metrics" Version="[2.0.0, 3.0.0)" />
<PackageReference Include="Obsolete.Fody" Version="4.3.2" />
</ItemGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,14 @@ public void EnableSLAPerformanceCounters(TimeSpan sla)
endpointConfiguration.GetSettings().Set(SLAMonitoringFeature.EndpointSLAKey, sla);
endpointConfiguration.EnableFeature<SLAMonitoringFeature>();
}

/// <summary>
/// Sets the update interval.
/// </summary>
/// <param name="updateInterval"></param>
[ObsoleteEx(Message = "This interval is no longer used for reporting. Counters values are updated as soon as they are reported", RemoveInVersion = "3.0")]
public void UpdateCounterEvery(TimeSpan updateInterval)
{
}
}
}

0 comments on commit 3821d5f

Please sign in to comment.