public loadResponse Load(load load) { litleOnlineRequest request = createLitleOnlineRequest(); request.load = load; litleOnlineResponse response = sendToLitle(request); loadResponse loadResponse = response.loadResponse; return(loadResponse); }
public void addLoad(load load) { if (numAccountUpdates == 0) { numLoads++; loadAmount += load.amount; tempBatchFilePath = saveElement(litleFile, litleTime, tempBatchFilePath, load); } else { throw new LitleOnlineException(accountUpdateErrorMessage); } }
private void defaultIndexer(string name, string code) { load newFilter = (stack) => { string result = ""; foreach (string those in list) { filtering(those, stack, ref result); } return(result); }; dictionary[name] = newFilter; }
public void TestLoad() { var load = new load(); load.amount = 600; load.orderSource = orderSourceType.ecommerce; load.card = new giftCardCardType(); batchRequest.addLoad(load); Assert.AreEqual(1, batchRequest.getNumLoads()); Assert.AreEqual(600, batchRequest.getLoadAmount()); mockCnpFile.Verify(cnpFile => cnpFile.createRandomFile(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), mockCnpTime.Object)); mockCnpFile.Verify(cnpFile => cnpFile.AppendLineToFile(mockFilePath, load.Serialize())); }
public void TestLoad() { var load = new load(); load.amount = 600; load.orderSource = orderSourceType.ecommerce; load.card = new cardType(); _batchRequest.addLoad(load); Assert.AreEqual(1, _batchRequest.getNumLoads()); Assert.AreEqual(600, _batchRequest.getLoadAmount()); _mockLitleFile.Verify(litleFile => litleFile.createRandomFile(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), _mockLitleTime.Object)); _mockLitleFile.Verify(litleFile => litleFile.AppendLineToFile(MockFilePath, load.Serialize())); }
public SavingWalletData(bool _savingInPlayerPrefs = true, bool _savingInFile = false, bool _savingInBinFile = false, bool _savingOnServer = false, LoadingPreset loadedPreset = LoadingPreset.PlayerPrefs) { SavingInPlayerPrefs = _savingInPlayerPrefs; SavingInFile = _savingInFile; SavingInBinFile = _savingInBinFile; SavingOnServer = _savingOnServer; switch (loadedPreset) { case LoadingPreset.PlayerPrefs: LoadWay = LoadPlayerPrefs; break; case LoadingPreset.File: LoadWay = LoadFromFile; break; case LoadingPreset.BinFile: LoadWay = LoadingFromBinary; break; case LoadingPreset.Server: LoadWay = LoadFromServer; break; } }
static void Main(string[] args) { string path = (@"C:\szkolenie\stocks.csv"); PobierzCSV(); load file = new load(); var items = file.loadCsvFile(path); foreach (var item in items) { string line = item; string[] col = line.Split(';'); string ean = col[1]; string qty = col[4]; string qtyclean = qty.Trim(new Char[] { '"', '\'', '.', 'P', 'o', 'w', 'y', 'ż', 'e', 'j' }); string eanclean = ean.Trim(new char[] { '"' }); int qtyint = Int32.Parse(qtyclean); SqlEntity sql = new SqlEntity(); sql.TWRXML_TWR_EAN = eanclean; sql.TWRXML_ILOSC = qtyint; sqlmetods check = new sqlmetods(); var twrids = check.CheckTwrID(eanclean); if (twrids.Count == 0) { sqlmetods ins = new sqlmetods(); ins.Insert(sql); } else { foreach (var twrid in twrids) { sqlmetods up = new sqlmetods(); up.UpdateQty(twrid.TWRXML_ID, qtyint); } } } }
public static void load_weibo_call(CmsForm cmsForm) { try { if (cmsForm.dataGridView_weibo.InvokeRequired) { load method = new load(FollowUtil.load_weibo_call); cmsForm.BeginInvoke(method, new object[] { cmsForm }); } else { FollowUtil.load_weibo(cmsForm); } } catch (Exception exception) { MessageBox.Show("[load_weibo]出错:" + exception.ToString()); } }
public void TestLoad() { load load = new load(); load.orderId = "2"; load.orderSource = orderSourceType.ecommerce; load.card = new giftCardCardType(); var mock = new Mock <Communications>(); mock.Setup(Communications => Communications.HttpPost(It.IsRegex(".*?<cnpOnlineRequest.*?<load.*?<orderId>2</orderId>.*?</load>.*?", RegexOptions.Singleline), It.IsAny <Dictionary <String, String> >())) .Returns("<cnpOnlineResponse version='8.21' response='0' message='Valid Format' xmlns='http://www.vantivcnp.com/schema'><loadResponse><cnpTxnId>123</cnpTxnId></loadResponse></cnpOnlineResponse>"); Communications mockedCommunication = mock.Object; cnp.SetCommunication(mockedCommunication); loadResponse loadResponse = cnp.Load(load); Assert.AreEqual(123, loadResponse.cnpTxnId); }
public Wise(object stack) { reloading = defaultLoader; indexing = defaultIndexer; filtering = defaultFilter; Type type = stack.GetType(); FieldInfo[] field = type.GetFields(); PropertyInfo[] myPropertyInfo = type.GetProperties(); String value = null; foreach (var propertyInfo in myPropertyInfo) { if (propertyInfo.GetIndexParameters().Length == 0) { value = propertyInfo.GetValue(stack, null) as String; dictionary.Add(propertyInfo.Name.ToString(), value); } } }
public void SimpleLoad() { var load = new load { id = "1", reportGroup = "Planets", orderId = "12344", amount = 1500, orderSource = orderSourceType.ecommerce, card = new giftCardCardType { type = methodOfPaymentTypeEnum.GC, number = "414100000000000000", cardValidationNum = "123", expDate = "1215" } }; var response = _litle.Load(load); Assert.AreEqual("000", response.response); }
public void testLoad_Full() { load load = new load(); load.orderId = "12345"; load.amount = 200; load.orderSource = orderSourceType.ecommerce; load.card = new cardType(); load.id = "theId"; load.reportGroup = "theReportGroup"; String actual = load.Serialize(); String expected = @" <load id=""theId"" reportGroup=""theReportGroup""> <orderId>12345</orderId> <amount>200</amount> <orderSource>ecommerce</orderSource> <card> <type>MC</type> </card> </load>"; Assert.AreEqual(expected, actual); }
public void testLoad_OnlyRequired() { load load = new load(); load.orderId = "12345"; load.amount = 200; load.orderSource = orderSourceType.ecommerce; load.card = new giftCardCardType(); load.id = "theId"; load.reportGroup = "theReportGroup"; String actual = load.Serialize(); String expected = @" <load id=""theId"" reportGroup=""theReportGroup""> <orderId>12345</orderId> <amount>200</amount> <orderSource>ecommerce</orderSource> <card> <type>MC</type> </card> </load>"; Assert.AreEqual(Regex.Replace(expected, @"\s+", String.Empty), Regex.Replace(actual, @"\s+", String.Empty)); }
private void Start() { tahtaScript = tahtam.GetComponent <load>(); }
public void testLoad() { var load = new load(); load.amount = 600; load.orderSource = orderSourceType.ecommerce; load.card = new cardType(); batchRequest.addLoad(load); Assert.AreEqual(1, batchRequest.getNumLoads()); Assert.AreEqual(600, batchRequest.getLoadAmount()); mockLitleFile.Verify( litleFile => litleFile.createRandomFile(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), mockLitleTime.Object)); mockLitleFile.Verify(litleFile => litleFile.AppendLineToFile(mockFilePath, load.Serialize())); }
public loadResponse Load(load transaction) { return(this.SendTransaction <loadResponse>(transaction)); }
public void testLoad() { var load = new load(); load.orderId = "theOrderId"; load.orderSource = orderSourceType.ecommerce; load.card = new cardType(); var mockLitleResponse = new Mock<litleResponse>(); var mockLitleXmlSerializer = new Mock<litleXmlSerializer>(); mockXmlReader.SetupSequence(XmlReader => XmlReader.ReadOuterXml()) .Returns( "<loadResponse xmlns=\"http://www.litle.com/schema\"><litleTxnId>123</litleTxnId></loadResponse>") .Returns( "<loadResponse xmlns=\"http://www.litle.com/schema\"><litleTxnId>124</litleTxnId></loadResponse>"); var mockLitleBatchResponse = new batchResponse(); mockLitleBatchResponse.setLoadResponseReader(mockXmlReader.Object); mockLitleResponse.Setup(litleResponse => litleResponse.nextBatchResponse()).Returns(mockLitleBatchResponse); var mockedLitleResponse = mockLitleResponse.Object; mockLitleXmlSerializer.Setup( litleXmlSerializer => litleXmlSerializer.DeserializeObjectFromString(It.IsAny<string>())) .Returns(mockedLitleResponse); var mockedCommunication = mockCommunications.Object; litle.setCommunication(mockedCommunication); var mockedLitleXmlSerializer = mockLitleXmlSerializer.Object; litle.setLitleXmlSerializer(mockedLitleXmlSerializer); var mockedLitleFile = mockLitleFile.Object; litle.setLitleFile(mockedLitleFile); litle.setLitleTime(mockLitleTime.Object); var litleBatchRequest = new batchRequest(_mockCache.Object); litleBatchRequest.setLitleFile(mockedLitleFile); litleBatchRequest.setLitleTime(mockLitleTime.Object); litleBatchRequest.addLoad(load); litleBatchRequest.addLoad(load); litle.addBatch(litleBatchRequest); var batchFileName = litle.sendToLitle(); var actualLitleResponse = litle.receiveFromLitle(batchFileName); var actualLitleBatchResponse = actualLitleResponse.nextBatchResponse(); Assert.AreSame(mockLitleBatchResponse, actualLitleBatchResponse); Assert.AreEqual("123", actualLitleBatchResponse.nextLoadResponse().litleTxnId); Assert.AreEqual("124", actualLitleBatchResponse.nextLoadResponse().litleTxnId); Assert.IsNull(actualLitleBatchResponse.nextLoadResponse()); mockCommunications.Verify( Communications => Communications.FtpDropOff(It.IsAny<string>(), mockFileName, It.IsAny<Dictionary<string, string>>())); mockCommunications.Verify( Communications => Communications.FtpPickUp(It.IsAny<string>(), It.IsAny<Dictionary<string, string>>(), mockFileName)); }
public loadResponse Load(load load) { return(SendRequest(response => response.loadResponse, load)); }
void Start() { next = scripts.GetComponent <load>(); doubleexlamationmarks.SetActive(false); }
private static void Dispatcher(object sender, CustomActionEventArgs e) { GdPicturePDF oPdf = new GdPicturePDF(); switch (e.actionName) { //loading document and setting annotations access control //the workflow is designed for PDF files, you can apply similar workflow on the other formats using GdPictureImaging class case "load": load oLoad = JsonConvert.DeserializeObject <load>(e.args.ToString()); GdPictureStatus status = oPdf.LoadFromFile(HttpRuntime.AppDomainAppPath + "\\Files\\" + oLoad.Path, true); AnnotationManager oAnnotationmanager = new AnnotationManager(); oAnnotationmanager.InitFromGdPicturePDF(oPdf); for (int i = 1; i < oAnnotationmanager.PageCount; i++) { oAnnotationmanager.SelectPage(i); for (int y = 0; y < oAnnotationmanager.GetAnnotationCount(); y++) { Annotation annot = oAnnotationmanager.GetAnnotationFromIdx(y); if (oLoad.UserType == "user") //case for external user member { if (annot.Tag != oLoad.UserType) //annotation is not vissible if not added by external group memebr { annot.Visible = false; } } else if (oLoad.UserType == "staff") //case for staff member { annot.Visible = true; //all annot are visible } } oAnnotationmanager.SaveAnnotationsToPage(); } e.docuVieware.LoadFromGdPicturePdf(oPdf); e.docuVieware.DisplayPage(1); break; //setting annotation tag that represents access group and saving annotation to PDF //the workflow is designed for PDF files, you can apply similar workflow on the other formats using GdPictureImaging class case "setAnnotationTag": e.docuVieware.GetNativePDF(out oPdf); AnnotationManager manager = new AnnotationManager(); manager.InitFromGdPicturePDF(oPdf); details oDetails = JsonConvert.DeserializeObject <details>(e.args.ToString()); manager.SelectPage(oDetails.annot.pageNo); int pages = manager.GetAnnotationCount(); for (int i = 0; i < pages; i++) { Annotation oAnnotation = manager.GetAnnotationFromIdx(i); if (oAnnotation.Guid == oDetails.annot.id) { oAnnotation.Tag = oDetails.type; } } manager.SaveAnnotationsToPage(); status = oPdf.SaveToFile(HttpRuntime.AppDomainAppPath + "\\Files\\DocuViewareFlyer.pdf", true); break; } }
void Start() { instance = this; }
public void testLoad() { var load = new load(); load.orderId = "2"; load.orderSource = orderSourceType.ecommerce; load.card = new cardType(); var mock = new Mock<Communications>(_memoryStreams); mock.Setup( Communications => Communications.HttpPost( It.IsRegex(".*?<litleOnlineRequest.*?<load.*?<orderId>2</orderId>.*?</load>.*?", RegexOptions.Singleline), It.IsAny<Dictionary<string, string>>())) .Returns( "<litleOnlineResponse version='8.21' response='0' message='Valid Format' xmlns='http://www.litle.com/schema'><loadResponse><litleTxnId>123</litleTxnId></loadResponse></litleOnlineResponse>"); var mockedCommunication = mock.Object; litle.setCommunication(mockedCommunication); var loadResponse = litle.Load(load); Assert.AreEqual("123", loadResponse.litleTxnId); }
public Wise() { reloading = defaultLoader; indexing = defaultIndexer; filtering = defaultFilter; }
public void testLoad_OnlyRequired() { var load = new load(); load.orderId = "12345"; load.amount = 200; load.orderSource = orderSourceType.ecommerce; load.card = new cardType(); load.id = "theId"; load.reportGroup = "theReportGroup"; var actual = load.Serialize(); var expected = @" <load id=""theId"" reportGroup=""theReportGroup""> <orderId>12345</orderId> <amount>200</amount> <orderSource>ecommerce</orderSource> <card> <type>MC</type> </card> </load>"; Assert.AreEqual(expected, actual); }
public void setLoading(string code) { //todo: compile reloading = defaultLoader; }
public Level(load _load) { this.Load = _load; }