Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Another example could be a RegularExpression DataOperation. The source element set could be 100 IDBased items, the user sets the RegularExpression.Arg to a regular expression and the gui uses the StatusSourceElement method to hide all non matching elements. Thus giving ConfigurationEditor a Filtering mechanism on the Link connnection dialog.

3.2.2 ValuesSet (from ~don (Gena))

One of the solutions, hope it is not too exterme but certainly a modern programming technique:

Code Block

public interface IExchangeItem
{
   T GetValue<T>(time);
}

unit test:

Code Block

IExchangeItem exchangeItem = new ExchangeItem();
IValueSet valueSet = exchangeItem.GetValue<IValueSet>(time);

--------------

However I do not understand why do we duplicate .NET in the current implementation and wrapping double[] by something like IValueSet, sounds a bit overkill. I can understand meaning of asking something like an entity representing Value of a certain Quantity on a specific ElementSet, which in my oppinion should at least keep references to instances of those classes:

Code Block

public interface IValueSet
{
    IElementSet ElementSet { get; }
    IQuantity { get; }

    double[] Values { get; }
}

If there are constructive arguments that IValueSet should be only double[] then the folowing code sounds better, and we will get rid of a few interfaces (which is always good once functionality remains the same (smile):

Code Block

IExchangeItem exchangeItem = new ExchangeItem();
double[] valueSet = exchangeItem.GetValue<double[]>(time);

Please check a complete and working example in attachment. Hope you'll have time to have a look at it next week (wink). In example a method GetValues() should use seme different strategy instead of all those if(...).

In general this way can be a very powerful since it allows all functionality of current version and will also allow to provide conversions on-the-fly in case if someone will want to get value back in some specific format, and user implementation of IExchangeItem will be able to provide it.

See also source code example

3.3 Development and release roadmap

...