当前位置: 首页>>代码示例>>C#>>正文


C# Resolver类代码示例

本文整理汇总了C#中Resolver的典型用法代码示例。如果您正苦于以下问题:C# Resolver类的具体用法?C# Resolver怎么用?C# Resolver使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Resolver类属于命名空间,在下文中一共展示了Resolver类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ScanBarcode

    public override Resolver ScanBarcode(Resolver resolver)
    {
        try
        {
            resolver.IsCSClient = true;
            resolver = TheResolverMgr.Resolve(resolver);

            //KSS 客户化,只有手持扫描枪需要B/S打印监控
            //if ((resolver.ModuleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIP || resolver.ModuleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIPORDER)
            //    && resolver.NeedPrintAsn && resolver.PrintUrl != null && resolver.PrintUrl.Trim() != string.Empty)
            //{
            //    //resolver.PrintUrl = null;
            //    InProcessLocation inProcessLocation = TheInProcessLocationMgr.LoadInProcessLocation(resolver.Code);
            //    inProcessLocation.IsPrinted = true;//to be refactored
            //    TheInProcessLocationMgr.UpdateInProcessLocation(inProcessLocation);
            //}
            return resolver;
        }
        catch (BusinessErrorException ex)
        {
            string exMessage = RenderingLanguage(ex.Message, resolver.UserCode, ex.MessageParams);
            throw new SoapException(exMessage, SoapException.ServerFaultCode, string.Empty);
        }
        catch (Exception ex)
        {
            throw new SoapException(ex.Message, SoapException.ServerFaultCode, string.Empty);
        }
    }
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:28,代码来源:ClientMgrWS.cs

示例2: SetDetail

 protected override void SetDetail(Resolver resolver)
 {
     LocationLotDetail locationLotDetail = locationLotDetailMgrE.CheckLoadHuLocationLotDetail(resolver.Input, resolver.UserCode);
     TransformerDetail transformerDetail = TransformerHelper.ConvertLocationLotDetailToTransformerDetail(locationLotDetail, false);
     resolver.AddTransformerDetail(transformerDetail);
     resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMERDETAIL;
 }
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:7,代码来源:InspectionMgr.cs

示例3: ResolveHostnameIP

        //private static readonly string openDnsResolver2 = "208.67.220.220";
        /// <summary>
        /// Resolves the IP address of the specified hostname.
        /// </summary>
        /// <param name="hostname">The hostname.</param>
        /// <returns>IPAddress instance.</returns>
        public IPAddress ResolveHostnameIP(string hostname)
        {
            if (!NetworkInterface.GetIsNetworkAvailable())
            {
                throw new ApplicationException(Text.Error_NoNetwork);
            }

            Resolver resolver = new Resolver(openDnsResolver1);
            IPHostEntry host = resolver.GetHostEntry(hostname);

            if (host == null || host.AddressList == null || host.AddressList.Length <= 0)
            {
                throw new ApplicationException(string.Format(Text.Error_CantResolveHostnameIP, hostname));
            }

            IPAddress result = host
                .AddressList
                .FirstOrDefault(ip => ip.AddressFamily == AddressFamily.InterNetwork);

            if (result == null)
            {
                throw new ApplicationException(string.Format(Text.Error_CantResolveHostnameIP, hostname));
            }

            log.DebugFormat(Text.Debug_ResolvedHostname, hostname, result.ToString());

            return result;
        }
开发者ID:mikerobski,项目名称:DnsUpdater,代码行数:34,代码来源:InternetTools.cs

