Description
Create an interval of fixed duration specified using start and stop offsets relative to specified reference time instant.
Syntax
[Visual Basic .NET] |
---|
Public Function CreateEventIntervalFixedDuration( _
ByVal Name As String, _
ByVal Description As String _
) As
|
Parameters
See Also
Example
Create and configure fixed duration event interval.
[C#] |
---|
IAgCrdnEventInterval eventInterval = provider.EventIntervals.Factory.CreateEventIntervalFixedDuration("MyIntervalFixedDuration", "MyDescription");
IAgCrdnEventIntervalFixedDuration asFixedDuration = eventInterval as IAgCrdnEventIntervalFixedDuration;
asFixedDuration.ReferenceTimeInstant = provider.Events["AvailabilityStartTime"];
// Uses current Time unit preference, this code snippet assumes seconds.
asFixedDuration.StartOffset = 10;
// Uses current Time unit preference, this code snippet assumes seconds.
asFixedDuration.StopOffset = 360;
IAgCrdnEventIntervalResult intervalResult = eventInterval.FindInterval();
if (intervalResult.IsValid)
{
Console.WriteLine("Interval Start: " + intervalResult.Interval.Start);
Console.WriteLine("Interval Stop: " + intervalResult.Interval.Stop);
}
|
|
Create and configure fixed duration event interval.
[Visual Basic .NET] |
---|
Dim eventInterval As IAgCrdnEventInterval = provider.EventIntervals.Factory.CreateEventIntervalFixedDuration("MyIntervalFixedDuration", "MyDescription")
Dim asFixedDuration As IAgCrdnEventIntervalFixedDuration = TryCast(eventInterval, IAgCrdnEventIntervalFixedDuration)
asFixedDuration.ReferenceTimeInstant = provider.Events("AvailabilityStartTime")
' Uses current Time unit preference, this code snippet assumes seconds.
asFixedDuration.StartOffset = 10
' Uses current Time unit preference, this code snippet assumes seconds.
asFixedDuration.StopOffset = 360
Dim intervalResult As IAgCrdnEventIntervalResult = eventInterval.FindInterval()
If intervalResult.IsValid Then
Console.WriteLine("Interval Start: " + intervalResult.Interval.Start)
Console.WriteLine("Interval Stop: " + intervalResult.Interval.[Stop])
End If
|
|