Open PavelBal opened 1 year ago
@msevestre @Yuri05 @rwmcintosh Is it something that can be easily implemented in Core? For V12?
I don’t see a problem here We always said that .net object are immutable in terms of name because of path resolution etc But in terms of simulation name, that should probably just work
I'm looking at this OSPSuite.R.Domain.Simulation class and it has settable name property which is just the underlying ModelCoreSimulation name property.
Is there something else that has to change?
Can someone point to where this should change for me?
I think there is nothing else to change. But it will not check for naming rules violation:
Those checks are part of OSPSuite.Presentation which is not a dependency of OSPSuite.R (it only depends on Core layers below Presentation).
I think it should be handled by R to check for special characters, what do you think?
I think it should be handled by R to check for special characters, what do you think?
I think that's OK. But I would retrieve the list of illegal characters via OSPSuite.R (it's defined in Core and should be accessible)
Actually the name check could be done in OSPSuite.R instead of in R (or maybe that's what you meant?)
I mean in OSPSuite-R (which is R code), and not OSPSuite.R (which is in C#). But either one will work of course.
Is there input validation already in this R project?
I think no.. but not 100% sure
This needs to be done in .net side IMO
Then silently decline to set the property if we find one of these characters?
public string Name
{
get => CoreSimulation.Name;
set => CoreSimulation.Name = value;
}
Is there input validation already in this R project?
No.
Then silently decline to set the property if we find one of these characters?
I would not do anything silently. Throw an error - it should be caught on the R side.
When creating multiple simulations from the same pkml file and saving them, it would be useful to be able to change the
Name
property, so when loading the simulation in MoBi it will have a name defined in R.Is this property read-only in .NET and do you see any problems with changing it from R @msevestre @Yuri05