mirror of
				https://github.com/esiur/esiur-dotnet.git
				synced 2025-10-31 16:01:34 +00:00 
			
		
		
		
	Cleaning
This commit is contained in:
		| @@ -66,9 +66,11 @@ public class AsyncReply | ||||
|     public bool Ready | ||||
|     { | ||||
|         get { return resultReady; } | ||||
|  | ||||
|     } | ||||
|  | ||||
|     public bool Failed => exception != null; | ||||
|  | ||||
|     public Exception Exception => exception; | ||||
|  | ||||
|     public object Wait() | ||||
|     { | ||||
|   | ||||
| @@ -1,4 +1,5 @@ | ||||
| using System; | ||||
| using Esiur.Misc; | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.Runtime.CompilerServices; | ||||
| using System.Text; | ||||
| @@ -27,7 +28,7 @@ public class AsyncReplyBuilder | ||||
|  | ||||
|     public void SetStateMachine(IAsyncStateMachine stateMachine) | ||||
|     { | ||||
|         Console.WriteLine("SetStateMachine"); | ||||
|         Global.Log("AsyncReplyBuilder", LogType.Debug, "SetStateMachine"); | ||||
|     } | ||||
|  | ||||
|     public void SetException(Exception exception) | ||||
|   | ||||
| @@ -1,4 +1,5 @@ | ||||
| using System; | ||||
| using Esiur.Misc; | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.Runtime.CompilerServices; | ||||
| using System.Text; | ||||
| @@ -27,7 +28,7 @@ public class AsyncReplyBuilder<T> | ||||
|  | ||||
|     public void SetStateMachine(IAsyncStateMachine stateMachine) | ||||
|     { | ||||
|         Console.WriteLine("SetStateMachine"); | ||||
|         Global.Log("AsyncReplyBuilderGeneric", LogType.Debug, "SetStateMachine"); | ||||
|     } | ||||
|  | ||||
|     public void SetException(Exception exception) | ||||
|   | ||||
| @@ -7,6 +7,7 @@ using System.Text; | ||||
| using Esiur.Data; | ||||
| using Esiur.Resource.Template; | ||||
| using System.Linq; | ||||
| using Esiur.Misc; | ||||
|  | ||||
| namespace Esiur.Data; | ||||
|  | ||||
| @@ -182,7 +183,7 @@ public static class DataDeserializer | ||||
|                         } | ||||
|                         catch (Exception ex) | ||||
|                         { | ||||
|                             Console.WriteLine(ex); | ||||
|                             Global.Log(ex); | ||||
|                         } | ||||
|                     } | ||||
|  | ||||
|   | ||||
| @@ -5,7 +5,7 @@ | ||||
|     <Copyright>Ahmed Kh. Zamil</Copyright> | ||||
|      <PackageProjectUrl>http://www.esiur.com</PackageProjectUrl> | ||||
|     <GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||||
|     <Version>2.4.2</Version> | ||||
|     <Version>2.4.3</Version> | ||||
|     <RepositoryUrl>https://github.com/esiur/esiur-dotnet</RepositoryUrl> | ||||
|     <Authors>Ahmed Kh. Zamil</Authors> | ||||
|     <AssemblyVersion></AssemblyVersion> | ||||
|   | ||||
| @@ -1502,7 +1502,7 @@ public partial class DistributedConnection : NetworkConnection, IStore | ||||
|         } | ||||
|         catch (Exception ex) | ||||
|         { | ||||
|             Console.WriteLine(ex); | ||||
|             Global.Log(ex); | ||||
|         } | ||||
|         finally | ||||
|         { | ||||
| @@ -1654,7 +1654,7 @@ public partial class DistributedConnection : NetworkConnection, IStore | ||||
|  | ||||
|                     var link = DC.ToBytes(r.DistributedResourceLink); | ||||
|  | ||||
|                     Console.WriteLine("Restoreing " + r.DistributedResourceLink); | ||||
|                     Global.Log("DistributedConnection", LogType.Debug, "Restoreing " + r.DistributedResourceLink); | ||||
|  | ||||
|                     try | ||||
|                     { | ||||
| @@ -1683,7 +1683,7 @@ public partial class DistributedConnection : NetworkConnection, IStore | ||||
|  | ||||
|                             await Fetch(id, null); | ||||
|  | ||||
|                             Console.WriteLine("Restored " + id); | ||||
|                             Global.Log("DistributedConnection", LogType.Debug, "Restored " + id); | ||||
|                         } | ||||
|                     } | ||||
|                     catch (AsyncException ex) | ||||
|   | ||||
| @@ -601,8 +601,9 @@ partial class DistributedConnection | ||||
|             { | ||||
|                 // reply failed | ||||
|                 //SendParams(0x80, r.Instance.Id, r.Instance.Age, r.Instance.Serialize(false, this)); | ||||
|                 Console.WriteLine("Not found " + resourceId); | ||||
|                  | ||||
|  | ||||
|                 Global.Log("DistributedConnection", LogType.Debug, "Not found " + resourceId); | ||||
|  | ||||
|                 SendError(ErrorType.Management, callback, (ushort)ExceptionCode.ResourceNotFound); | ||||
|             } | ||||
|         }); | ||||
|   | ||||
| @@ -413,7 +413,7 @@ public class DistributedResource : DynamicObject, IResource, INotifyPropertyChan | ||||
|     /// <returns>Indicator when the property is set.</returns> | ||||
|     protected object _SetSync(byte index, object value) | ||||
|     { | ||||
|         Console.WriteLine("Setting..." + index + " " + value); | ||||
|         //Console.WriteLine("Setting..." + index + " " + value); | ||||
|  | ||||
|         if (destroyed) | ||||
|             throw new Exception("Trying to access a destroyed object."); | ||||
| @@ -433,7 +433,7 @@ public class DistributedResource : DynamicObject, IResource, INotifyPropertyChan | ||||
|  | ||||
|         var rt = _Set(index, value).Wait(); | ||||
|  | ||||
|         Console.WriteLine("Done Setting"); | ||||
|         //Console.WriteLine("Done Setting"); | ||||
|         return rt; | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -145,7 +145,7 @@ public abstract class NetworkServer<TConnection> : IDestructible where TConnecti | ||||
|                 } | ||||
|                 catch (Exception ex) | ||||
|                 { | ||||
|                     Console.WriteLine(ex); | ||||
|                     Global.Log(ex); | ||||
|                 } | ||||
|             } | ||||
|         })); | ||||
| @@ -210,7 +210,7 @@ public abstract class NetworkServer<TConnection> : IDestructible where TConnecti | ||||
|         } | ||||
|         finally | ||||
|         { | ||||
|             Console.WriteLine("Server@{0} is down", port); | ||||
|             Global.Log("NetworkServer", LogType.Warning, $"Server@{port} is down."); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -207,8 +207,8 @@ public class WebsocketPacket : Packet | ||||
|         } | ||||
|         catch (Exception ex) | ||||
|         { | ||||
|             Console.WriteLine(ex.ToString()); | ||||
|             Console.WriteLine(offset + "::" + data.ToHex()); | ||||
|             Global.Log(ex); | ||||
|             Global.Log("WebsocketPacket", Core.LogType.Debug, offset + "::" + data.ToHex()); | ||||
|             throw ex; | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -458,7 +458,7 @@ public class TCPSocket : ISocket | ||||
|         } | ||||
|         catch (Exception ex) | ||||
|         { | ||||
|             Console.WriteLine(ex); | ||||
|             Global.Log(ex); | ||||
|         } | ||||
|         finally | ||||
|         { | ||||
|   | ||||
| @@ -316,7 +316,9 @@ public class WSocket : ISocket, INetworkReceiver<ISocket> | ||||
|  | ||||
|             } | ||||
|             else | ||||
|                 Console.WriteLine("Unknown WS opcode:" + pkt_receive.Opcode); | ||||
|             { | ||||
|                 Global.Log("WSocket", LogType.Debug, "Unknown WS opcode:" + pkt_receive.Opcode); | ||||
|             } | ||||
|  | ||||
|             if (offset == msg.Length) | ||||
|             { | ||||
|   | ||||
| @@ -186,7 +186,7 @@ public static class Warehouse | ||||
|  | ||||
|             if (!rt) | ||||
|             { | ||||
|                 Console.WriteLine($"Resource failed at Initialize {r.Instance.Name} [{r.Instance.Template.ClassName}]"); | ||||
|                 Global.Log("Warehouse", LogType.Warning, $"Resource failed at Initialize {r.Instance.Name} [{r.Instance.Template.ClassName}]"); | ||||
|             } | ||||
|             //} | ||||
|         } | ||||
| @@ -199,7 +199,7 @@ public static class Warehouse | ||||
|             var rt = await r.Trigger(ResourceTrigger.SystemInitialized); | ||||
|             if (!rt) | ||||
|             { | ||||
|                 Console.WriteLine($"Resource failed at SystemInitialized {r.Instance.Name} [{r.Instance.Template.ClassName}]"); | ||||
|                 Global.Log("Warehouse", LogType.Warning, $"Resource failed at SystemInitialized {r.Instance.Name} [{r.Instance.Template.ClassName}]"); | ||||
|             } | ||||
|             //return false; | ||||
|             //} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user