namespace HubService { public class ProcessStatus {
//在类下面写结构体 public struct Label { public const string SyncinventoryToOms= "inventory"; public const string GetinventoryFromLZ = "getinventoryfromlz"; } } }
try { switch (label.ToLower()) { case ProcessStatus.Label.GetinventoryFromLZ://No7:从LZ 的接口中获取数据回来 { string con = Encoding.UTF8.GetString(content); Inventory.GetLZInventory(con); break; } } } catch (Exception ex) { logger.LogInformation($"{label}......{ex.Message}"); }
原文:https://www.cnblogs.com/ZkbFighting/p/13629381.html