Class Rest
Assembly: Melanchall.DryWetMidi.dll
Syntax
public sealed class Rest : ILengthedObject, ITimedObject, INotifyTimeChanged, INotifyLengthChanged
Properties
Channel
Gets a channel the rest was constructed for.
Declaration
public FourBitNumber? Channel { get; }
Property Value
EndTime
Gets the end time of an object.
Declaration
public long EndTime { get; }
Property Value
Length
Gets length of an object.
Declaration
public long Length { get; set; }
Property Value
NoteNumber
Gets a note number the rest was constructed for.
Declaration
public SevenBitNumber? NoteNumber { get; }
Property Value
Time
Gets start time of an object.
Declaration
public long Time { get; set; }
Property Value
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 |
Boolean |
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 |
Int32 |
A hash code for the current object. |
Overrides
Split(Int64)
Splits the current object by the specified time.
Declaration
public SplitLengthedObject Split(long time)
Parameters
Type |
Name |
Description |
Int64 |
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
Equality(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 |
Boolean |
true if the rests are equal, false otherwise. |
Inequality(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 |
Boolean |
false if the rests are equal, true otherwise. |
Implements
Extension Methods