示例4: FillResolverByASN

        public void FillResolverByASN(Resolver resolver)
        {
            User user = userMgrE.CheckAndLoadUser(resolver.UserCode);
            InProcessLocation inProcessLocation = inProcessLocationMgrE.CheckAndLoadInProcessLocation(resolver.Input);

            //if (!user.HasPermission(inProcessLocation.PartyFrom.Code) ||
            //    !user.HasPermission(inProcessLocation.PartyTo.Code))
            //{
            //    throw new BusinessErrorException("Common.Business.Error.NoPermission");
            //}

            #region CopyProperty from ASN
            resolver.Code = inProcessLocation.IpNo;
            resolver.Status = inProcessLocation.Status;
            //resolver.IsDetailContainHu = inProcessLocation.IsDetailContainHu;
            resolver.IsScanHu = inProcessLocation.IsReceiptScanHu;
            if (inProcessLocation.InProcessLocationDetails != null && inProcessLocation.InProcessLocationDetails.Count > 0)
            {
                OrderHead orderHead =  inProcessLocation.InProcessLocationDetails[0].OrderLocationTransaction.OrderDetail.OrderHead;
                resolver.AntiResolveHu = orderHead.AntiResolveHu;
                resolver.FulfillUnitCount = orderHead.FulfillUnitCount;
                resolver.AllowExceed = orderHead.AllowExceed;
            }
            resolver.PickBy = inProcessLocation.IsDetailContainHu ? BusinessConstants.CODE_MASTER_PICKBY_HU : BusinessConstants.CODE_MASTER_PICKBY_ITEM;
            //resolver.PickBy = inProcessLocation.IsReceiptScanHu ? BusinessConstants.CODE_MASTER_PICKBY_HU : BusinessConstants.CODE_MASTER_PICKBY_ITEM;
            resolver.OrderType = inProcessLocation.OrderType;

            //resolver.AntiResolveHu = 
            #endregion
        }
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:30,代码来源:SetBaseMgr.cs

示例5: SetDetail

 protected override void SetDetail(Resolver resolver)
 {
     List<string> flowTypes = new List<string>();
     flowTypes.Add(BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_PRODUCTION);
     bool isHaslocationLotDetail = locationLotDetailMgrE.CheckHuLocationExist(resolver.Input);
     if (!isHaslocationLotDetail)
     {
         throw new BusinessErrorException("Hu.Error.NoInventory", resolver.Input);
     }
     Hu hu = huMgrE.CheckAndLoadHu(resolver.Input);
     FlowView flowView = null;
     //如果是扫描Bin,根据Hu和Bin匹配出flow
     if (resolver.CodePrefix == null || resolver.CodePrefix.Trim() == string.Empty)
     {
         //确定flow和flowView
         flowView = flowMgrE.CheckAndLoadFlowView(null, resolver.UserCode, string.Empty, null, hu, flowTypes);
         setBaseMgrE.FillResolverByFlow(resolver, flowView.Flow);
     }
     //如果已经确定了Flow
     else
     {
         //根据Flow和Hu匹配出flowView
         flowView = flowMgrE.CheckAndLoadFlowView(resolver.Code, null, null, null, hu, flowTypes);
     }
     setDetailMgrE.MatchHuByFlowView(resolver, flowView, hu);
 }
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:26,代码来源:ReuseMgr.cs

示例6: ExecuteSubmit

 protected override void ExecuteSubmit(Resolver resolver)
 {
     User user = userMgr.LoadUser(resolver.UserCode, false, true);
     IList<CycleCountDetail> cycleCountDetailList = this.ConvertResolverToCycleCountDetail(resolver);
     if (resolver.CodePrefix == BusinessConstants.CODE_PREFIX_CYCCNT)
     {
         cycleCountMgr.RecordCycleCountDetail(resolver.Code, cycleCountDetailList, user);
         resolver.Result = languageMgr.TranslateMessage("CycCnt.Process.Successfully", resolver.UserCode);
         resolver.Transformers = null;
         resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMER;
         resolver.BinCode = null;
         resolver.LocationCode = null;
     }
     //else if (resolver.LocationCode != null && resolver.LocationCode.Trim() != string.Empty)
     //{
     //    if (resolver.BinCode != null && resolver.BinCode.Trim() != string.Empty)
     //    {
     //        StorageBin bin = storageBinMgr.CheckAndLoadStorageBin(resolver.BinCode);
     //        cycleCountMgr.CreateCycleCount(bin, cycleCountDetailList, user);
     //    }
     //    else
     //    {
     //        Location location = locationMgr.CheckAndLoadLocation(resolver.LocationCode);
     //        cycleCountMgr.CreateCycleCount(location, cycleCountDetailList, user);
     //    }
     //}
     else
     {
         throw new BusinessErrorException("Common.Business.Error.ScanFlowOrStorageBinFirst");
     }
 }
开发者ID:Novthirteen,项目名称:yfkey-scms,代码行数:31,代码来源:StockTakingMgr.cs

示例7: ResolveInput

        protected void ResolveInput(string input, bool bind)
        {
            CacheResolver.Input = input;
            CacheResolver = TheResolverMgr.Resolve(this.CacheResolver);

            if (bind) Bind();
        }
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:7,代码来源:BusinessModuleBase.cs

