public static string GenerateCustom(GeneratedBarcodeType barcodeType, string format = null) { IBarcodeGenerator generator; switch (barcodeType) { case GeneratedBarcodeType.EAN8: generator = new BarcodeEAN8Generator(); break; default: generator = new BarcodeEAN13Generator(); break; } return(generator.GenerateCustom(format ?? BusinessDomain.AppConfiguration.CustomGeneratedBarcodeFormat)); }
public static string Generate(GeneratedBarcodeType barcodeType, string prefix = null) { IBarcodeGenerator generator; switch (barcodeType) { case GeneratedBarcodeType.EAN8: generator = new BarcodeEAN8Generator(); break; default: generator = new BarcodeEAN13Generator(); break; } return(generator.Generate(prefix ?? BusinessDomain.AppConfiguration.GeneratedBarcodePrefix)); }