79 lines
2.2 KiB
C#
79 lines
2.2 KiB
C#
namespace DynamicBinaryStream.Model;
|
|
|
|
public class LyricsSource : ILyricsSource
|
|
{
|
|
public async IAsyncEnumerable<string> GetSongLyrics()
|
|
{
|
|
int lineIndex = 0;
|
|
|
|
while (true)
|
|
{
|
|
yield return Lyrics[lineIndex];
|
|
|
|
lineIndex = (lineIndex + 1) % Lyrics.Length;
|
|
|
|
await Task.Delay(millisecondsDelay: 200);
|
|
}
|
|
}
|
|
|
|
const string Song =
|
|
@"We're no strangers to love
|
|
You know the rules and so do I
|
|
A full commitment's what I'm thinking of
|
|
You wouldn't get this from any other guy
|
|
I just wanna tell you how I'm feeling
|
|
Gotta make you understand
|
|
Never gonna give you up
|
|
Never gonna let you down
|
|
Never gonna run around and desert you
|
|
Never gonna make you cry
|
|
Never gonna say goodbye
|
|
Never gonna tell a lie and hurt you
|
|
We've known each other for so long
|
|
Your heart's been aching but you're too shy to say it
|
|
Inside we both know what's been going on
|
|
We know the game and we're gonna play it
|
|
And if you ask me how I'm feeling
|
|
Don't tell me you're too blind to see
|
|
Never gonna give you up
|
|
Never gonna let you down
|
|
Never gonna run around and desert you
|
|
Never gonna make you cry
|
|
Never gonna say goodbye
|
|
Never gonna tell a lie and hurt you
|
|
Never gonna give you up
|
|
Never gonna let you down
|
|
Never gonna run around and desert you
|
|
Never gonna make you cry
|
|
Never gonna say goodbye
|
|
Never gonna tell a lie and hurt you
|
|
Never gonna give, never gonna give
|
|
(Give you up)
|
|
(Ooh) Never gonna give, never gonna give
|
|
(Give you up)
|
|
We've known each other for so long
|
|
Your heart's been aching but you're too shy to say it
|
|
Inside we both know what's been going on
|
|
We know the game and we're gonna play it
|
|
I just wanna tell you how I'm feeling
|
|
Gotta make you understand
|
|
Never gonna give you up
|
|
Never gonna let you down
|
|
Never gonna run around and desert you
|
|
Never gonna make you cry
|
|
Never gonna say goodbye
|
|
Never gonna tell a lie and hurt you
|
|
Never gonna give you up
|
|
Never gonna let you down
|
|
Never gonna run around and desert you
|
|
Never gonna make you cry
|
|
Never gonna say goodbye
|
|
Never gonna tell a lie and hurt you
|
|
Never gonna give you up
|
|
Never gonna let you down
|
|
Never gonna run around and desert you
|
|
Never gonna make you cry";
|
|
|
|
readonly string[] Lyrics = Song.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries).ToArray();
|
|
}
|