Code Block |
---|
public interface ITime // already strange to have an empty interface
{
}
public interface ITimeSpan : ITime
{
ITimeStamp Start {get;}
ITimeStamp End {get;}
}
public interface ITimeStamp : ITime
{
double ModifiedJulianDay {get;}
}
public interface ILinkableComponent
{
ITimeSpan TimeHorizon { get; }
void Update(ITime time);
}
|
Code Block |
---|
public interface ILinkableComponent
{
DateTime TimeHorizonStart { get; }
DateTime TimeHorizonEnd { get; }
void Update(DateTime);
}
|
Advantages:
- Simplifies SDK
- Simpler to use since date types are standard
Another issue is related to time zone. If we need to use it - then DateTimeOffset type should be used which actually is a DateTime plus TimeSpan defining time zone.