Reformatting using } or File.Save vs Code cleanup

Hi,

 

I am using Resharper 9.2 in VS2015.

I have this code:

private static CacheItem<PlaylistsSearchResult> RecentPublicPlaylistsCache = new CacheItem<PlaylistsSearchResult>
{
Lifetime = TimeSpan.FromMinutes(10),

 

AsyncUpdater = SearchRecentPlaylists
};

 

When re-enter the last ; nothing changes.

But when I do Resharper_SilentCleanupCode, the empty line gets removed (like I wanted):

private static CacheItem<PlaylistsSearchResult> RecentPublicPlaylistsCache = new CacheItem<PlaylistsSearchResult>
{
Lifetime = TimeSpan.FromMinutes(10),

AsyncUpdater = SearchRecentPlaylists
};

 

My Code Cleanup profile has only 'Reformat code' enabled.

I see that ; and } are causing some formatting to take place (like extra spaces) while others are not happening (like removing empty lines).

 

How can I make every } or every file save cause all the formatting to happen?

 

Thanks,

 

Avner

 

0

Please sign in to leave a comment.