[#26] All: Remove V2 from naming
Rename project, namespaces and class names Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
c406df1a78
commit
766f61a5f7
219 changed files with 219 additions and 974 deletions
36
src/FrostFS.SDK.Client/Models/Netmap/FrostFsVersion.cs
Normal file
36
src/FrostFS.SDK.Client/Models/Netmap/FrostFsVersion.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using FrostFS.Refs;
|
||||
using FrostFS.SDK.Client.Mappers.GRPC;
|
||||
|
||||
namespace FrostFS.SDK;
|
||||
|
||||
public class FrostFsVersion(int major, int minor)
|
||||
{
|
||||
private Version? version;
|
||||
|
||||
public int Major { get; set; } = major;
|
||||
public int Minor { get; set; } = minor;
|
||||
|
||||
internal Version Version
|
||||
{
|
||||
get
|
||||
{
|
||||
this.version ??= this.ToMessage();
|
||||
return this.version;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSupported(FrostFsVersion version)
|
||||
{
|
||||
if (version is null)
|
||||
{
|
||||
throw new System.ArgumentNullException(nameof(version));
|
||||
}
|
||||
|
||||
return Major == version.Major;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"v{Major}.{Minor}";
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue