|
|
|
|
@ -3,6 +3,7 @@ |
|
|
|
|
// Copyright(c) 2020 SimonG. All Rights Reserved. |
|
|
|
|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using GBase; |
|
|
|
|
using GBase.Attributes; |
|
|
|
|
|
|
|
|
|
namespace Test.GBase.GBaseIntegrationTest |
|
|
|
|
@ -15,33 +16,36 @@ namespace Test.GBase.GBaseIntegrationTest |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Item(string name, int key) |
|
|
|
|
public Item(string name, int number) |
|
|
|
|
{ |
|
|
|
|
Name = name; |
|
|
|
|
Key = key; |
|
|
|
|
Number = number; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[GBaseColumn] |
|
|
|
|
public string Name { get; private set; } |
|
|
|
|
|
|
|
|
|
[GBaseColumn] |
|
|
|
|
public int Key { get; private set; } |
|
|
|
|
public int Number { get; private set; } |
|
|
|
|
|
|
|
|
|
public GBaseKey Key { get; set; } |
|
|
|
|
public string FileName => Name; |
|
|
|
|
|
|
|
|
|
public override string ToString() => $"{Key}/{Name}"; |
|
|
|
|
public override string ToString() => $"{Number}/{Name}"; |
|
|
|
|
|
|
|
|
|
public void InitializeFromString(string @string) |
|
|
|
|
{ |
|
|
|
|
string[] properties = @string.Split('/'); |
|
|
|
|
|
|
|
|
|
Key = int.Parse(properties[0]); |
|
|
|
|
Number = int.Parse(properties[0]); |
|
|
|
|
Name = properties[1]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void Initialize(List<object> parameters) |
|
|
|
|
public void Initialize(GBaseKey key, List<object> parameters) |
|
|
|
|
{ |
|
|
|
|
Key = key; |
|
|
|
|
Name = (string) parameters[0]; |
|
|
|
|
Key = (int) parameters[1]; |
|
|
|
|
Number = (int) parameters[1]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |