From 125b1babbcaf5f7f4f61f021211fd609a11fc402 Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Fri, 20 Oct 2017 15:42:23 -0400 Subject: [PATCH] Replace all "public api" with proper inheritdoc comments --- TGServerService/ServerInstance/Byond.cs | 8 ++-- TGServerService/ServerInstance/Chat.cs | 8 ++-- TGServerService/ServerInstance/Compiler.cs | 12 +++--- TGServerService/ServerInstance/Config.cs | 4 +- TGServerService/ServerInstance/DreamDaemon.cs | 30 +++++++------- TGServerService/ServerInstance/Repository.cs | 40 +++++++++---------- .../ServerInstance/ServerInstance.cs | 6 +-- 7 files changed, 54 insertions(+), 54 deletions(-) diff --git a/TGServerService/ServerInstance/Byond.cs b/TGServerService/ServerInstance/Byond.cs index 3c2ede7354..bc0baa4e3e 100644 --- a/TGServerService/ServerInstance/Byond.cs +++ b/TGServerService/ServerInstance/Byond.cs @@ -72,7 +72,7 @@ namespace TGServerService } } - //public api + /// public ByondStatus CurrentStatus() { lock (ByondLock) @@ -81,7 +81,7 @@ namespace TGServerService } } - //public api + /// public string GetError() { lock (ByondLock) @@ -92,7 +92,7 @@ namespace TGServerService } } - //public api + /// public string GetVersion(ByondVersion type) { try @@ -236,7 +236,7 @@ namespace TGServerService } } } - //public api for kicking off the update thread + /// public bool UpdateToVersion(int ma, int mi) { lock (ByondLock) diff --git a/TGServerService/ServerInstance/Chat.cs b/TGServerService/ServerInstance/Chat.cs index 64cd4f8b0b..e750f13070 100644 --- a/TGServerService/ServerInstance/Chat.cs +++ b/TGServerService/ServerInstance/Chat.cs @@ -102,7 +102,7 @@ namespace TGServerService return infosList; } - //public api + /// IList InitProviderInfos() { lock (ChatLock) @@ -145,7 +145,7 @@ namespace TGServerService return InitProviderInfos(); } - //public api + /// public string SetProviderInfo(ChatSetupInfo info) { try @@ -164,7 +164,7 @@ namespace TGServerService } } - //public api + /// public bool Connected(ChatProvider providerType) { foreach (var I in ChatProviders) @@ -183,7 +183,7 @@ namespace TGServerService Reconnect(I); } - //public api + /// public string Reconnect(ChatProvider providerType) { foreach (var I in ChatProviders) diff --git a/TGServerService/ServerInstance/Compiler.cs b/TGServerService/ServerInstance/Compiler.cs index 25f839bf3a..3f10685122 100644 --- a/TGServerService/ServerInstance/Compiler.cs +++ b/TGServerService/ServerInstance/Compiler.cs @@ -58,7 +58,7 @@ namespace TGServerService compilerCurrentStatus = IsInitialized(); } - //public api + /// public CompilerStatus GetStatus() { lock (CompilerLock) @@ -67,7 +67,7 @@ namespace TGServerService } } - //public api + /// public string CompileError() { lock (CompilerLock) @@ -103,7 +103,7 @@ namespace TGServerService return compilerCurrentStatus == CompilerStatus.Uninitialized || compilerCurrentStatus == CompilerStatus.Initialized; } - //public api + /// public bool Initialize() { lock (CompilerLock) @@ -582,7 +582,7 @@ namespace TGServerService } } //kicks off the compiler thread - //public api + /// public bool Compile(bool silent = false) { lock (CompilerLock) @@ -598,7 +598,7 @@ namespace TGServerService return true; } - //public api + /// public string ProjectName() { lock (CompilerLock) @@ -607,7 +607,7 @@ namespace TGServerService } } - //public api + /// public void SetProjectName(string projectName) { lock (CompilerLock) diff --git a/TGServerService/ServerInstance/Config.cs b/TGServerService/ServerInstance/Config.cs index b5b6bc0dfb..7f22f6d1ee 100644 --- a/TGServerService/ServerInstance/Config.cs +++ b/TGServerService/ServerInstance/Config.cs @@ -10,13 +10,13 @@ namespace TGServerService partial class ServerInstance : ITGConfig { object configLock = new object(); //for atomic reads/writes - //public api + /// public string ServerDirectory() { return Environment.CurrentDirectory; } - //public api + /// [OperationBehavior(Impersonation = ImpersonationOption.Required)] public string ReadText(string staticRelativePath, bool repo, out string error, out bool unauthorized) { diff --git a/TGServerService/ServerInstance/DreamDaemon.cs b/TGServerService/ServerInstance/DreamDaemon.cs index b924ec6dea..9db5a0e14b 100644 --- a/TGServerService/ServerInstance/DreamDaemon.cs +++ b/TGServerService/ServerInstance/DreamDaemon.cs @@ -130,7 +130,7 @@ namespace TGServerService catch { } } - //public api + /// public DreamDaemonStatus DaemonStatus() { lock (watchdogLock) @@ -139,13 +139,13 @@ namespace TGServerService } } - //public api + /// public void RequestRestart() { SendCommand(SCHardReboot); } - //public api + /// public void RequestStop() { lock (watchdogLock) @@ -157,7 +157,7 @@ namespace TGServerService SendCommand(SCGracefulShutdown); } - //public api + /// public string Stop() { Thread t; @@ -176,7 +176,7 @@ namespace TGServerService return "Server not running"; } - //public api + /// public void SetPort(ushort new_port) { lock (watchdogLock) @@ -203,7 +203,7 @@ namespace TGServerService ThreadPool.QueueUserWorkItem(_ => { Stop(); }); } - //public api + /// public string Restart() { if (DaemonStatus() == DreamDaemonStatus.Offline) @@ -379,7 +379,7 @@ namespace TGServerService WriteCurrentDDLog(String.Format("CPU: {1}% Memory: {0}MB", megamem, PercentCpuTime.ToString("D3"))); } - //public api + /// public string CanStart() { lock (watchdogLock) @@ -398,7 +398,7 @@ namespace TGServerService return null; } - //public api + /// public string Start() { if (CurrentStatus() == ByondStatus.Staged) @@ -496,7 +496,7 @@ namespace TGServerService } } - //public api + /// public DreamDaemonSecurity SecurityLevel() { lock (watchdogLock) @@ -505,7 +505,7 @@ namespace TGServerService } } - //public api + /// public bool SetSecurityLevel(DreamDaemonSecurity level) { var Config = Properties.Settings.Default; @@ -521,19 +521,19 @@ namespace TGServerService return DaemonStatus() != DreamDaemonStatus.Online; } - //public api + /// public bool Autostart() { return Properties.Settings.Default.DDAutoStart; } - //public api + /// public void SetAutostart(bool on) { Properties.Settings.Default.DDAutoStart = on; } - //public api + /// public string StatusString(bool includeMetaInfo) { const string visSecStr = " (Sec: {0})"; @@ -568,13 +568,13 @@ namespace TGServerService return res; } - //public api + /// public ushort Port() { return Properties.Settings.Default.ServerPort; } - //public api + /// public bool ShutdownInProgress() { lock (watchdogLock) diff --git a/TGServerService/ServerInstance/Repository.cs b/TGServerService/ServerInstance/Repository.cs index 47f87e6d2b..39e331dfcf 100644 --- a/TGServerService/ServerInstance/Repository.cs +++ b/TGServerService/ServerInstance/Repository.cs @@ -171,8 +171,8 @@ namespace TGServerService var J = new RepoConfig(false); return I == J; } - - //public api + + /// public bool OperationInProgress() { lock (RepoLock) @@ -181,7 +181,7 @@ namespace TGServerService } } - //public api + /// public int CheckoutProgress() { return currentProgress; @@ -215,7 +215,7 @@ namespace TGServerService } } - //public api + /// public bool Exists() { lock (RepoLock) @@ -394,7 +394,7 @@ namespace TGServerService } //kicks off the cloning thread - //public api + /// public string Setup(string RepoURL, string BranchName) { lock (RepoLock) @@ -448,19 +448,19 @@ namespace TGServerService } //moist shleppy noises - //public api + /// public string GetHead(bool useTracked, out string error) { return GetShaOrBranch(out error, false, useTracked); } - //public api + /// public string GetBranch(out string error) { return GetShaOrBranch(out error, true, false); } - //public api + /// public string GetRemote(out string error) { try @@ -499,7 +499,7 @@ namespace TGServerService } } - //public api + /// public string Checkout(string sha) { if (sha == LiveTrackingBranch) @@ -568,7 +568,7 @@ namespace TGServerService return null; } - //public api + /// public string Update(bool reset) { return UpdateImpl(reset, true); @@ -710,7 +710,7 @@ namespace TGServerService } } - //public api + /// public string Reset(bool trackedBranch) { lock (RepoLock) @@ -768,7 +768,7 @@ namespace TGServerService File.WriteAllText(PRJobFile, rawdata); } - //public api + /// public string MergePullRequest(int PRNumber) { return MergePullRequestImpl(PRNumber, false); @@ -880,7 +880,7 @@ namespace TGServerService } } - //public api + /// public IList MergedPullRequests(out string error) { lock (RepoLock) @@ -908,7 +908,7 @@ namespace TGServerService } } - //public api + /// public string GetCommitterName() { lock (RepoLock) @@ -917,7 +917,7 @@ namespace TGServerService } } - //public api + /// public void SetCommitterName(string newName) { lock (RepoLock) @@ -926,7 +926,7 @@ namespace TGServerService } } - //public api + /// public string GetCommitterEmail() { lock (RepoLock) @@ -935,7 +935,7 @@ namespace TGServerService } } - //public api + /// public void SetCommitterEmail(string newEmail) { lock (RepoLock) @@ -1035,7 +1035,7 @@ namespace TGServerService } } - //public api + /// string Push() { if (LocalIsRemote()) //nothing to push @@ -1088,7 +1088,7 @@ namespace TGServerService }; } - //public api + /// public string GenerateChangelog(out string error) { return GenerateChangelogImpl(out error); @@ -1229,7 +1229,7 @@ namespace TGServerService } } - //public api + /// public bool SetPythonPath(string path) { if (!Directory.Exists(path)) diff --git a/TGServerService/ServerInstance/ServerInstance.cs b/TGServerService/ServerInstance/ServerInstance.cs index df1703d18c..bd3e7d34f3 100644 --- a/TGServerService/ServerInstance/ServerInstance.cs +++ b/TGServerService/ServerInstance/ServerInstance.cs @@ -34,16 +34,16 @@ namespace TGServerService DisposeChat(); } - //public api + /// public string Version() { return Service.Version; } - //public api + /// public void VerifyConnection() { } - //public api + /// public void PrepareForUpdate() { Properties.Settings.Default.ReattachToDD = true;