Class Rest
Assembly: Melanchall.DryWetMidi.dll
Syntax
public sealed class Rest : ILengthedObject, ITimedObject, INotifyTimeChanged, INotifyLengthChanged
Properties
EndTime
Gets the end time of an object.
Declaration
public long EndTime { get; }
Property Value
Key
Gets the key of objects the current rest has been built for. Please read
Getting objects: Rests article to
understand the key concept.
Declaration
public object Key { get; }
Property Value
Length
Gets the length of an object.
Declaration
public long Length { get; set; }
Property Value
Exceptions
Time
Gets the start time of an object.
Declaration
public long Time { get; set; }
Property Value
Exceptions
Methods
Clone()
Clones object by creating a copy of it.
Declaration
public ITimedObject Clone()
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
object |
obj |
The object to compare with the current object. |
Returns
Type |
Description |
bool |
true if the specified object is equal to the current object; otherwise, false . |
Overrides
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type |
Description |
int |
A hash code for the current object. |
Overrides
Split(long)
Splits the current object by the specified time.
Declaration
public SplitLengthedObject Split(long time)
Parameters
Type |
Name |
Description |
long |
time |
Time to split the object at. |
Returns
Type |
Description |
SplitLengthedObject |
An object containing left and right parts of the split object.
Both parts have the same type as the original object. |
Exceptions
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type |
Description |
string |
A string that represents the current object. |
Overrides
Events
LengthChanged
Occurs when the length of an object has been changed.
Declaration
public event EventHandler<LengthChangedEventArgs> LengthChanged
Event Type
TimeChanged
Occurs when the time of an object has been changed.
Declaration
public event EventHandler<TimeChangedEventArgs> TimeChanged
Event Type
Operators
operator ==(Rest, Rest)
Determines if two
Rest objects are equal.
Declaration
public static bool operator ==(Rest rest1, Rest rest2)
Parameters
Type |
Name |
Description |
Rest |
rest1 |
The first Rest to compare. |
Rest |
rest2 |
The second Rest to compare. |
Returns
Type |
Description |
bool |
true if the rests are equal, false otherwise. |
operator !=(Rest, Rest)
Determines if two
Rest objects are not equal.
Declaration
public static bool operator !=(Rest rest1, Rest rest2)
Parameters
Type |
Name |
Description |
Rest |
rest1 |
The first Rest to compare. |
Rest |
rest2 |
The second Rest to compare. |
Returns
Type |
Description |
bool |
false if the rests are equal, true otherwise. |
Implements
Extension Methods
See Also