瀏覽代碼

Merge branch 'Rpc' of http://192.168.100.242:3000/PRSDigital/inabox into Rpc

Frank van den Bos 2 年之前
父節點
當前提交
376e4b1748

+ 12 - 12
InABox.Core/DigitalForms/Forms/IDigitalFormInstance.cs

@@ -3,12 +3,18 @@
 namespace InABox.Core
 {
     public interface IBaseDigitalFormInstance : IEntity
+    {
+        DigitalFormLink Form { get; set; }
+        DateTime FormStarted { get; set; }
+        DateTime FormCompleted { get; set; }
+        TimeSpan FormOpen { get; set; }
+    }
+    
+    public interface ICoreDigitalFormInstance : IBaseDigitalFormInstance
     {
         [Obsolete("Replaced with Form", true)]
         QAFormLink QAForm { get; set; }
-
-        DigitalFormLink Form { get; set; }
-
+        
         [Obsolete("Replaced with FormData", true)]
         string QAData { get; set; }
 
@@ -18,26 +24,20 @@ namespace InABox.Core
 
         [Obsolete("Replaced with FormCompleted", true)]
         DateTime QACompleted { get; set; }
-
-        DateTime FormCompleted { get; set; }
-
+        
         [Obsolete("Replaced with FormCompletedBy", true)]
         UserLink QACompletedBy { get; set; }
 
         UserLink FormCompletedBy { get; set; }
 
         Location Location { get; set; }
-
-        DateTime FormStarted { get; set; }
-
-        TimeSpan FormOpen { get; set; }
-
+        
         IDigitalFormDataModel CreateDataModel(Entity? parent = null);
 
         Guid ParentID();
     }
 
-    public interface IDigitalFormInstance : IBaseDigitalFormInstance
+    public interface IDigitalFormInstance : ICoreDigitalFormInstance
     {
     }
 

+ 1 - 1
InABox.Core/DigitalForms/Layouts/Fields/IDFLayoutFormField.cs

@@ -19,7 +19,7 @@ namespace InABox.Core
     }
 
     /// <summary>
-    /// Used to specify that the data for this field should be stored in <see cref="IBaseDigitalFormInstance.BlobData"/>.
+    /// Used to specify that the data for this field should be stored in <see cref="ICoreDigitalFormInstance.BlobData"/>.
     /// </summary>
     public interface IDFBlobField { }
 }

+ 10 - 7
InABox.Server/RPC/Handlers/RPCCommandHandler.cs

@@ -28,7 +28,7 @@ namespace InABox.Rpc
             var start = DateTime.Now;
             var parameters = Serialization.ReadBinary<TParameters>(payload, BinarySerializationSettings.Latest);
             if (IsLogCommand)
-                Logger.Send(LogType.Information, session.UserID, $"[{session.Platform} {session.Version}] {parameters.ShortDescription()} {parameters.FullDescription()}");
+                Logger.Send(LogType.Information, session.UserID, $"[{session.Platform} {session.Version}] {parameters.ShortDescription()}: {parameters.FullDescription()}");
             
             try
             {
@@ -36,12 +36,15 @@ namespace InABox.Rpc
 
                 if (IsLogCommand)
                 {
-                    var description = result.FullDescription();
-                    Logger.Send(LogType.Information, session.UserID, string.Format("[{0} {1}] [{2:D8}] {3} Complete{4}",
-                        session.Platform, session.Version,
-                        (int)DateTime.Now.Subtract(start).TotalMilliseconds, 
-                        parameters.ShortDescription(),
-                        string.IsNullOrWhiteSpace(description) ? "" : $" {description}"));
+                    Logger.Send(LogType.Information, session.UserID, 
+                        string.Format(
+                            "[{0} {1}] [{2:D8}] {3} Complete: {4}",
+                            session.Platform, session.Version,
+                            (int)DateTime.Now.Subtract(start).TotalMilliseconds, 
+                            parameters.ShortDescription(),
+                            result.FullDescription()
+                        )
+                    );
                 }
 
                 return Serialization.WriteBinary(result, BinarySerializationSettings.Latest);