From ffdaf431be5b8ee876013fa4a4f1f6149d61c3db Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Fri, 20 Oct 2017 19:40:31 -0400 Subject: [PATCH] Document Config --- TGServerService/ServerInstance/Config.cs | 7 +++++++ TGServerService/ServerInstance/ServerInstance.cs | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/TGServerService/ServerInstance/Config.cs b/TGServerService/ServerInstance/Config.cs index 7f371cbf4f..b5fb68c179 100644 --- a/TGServerService/ServerInstance/Config.cs +++ b/TGServerService/ServerInstance/Config.cs @@ -9,6 +9,9 @@ namespace TGServerService //knobs and such sealed partial class ServerInstance : ITGConfig { + /// + /// Used for multithreading safety + /// object configLock = new object(); //for atomic reads/writes /// public string ServerDirectory() @@ -100,6 +103,8 @@ namespace TGServerService return null; } } + + /// [OperationBehavior(Impersonation = ImpersonationOption.Required)] public string WriteText(string staticRelativePath, string data, out bool unauthorized) { @@ -151,6 +156,7 @@ namespace TGServerService return e.ToString(); } } + /// [OperationBehavior(Impersonation = ImpersonationOption.Required)] public string DeleteFile(string staticRelativePath, out bool unauthorized) { @@ -205,6 +211,7 @@ namespace TGServerService } } + /// [OperationBehavior(Impersonation = ImpersonationOption.Required)] public IList ListStaticDirectory(string subDir, out string error, out bool unauthorized) { diff --git a/TGServerService/ServerInstance/ServerInstance.cs b/TGServerService/ServerInstance/ServerInstance.cs index 5006d2cd82..4e33a0857c 100644 --- a/TGServerService/ServerInstance/ServerInstance.cs +++ b/TGServerService/ServerInstance/ServerInstance.cs @@ -5,12 +5,12 @@ using TGServiceInterface.Components; namespace TGServerService { //I know the fact that this is one massive partial class is gonna trigger everyone - //There really was no other succinct way to do it + //There really was no other succinct way to do it (<= He's lying through his teeth, don't listen to him) - //this line basically says make one instance of the service, use it multithreaded for requests, and never delete it + //this line basically says take one instance of the service, use it multithreaded for requests, and never delete it /// - /// The class which holds all interface components + /// The class which holds all interface components. There are no safeguards for call race conditions so these must be guarded against internally /// [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.Single)] sealed partial class ServerInstance : IDisposable, ITGSService, ITGConnectivity