public void Run([TimerTrigger("*/15 * * * * *")] TimerInfo myTimer)
        {
            Pod pod = new Pod();

            pod.Id         = new Guid("678137fc-6ccc-49f8-ae51-dea9e921ee5e");
            pod.InsertDate = new DateTime(2020, 2, 25);
            pod.PodNo      = "IT123";

            Pdr pdr = new Pdr();

            pdr.Id         = new Guid("e95319e4-3782-43f6-ae0c-28495cbe53a3");
            pdr.InsertDate = new DateTime(2020, 2, 25);
            pdr.PdrNo      = "00123";

            var    invCommPod = _supplyPointFactory.GetSupplyPointMapper(pod).ToInvCommunication(pod);
            var    invCommPdr = _supplyPointFactory.GetSupplyPointMapper(pdr).ToInvCommunication(pdr);
            var    podNav     = _supplyPointFactory.GetSupplyPointMapper(pod).ToSupplyPointStatus(pod);
            NavPod navPod     = podNav as NavPod;
            var    pdrNav     = _supplyPointFactory.GetSupplyPointMapper(pdr).ToSupplyPointStatus(pdr);
            NavPdr navPdr     = pdrNav as NavPdr;

            //Console.WriteLine(JsonSerializer.Serialize(invCommPod));
            Console.WriteLine(JsonSerializer.Serialize(navPod));
            //Console.WriteLine(JsonSerializer.Serialize(invCommPdr));
            Console.WriteLine(JsonSerializer.Serialize(navPdr));
        }
    private static int GetSDKVer(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 0);
        string sDKVer = Pdr.GetSDKVer();

        LuaScriptMgr.Push(L, sDKVer);
        return(1);
    }
    private static int Log(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        Pdr    pdr       = (Pdr)LuaScriptMgr.GetUnityObjectSelf(L, 1, "com.tencent.pandora.Pdr");
        string luaString = LuaScriptMgr.GetLuaString(L, 2);

        pdr.Log(luaString);
        return(0);
    }
示例#4
0
        public override NavSupplyPoint ToSupplyPointStatus(SupplyPoint supplyPoint)
        {
            Pdr pdr = supplyPoint as Pdr;

            return(new NavPdr()
            {
                Id = supplyPoint.Id, Text = "Pdr text", PdrNo = pdr.PdrNo
            });
        }
    private static int SendPandoraLibCmd(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 4);
        int    number    = (int)LuaScriptMgr.GetNumber(L, 1);
        string luaString = LuaScriptMgr.GetLuaString(L, 2);
        int    iLength   = (int)LuaScriptMgr.GetNumber(L, 3);
        int    iFlag     = (int)LuaScriptMgr.GetNumber(L, 4);

        Pdr.SendPandoraLibCmd(number, luaString, iLength, iFlag);
        return(0);
    }
 private static int LuaReady(IntPtr L)
 {
     LuaScriptMgr.CheckArgsCount(L, 1);
     Pdr.LuaReady(LuaScriptMgr.GetBoolean(L, 1));
     return(0);
 }
 private static int DoString(IntPtr L)
 {
     LuaScriptMgr.CheckArgsCount(L, 1);
     Pdr.DoString(LuaScriptMgr.GetLuaString(L, 1));
     return(0);
 }