[tomboy] Coding standards fixes.



commit a60fe43a0034d5199b6efdbbaf07eba259cd9ca6
Author: Sandy Armstrong <sanfordarmstrong gmail com>
Date:   Sun May 17 07:44:52 2009 -0700

    Coding standards fixes.
    
    Repair whitespace and replace use of "" with string.Empty.
---
 Tomboy/RemoteControl.cs               |   22 ++++++++--------
 Tomboy/Synchronization/SyncManager.cs |   43 +++++++++++++--------------------
 2 files changed, 28 insertions(+), 37 deletions(-)

diff --git a/Tomboy/RemoteControl.cs b/Tomboy/RemoteControl.cs
index 6c35cde..8e408ee 100644
--- a/Tomboy/RemoteControl.cs
+++ b/Tomboy/RemoteControl.cs
@@ -100,27 +100,27 @@ namespace Tomboy
 				Note note = note_manager.Create ();
 				return note.Uri;
 			} catch {
-			return  "";
+				return string.Empty;
+			}
 		}
-	}
 
-	public string CreateNamedNote (string linked_title)
+		public string CreateNamedNote (string linked_title)
 		{
 			Note note;
 
 			note = note_manager.Find (linked_title);
 			if (note != null)
-				return "";
+				return string.Empty;
 
 			try {
 				note = note_manager.Create (linked_title);
 				return note.Uri;
 			} catch {
-			return "";
+				return string.Empty;
+			}
 		}
-	}
 
-	public bool DeleteNote (string uri)
+		public bool DeleteNote (string uri)
 		{
 			Note note;
 
@@ -168,7 +168,7 @@ namespace Tomboy
 			Note note;
 			note = note_manager.FindByUri (uri);
 			if (note == null)
-				return "";
+				return string.Empty;
 			return note.TextContent;
 		}
 
@@ -177,7 +177,7 @@ namespace Tomboy
 			Note note;
 			note = note_manager.FindByUri (uri);
 			if (note == null)
-				return "";
+				return string.Empty;
 			return note.Title;
 		}
 
@@ -204,7 +204,7 @@ namespace Tomboy
 			Note note;
 			note = note_manager.FindByUri (uri);
 			if (note == null)
-				return "";
+				return string.Empty;
 			return note.XmlContent;
 		}
 
@@ -213,7 +213,7 @@ namespace Tomboy
 			Note note;
 			note = note_manager.FindByUri (uri);
 			if (note == null)
-				return "";
+				return string.Empty;
 			return note.GetCompleteNoteXml () ?? string.Empty;
 		}
 
diff --git a/Tomboy/Synchronization/SyncManager.cs b/Tomboy/Synchronization/SyncManager.cs
index a856ab4..4fef1e0 100644
--- a/Tomboy/Synchronization/SyncManager.cs
+++ b/Tomboy/Synchronization/SyncManager.cs
@@ -474,9 +474,9 @@ namespace Tomboy.Sync
 						server.CancelSyncTransaction ();
 				} catch {}
 			} finally {
-			syncThread = null;
-			try {
-				addin.PostSyncCleanup ();
+				syncThread = null;
+				try {
+					addin.PostSyncCleanup ();
 				} catch (Exception e) {
 					Logger.Error ("Error cleaning up addin after sync: " +
 					              e.Message + "\n" +
@@ -822,37 +822,28 @@ namespace Tomboy.Sync
 		IDictionary<string, NoteUpdate> GetNoteUpdatesSince (int revision);
 		void DeleteNotes (IList<string> deletedNoteUUIDs);
 		void UploadNotes (IList<Note> notes);
-		int LatestRevision { get;
-			                   }
-			SyncLockInfo CurrentSyncLock { get;
-				                             }
-				string Id { get;
-					          }
-				}
+		int LatestRevision { get; }
+		SyncLockInfo CurrentSyncLock { get; }
+		string Id { get; }
+	}
 
 	public interface SyncClient
 	{
-		int LastSynchronizedRevision { get;
-			                               set;
-				                             }
-				DateTime LastSyncDate { get;
-					                        set;
-						                      }
-						int GetRevision (Note note);
+		int LastSynchronizedRevision { get; set; }
+		DateTime LastSyncDate { get; set; }
+		int GetRevision (Note note);
 		void SetRevision (Note note, int revision);
-		IDictionary<string, string> DeletedNoteTitles { get;
-			                                              }
-			void Reset ();
-		string AssociatedServerId { get;
-			                            set;
-				                          }
-			}
+		IDictionary<string, string> DeletedNoteTitles { get; }
+		void Reset ();
+		string AssociatedServerId { get; set; }
+	}
 
 	public class TomboySyncException : ApplicationException
 	{
-public TomboySyncException (string message) :
+		public TomboySyncException (string message) :
 		base (message) {}
-public TomboySyncException (string message, Exception innerException) :
+
+		public TomboySyncException (string message, Exception innerException) :
 		base (message, innerException) {}
 	}
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]