Примеры ошибок, обнаруженных с помощью диагностики V3077
V3077. Property setter / event accessor does not utilize its 'value' parameter.
Azure PowerShell
V3077 The setter of 'GetGuid' property does not utilize its 'value' parameter. RecoveryServicesBackupCmdletBase.cs 54
public abstract class RecoveryServicesBackupCmdletBase : AzureRMCmdlet
{
....
static string _guid;
protected static string GetGuid
{
get { return _guid; }
set { _guid = Guid.NewGuid().ToString(); }
}
....
}
public override void ExecuteCmdlet()
{
....
var itemResponse = ServiceClientAdapter.CreateOrUpdateProtectionIntent(
GetGuid ?? Guid.NewGuid().ToString(),
....);
....
}
DotNetNuke
V3077 The setter of 'LastPurge' property does not utilize its 'value' parameter. IPCount.cs 96
private static DateTime LastPurge
{
get
{
var lastPurge = DateTime.Now;
if (File.Exists(CachePath + "_lastpurge"))
{
var fi = new FileInfo(CachePath + "_lastpurge");
lastPurge = fi.LastWriteTime;
}
else
{
File.WriteAllText(CachePath + "_lastpurge", string.Empty);
}
return lastPurge;
}
set
{
File.WriteAllText(CachePath + "_lastpurge", string.Empty);
}
}