示例8: Process

 public void Process(Resolver resolver)
 {
     if (!dicBarcodeHead.ContainsKey(resolver.BarcodeHead))
     {
         throw new BusinessErrorException("Common.Business.Error.BarCodeInvalid");
     }
     switch (dicBarcodeHead[resolver.BarcodeHead])
     {
         case 1:
             SetBaseInfo(resolver);
             GetDetail(resolver);
             break;
         case 2:
             Execute(resolver);
             break;
         case 3:
             GetReceiptNotes(resolver);
             break;
         case 4:
             SetBaseInfo(resolver);
             break;
         default:
             resolver.Input = resolver.Input;
             SetDetail(resolver);//Hu,match or add
             break;
     }
 }
开发者ID:Novthirteen,项目名称:yfkey-scms,代码行数:27,代码来源:AbstractBusinessMgr.cs

示例9: CreateRepack

        public void CreateRepack(Resolver resolver)
        {
            IList<RepackDetail> repackDetailList = executeMgr.ConvertTransformerListToRepackDetail(resolver.Transformers);
            if (repackDetailList.Count == 0)
            {
                throw new BusinessErrorException("MasterData.Inventory.Repack.Error.RepackDetailEmpty");
            }
            Repack repack = repackMgr.CreateRepack(repackDetailList, userMgr.LoadUser(resolver.UserCode, false, true));
            resolver.Code = repack.RepackNo;
            resolver.Transformers = null;
            resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMERDETAIL;
            resolver.Result = languageMgr.TranslateMessage("MasterData.Inventory.Repack.Successfully", resolver.UserCode);

            #region 打印
            if (resolver.IsCSClient)
            {
                IList<Hu> huList = new List<Hu>();
                repack = repackMgr.LoadRepack(resolver.Code, true);
                foreach (RepackDetail repackDet in repack.RepackDetails)
                {
                    if (repackDet.IOType == BusinessConstants.IO_TYPE_OUT && repackDet.LocationLotDetail.Hu != null
                        && repackDet.LocationLotDetail.Hu.PrintCount == 0)
                    {
                        huList.Add(repackDet.LocationLotDetail.Hu);
                    }
                }
                resolver.PrintUrl = PrintHu(huList,resolver.UserCode);
            }
            #endregion
        }
开发者ID:Novthirteen,项目名称:yfkey-scms,代码行数:30,代码来源:RepackageMgr.cs

示例10: SetDetail

 /// <summary>
 /// 只有发货扫描条码才支持不扫物流路线,扫描库格移库
 /// </summary>
 /// <param name="resolver"></param>
 protected override void SetDetail(Resolver resolver)
 {
     List<string> flowTypes = new List<string>();
     flowTypes.Add(BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_TRANSFER);
     Hu hu = huMgrE.CheckAndLoadHu(resolver.Input);
     if (this.locationMgrE.IsHuOcuppyByPickList(resolver.Input))
     {
         throw new BusinessErrorException("Order.Error.PickUp.HuOcuppied", resolver.Input);
     }
     FlowView flowView = null;
     if (resolver.CodePrefix != null && resolver.CodePrefix.Trim() != string.Empty)
     {
         flowView = flowMgrE.CheckAndLoadFlowView(resolver.Code, null, null, null, hu, flowTypes);
     }
     else
     {
         if (resolver.BinCode == string.Empty)
         {
             throw new BusinessErrorException("Common.Business.Error.ScanFlowOrStorageBinFirst");
         }
         else
         {
             flowView = flowMgrE.CheckAndLoadFlowView(null, resolver.UserCode, hu.Location, resolver.LocationToCode, hu, flowTypes);
             setBaseMgrE.FillResolverByFlow(resolver, flowView.Flow);
         }
     }
     setDetailMgrE.MatchHuByFlowView(resolver, flowView, hu);
 }
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:32,代码来源:TransferMgr.cs

