public static Stream DownloadTradingPartnerSpecCert(BizRuleCertMetadata bizRuleCertMetadata, IDalManager dalManager) { if (GCValidatorHelper.AddDummyDataForCertValidation) { throw new NotImplementedException(); } return(dalManager.GetBizRuleCert(bizRuleCertMetadata)); }
public static BizRuleSet GetBizRuleSet(BizRuleCertMetadata bizRuleCertMetadata, IDalManager dalManager) { BizRuleSet bizRuleSet = gcSpecCertCache.GetObject(bizRuleCertMetadata.RuleCertFileName) as BizRuleSet; if (bizRuleSet == null) { Stream bizRuleStream = dalManager.GetBizRuleCert(bizRuleCertMetadata); if (bizRuleStream == null) { throw new GCEdiValidatorException(string.Format("{0} BizRule not found.", bizRuleCertMetadata.RuleCertFileName)); } GCExcelToBizRuleSet gcExcelToBizRuleSet = new GCExcelToBizRuleSet(); bizRuleSet = gcExcelToBizRuleSet.GenerateBizRuleSet(bizRuleStream); gcBizRuleCertCache.AddObject(bizRuleCertMetadata.RuleCertFileName, bizRuleSet); } return(bizRuleSet); }