2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-05-06 11:32:59 +00:00
This commit is contained in:
Ahmed Zamil 2023-01-11 16:09:16 +03:00
parent 58c705bfc6
commit f8b70d1ea6
3 changed files with 23 additions and 4 deletions

View File

@ -39,8 +39,8 @@ namespace Esiur.Analysis.Test
[STAThread]
static void Main()
{
var signalA = new double[] { 1, 1, 1, V, 1, 1, V, V, 1, V, 1, V, V, V, V };
var signalB = new double[] { 1, V, V, V, V, 1, V, V, V, V, 1, V, V, V, V };
var signalA = new double[] { V,1, V, 1 , V, V, V };
var signalB = new double[] { V, V, 1, V, V, 1, V };
var cor = signalA.CrossCorrelation(signalB, true);
Debug.WriteLine(cor);

View File

@ -71,6 +71,11 @@ public class EntityStore : IStore
foreach (var rf in ent.References)
rf.Load();
foreach(var nav in ent.Navigations)
nav.Load();
//var refs = ent.References.ToList();
return new AsyncReply<IResource>(res as IResource);
}
@ -158,7 +163,21 @@ public class EntityStore : IStore
public bool Remove(IResource resource)
{
throw new NotImplementedException();
var type = ResourceProxy.GetBaseType(resource);
var eid = TypesByType[type].PrimaryKey.GetValue(resource);
lock (DBLock)
{
if (DB[type].ContainsKey(eid))
{
DB[type].Remove(eid);
return true;
}
}
return false;
//throw new NotImplementedException();
}
public AsyncReply<bool> AddChild(IResource parent, IResource child)

View File

@ -182,7 +182,7 @@ namespace { ci.ClassSymbol.ContainingNamespace.ToDisplayString() } {{
// copy attributes
var attrs = string.Join("\r\n\t", f.GetAttributes().Select(x => $"[{x.ToString()}]"));
code += $"\t{attrs}\r\n\t public {f.Type} {pn} {{ \r\n\t\t get => {fn}; \r\n\t\t set {{ \r\n\t\t {fn} = value; \r\n\t\t Instance?.Modified(); \r\n\t\t}}\r\n\t}}\r\n";
code += $"\t{attrs}\r\n\t public {f.Type} {pn} {{ \r\n\t\t get => {fn}; \r\n\t\t set {{ \r\n\t\t this.{fn} = value; \r\n\t\t Instance?.Modified(); \r\n\t\t}}\r\n\t}}\r\n";
}
code += "}}\r\n";