示例11: PickList

 public void PickList(Resolver resolver)
 {
     PickList pickList = pickListMgrE.CheckAndLoadPickList(resolver.Code);
     pickList.PickListDetails = new List<PickListDetail>();
     if (resolver.Transformers != null)
     {
         foreach (Transformer transformer in resolver.Transformers)
         {
             PickListDetail pickListDetail = pickListDetailMgrE.LoadPickListDetail(transformer.Id, true);
             if (transformer != null)
             {
                 foreach (TransformerDetail transformerDetail in transformer.TransformerDetails)
                 {
                     if (transformerDetail != null && transformerDetail.HuId != null && transformerDetail.HuId != string.Empty
                         && transformerDetail.CurrentQty != 0)
                     {
                         PickListResult pickListResult = new PickListResult();
                         //pickListResult.LocationLotDetail = locationLotDetailMgrE.LoadLocationLotDetail(transformerDetail.LocationLotDetId);
                         pickListResult.LocationLotDetail = locationLotDetailMgrE.CheckLoadHuLocationLotDetail(transformerDetail.HuId);
                         pickListResult.PickListDetail = pickListDetail;
                         pickListResult.Qty = transformerDetail.CurrentQty * pickListDetail.OrderLocationTransaction.UnitQty;
                         pickListDetail.AddPickListResult(pickListResult);
                     }
                 }
             }
             pickList.AddPickListDetail(pickListDetail);
         }
     }
     pickListMgrE.DoPick(pickList, resolver.UserCode);
     resolver.Result = languageMgrE.TranslateMessage("MasterData.PickList.Pick.Successfully", resolver.UserCode, resolver.Code);
     resolver.Transformers = null;
     resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMER;
 }
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:33,代码来源:PickMgr.cs

示例12: Resolve

 public override void Resolve(Resolver resolver)
 {
     paramBindings = new List<Binding>(generator.ParamKeys.Count);
     foreach (var key in generator.ParamKeys) {
         paramBindings.Add(resolver.RequestBinding(key, generator.ProviderMethod.FullName));
     }
 }
开发者ID:paulcbetts,项目名称:stiletto,代码行数:7,代码来源:CompilerProvidesBinding.cs

示例13: SetBaseInfo

 protected override void SetBaseInfo(Resolver resolver)
 {
     if (resolver.CodePrefix == BusinessConstants.CODE_PREFIX_INSPECTION)
     {
         InspectOrder inspectOrder = inspectOrderMgrE.CheckAndLoadInspectOrder(resolver.Input);
         if (inspectOrder.Status != BusinessConstants.CODE_MASTER_STATUS_VALUE_CREATE)
         {
             throw new BusinessErrorException("InspectOrder.Error.StatusIsNotValid", resolver.Input, inspectOrder.Status);
         }
         resolver.Code = inspectOrder.InspectNo;
         resolver.IsScanHu = inspectOrder.IsDetailHasHu;
         resolver.Status = inspectOrder.Status;
         if (resolver.IsScanHu)
         {
             resolver.PickBy = BusinessConstants.CODE_MASTER_PICKBY_HU;
         }
         else
         {
             resolver.PickBy = BusinessConstants.CODE_MASTER_PICKBY_ITEM;
         }
     }
     else
     {
         throw new BusinessErrorException("Common.Business.Error.BarCodeInvalid");
     }
 }
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:26,代码来源:InspectMgr.cs

示例14: GetDetail

 protected override void GetDetail(Resolver resolver)
 {
     InspectOrder inspectOrder = inspectOrderMgrE.LoadInspectOrder(resolver.Code, true);
     resolver.Transformers = TransformerHelper.ConvertInspectDetailToTransformer(inspectOrder.InspectOrderDetails);
     resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMER;
     resolver.Result = languageMgrE.TranslateMessage("MasterData.Inventory.CurrentInspectOrder", resolver.UserCode, resolver.Code);
 }
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:7,代码来源:InspectMgr.cs

示例15: DNSManager

        static DNSManager()
        {
            try
            {
                IPEndPoint[] osDNSServers = Resolver.GetDnsServers();
                if (osDNSServers != null && osDNSServers.Length > 0)
                {
                    logger.Debug("Initialising DNS resolver with operating system DNS server entries.");
                    m_resolver = new Resolver(osDNSServers);
                }
                else
                {
                    logger.Debug("Initialising DNS resolver with OpenDNS server entries.");
                    m_resolver = new Resolver(Resolver.DefaultDnsServers.ToArray());
                }
                //m_resolver.Recursion = true;
                //m_resolver.UseCache = false;

                for (int index = 0; index < NUMBER_LOOKUP_THREADS; index++)
                {
                    Thread lookupThread = new Thread(new ThreadStart(ProcessLookups));
                    lookupThread.Name = LOOKUP_THREAD_NAME + "-" + index.ToString();
                    lookupThread.Start();
                }
            }
            catch (Exception excp)
            {
                logger.Error("Exception DNSManager (static ctor). " + excp);
            }
        }
开发者ID:TilmannBach,项目名称:sipsorcery-fork,代码行数:30,代码来源:DNSManager.cs


注:本文中的Resolver类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。