@@ -9,20 +9,20 @@ namespace Spotify
9
9
public class PlaylistContainer : DomainObject
10
10
{
11
11
#region Events
12
- public event EventHandler < PlaylistAddedEventArgs > OnPlaylistAdded ;
13
- public event EventHandler < PlaylistRemovedEventArgs > OnPlaylistRemoved ;
14
- public event EventHandler OnPlaylistMoved ;
15
- public event EventHandler OnLoaded ;
12
+ public event EventHandler < PlaylistAddedEventArgs > PlaylistAdded ;
13
+ public event EventHandler < PlaylistRemovedEventArgs > PlaylistRemoved ;
14
+ public event EventHandler PlaylistMoved ;
15
+ public event EventHandler Loaded ;
16
16
#endregion
17
17
18
18
internal PlaylistContainer ( IntPtr handle , bool preIncremented = true )
19
19
: base ( handle , LibSpotify . sp_playlistcontainer_add_ref_r , LibSpotify . sp_playlistcontainer_release_r , preIncremented )
20
20
{
21
21
LibSpotify . sp_playlistcontainer_callbacks callbacks = new LibSpotify . sp_playlistcontainer_callbacks ( ) ;
22
- callbacks . playlist_added = RaisePlaylistAdded ;
23
- callbacks . playlist_removed = RaisePlaylistRemoved ;
24
- callbacks . playlist_moved = RaisePlaylistMoved ;
25
- callbacks . container_loaded = RaiseContainerLoaded ;
22
+ callbacks . playlist_added = OnPlaylistAdded ;
23
+ callbacks . playlist_removed = OnPlaylistRemoved ;
24
+ callbacks . playlist_moved = OnPlaylistMoved ;
25
+ callbacks . container_loaded = OnContainerLoaded ;
26
26
27
27
ThrowHelper . ThrowIfError ( LibSpotify . sp_playlistcontainer_add_callbacks_r ( Handle ,
28
28
ref callbacks , IntPtr . Zero ) ) ;
@@ -134,26 +134,26 @@ public void AddFolder(int index, string name)
134
134
135
135
136
136
#region Private Methods
137
- private void RaiseContainerLoaded ( IntPtr playlistContainer , IntPtr state )
137
+ private void OnContainerLoaded ( IntPtr playlistContainer , IntPtr state )
138
138
{
139
- EventDispatcher . Dispatch ( this , playlistContainer , OnLoaded , EventArgs . Empty ) ;
139
+ EventDispatcher . Dispatch ( this , playlistContainer , Loaded , EventArgs . Empty ) ;
140
140
}
141
141
142
- private void RaisePlaylistAdded ( IntPtr playlistContainer , IntPtr playlist , int position , IntPtr state )
142
+ private void OnPlaylistAdded ( IntPtr playlistContainer , IntPtr playlist , int position , IntPtr state )
143
143
{
144
- EventDispatcher . Dispatch ( this , playlistContainer , OnPlaylistAdded ,
144
+ EventDispatcher . Dispatch ( this , playlistContainer , PlaylistAdded ,
145
145
new PlaylistAddedEventArgs ( playlist , position ) ) ;
146
146
}
147
147
148
- private void RaisePlaylistMoved ( IntPtr playlistContainer , IntPtr playlist , int position , int newPosition , IntPtr state )
148
+ private void OnPlaylistMoved ( IntPtr playlistContainer , IntPtr playlist , int position , int newPosition , IntPtr state )
149
149
{
150
- EventDispatcher . Dispatch ( this , playlistContainer , OnPlaylistMoved ,
150
+ EventDispatcher . Dispatch ( this , playlistContainer , PlaylistMoved ,
151
151
new PlaylistMovedEventArgs ( playlist , position , newPosition ) ) ;
152
152
}
153
153
154
- private void RaisePlaylistRemoved ( IntPtr playlistContainer , IntPtr playlist , int position , IntPtr state )
154
+ private void OnPlaylistRemoved ( IntPtr playlistContainer , IntPtr playlist , int position , IntPtr state )
155
155
{
156
- EventDispatcher . Dispatch ( this , playlistContainer , OnPlaylistRemoved ,
156
+ EventDispatcher . Dispatch ( this , playlistContainer , PlaylistRemoved ,
157
157
new PlaylistRemovedEventArgs ( playlist , position ) ) ;
158
158
}
159
159
#endregion
0 commit comments