Introduce IdentifierManager to improve PDT evaluator performance.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Newtonsoft.Json;
|
||||
using Cryville.Common;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -112,19 +113,19 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public Dictionary<string, PropSrc> PropSrcs { get; private set; }
|
||||
public Dictionary<int, PropSrc> PropSrcs { get; private set; }
|
||||
protected void SubmitPropSrc(string name, PropSrc property) {
|
||||
PropSrcs.Add(name, property);
|
||||
PropSrcs.Add(IdentifierManager.SharedInstance.Request(name), property);
|
||||
}
|
||||
[JsonIgnore]
|
||||
public Dictionary<string, PropOp> PropOps { get; private set; }
|
||||
public Dictionary<int, PropOp> PropOps { get; private set; }
|
||||
protected void SubmitPropOp(string name, PropOp property) {
|
||||
PropOps.Add(name, property);
|
||||
PropOps.Add(IdentifierManager.SharedInstance.Request(name), property);
|
||||
}
|
||||
|
||||
protected ChartEvent() {
|
||||
PropSrcs = new Dictionary<string, PropSrc>();
|
||||
PropOps = new Dictionary<string, PropOp>();
|
||||
PropSrcs = new Dictionary<int, PropSrc>();
|
||||
PropOps = new Dictionary<int, PropOp>();
|
||||
SubmitPropSrc("long", new PropSrc.Boolean(() => IsLong));
|
||||
SubmitPropSrc("time", new PropSrc.BeatTime(() => time.Value));
|
||||
SubmitPropSrc("endtime", new PropSrc.BeatTime(() => endtime.Value));
|
||||
|
Reference in New Issue
Block a user