public ResultStatus LoadESigDetails( CollectData collectData, CollectData_Request request, out CollectData_Result result) { return(this.LoadESigDetails(collectData, (CollectData_LoadESigDetails_Parameters)null, request, out result)); }
public SetupAction() { Cli.PrintLine("Setup Initiated."); currentDirectory = @"F:\CodeProjects\Taide\terraform"; //currentDirectory = Directory.GetCurrentDirectory (); collectData = new CollectData(); }
public ResultStatus CreateParametricData( CollectData collectData, CollectData_Request request, out CollectData_Result result) { return(this.CreateParametricData(collectData, (CollectData_Parameters)null, request, out result)); }
public ResultStatus GetActions( CollectData collectData, CollectData_Request request, out CollectData_Result result) { return(this.GetActions(collectData, (CollectData_Parameters)null, request, out result)); }
public ResultStatus ProcessComputation( CollectData collectData, CollectData_Request request, out CollectData_Result result) { return(this.ProcessComputation(collectData, (CollectData_Parameters)null, request, out result)); }
public VariableAction() { Console.WriteLine("Variable Initiated."); currentDirectory = @"F:\CodeProjects\Taide\terraform"; //currentDirectory = Directory.GetCurrentDirectory (); collectData = new CollectData(); varInfo = new NewVariable(); }
public CollectDataMethod( CollectData Cdo, CollectDataMethods Method, CollectData_Parameters Parameters) { this.Cdo = Cdo; this.ServiceMethod = Method; this.Parameters = Parameters; }
private void CommonRessourceCollectionResolve() { ResourceData resData = ResourceDictionary.instance.resourcesFromType[lastInteraction]; GameObject rootGameobject = MapModifier.instance.grid.GetRootOf(hoveredInteractor.transform.parent.gameObject); MapModifier.instance.grid.MakeObjectInteractable(rootGameobject); // play sound, and juice, and update inventory AudioClip soundFx = resData.collectingSound[Random.Range(0, resData.collectingSound.Count)]; audiosource.clip = soundFx; if (soundFx) { audiosource.Play(); } int gain = Random.Range(1, 4); interactionJuicer.LaunchGainAnim("+" + gain.ToString(), lastInteraction); inventory.AddItem(ResourceDictionary.instance.GetResourceItem(resData.interactionType).Summarize(), gain); playerController.RecomputeLoadFactor(); // decrement interactor ressource count CollectData data = hoveredInteractor.GetComponent <CollectData>(); data.ressourceCount--; if (data.ressourceCount <= 0) { ScriptableTile tile = (lastInteraction == InteractionType.Type.collectWheat) ? MapModifier.instance.tileDictionary["Dirt"] : MapModifier.instance.tileDictionary["Grass"]; Vector3Int cellPosition = MapModifier.instance.WorldToCell(hoveredInteractor.transform.parent.position); MapModifier.instance.tilemap.SetTile(cellPosition, tile); MapModifier.instance.tilemap.SetTransformMatrix(cellPosition, Matrix4x4.identity); Destroy(hoveredInteractor.transform.parent.gameObject); interactionTime = 0f; interacting = false; hoveredInteractor = null; animator.SetBool("interaction", false); } // stop interaction loop if needed if (!inventory.HasSpace()) { ComputeInteractionConditions(lastInteraction); UpdateHelp(); interactionTime = 0f; interacting = false; animator.SetBool("interaction", false); } }
public void Update() { _FSM.NPC_Obj.transform.LookAt(new Vector3(target.transform.position.x, _FSM.NPC_Obj.transform.position.y, target.transform.position.z)); CollectData collectData = target.GetCollectData(Time.deltaTime); if (collectData.number > 0) { _FSM.NPC_Obj.itemData.number += collectData.number; if (collectData.isDone) { // 再检查一次背包是否有东西,因为在物资累加之前会先触发事件回调 Finish(this, new CollectEventArgs(_FSM.NPC_Obj.collectType)); } } }
public ResultStatus GetEnvironment( CollectData cdo, CollectData_Request request, out CollectData_Result result) { result = (CollectData_Result)null; try { return(((ICollectDataService)this._Channel).GetEnvironment(this._UserProfile, cdo, request, out result)); } catch (Exception ex) { return(this.OnThrowException(ex)); } }
public void T140_CollectData_LOT1() { CollectData s = new CollectData(); Container co = new Container(); co.ContainerName = "LOT1"; s.Container = co; CollectDataDetail d = new CollectDataDetail(); // d stands for detail d.DataCollectionDef_Name = "WIPData(r1)"; d.DataCollectionValue = "10"; s.InsertDetail(d); Assert.IsTrue(s.ExecuteService(), s.CompletionMessage); }
public void StarGenerateMaze(int i) { ResetGrid(); CollectData cdata = new CollectData(i); uiManager.SetGenerateMazeTime(cdata.time); //StopAnimation(); if (i == 1 || i == 2) { AnimImmd(cdata.removeWall); //coroutine = StartCoroutine("Anim", cdata.removeWall); } else { Anim3Immd(cdata.removeCell); //coroutine = StartCoroutine("Anim3", cdata.removeCell); } }
public ResultStatus AddDataTransaction(CollectData cdo) { this.OnBeforeCall(nameof(AddDataTransaction), (DCObject)cdo, (Parameters)null, (Request)null); ResultStatus res; try { res = !this._IsTransactionOpened ? this.GetAddDataTransactionException() : this.AddMethod((Method) new CollectDataMethod(cdo, CollectDataMethods.AddDataTransaction, (CollectData_Parameters)null)); } catch (Exception ex) { res = this.OnThrowException(ex); } if (res.IsSuccess) { Result result; this.OnAfterCall(nameof(AddDataTransaction), res, (DCObject)cdo, (Parameters)null, (Request)null, result); } return(res); }
protected void Page_Load(object sender, EventArgs e) { //StreamReader sr = new StreamReader(Request.InputStream); //StreamWriter sw = new StreamWriter(string.Format("d:\\Request\\{0}.txt", DateTime.Now.ToString("yyyy-MM-ddHH-mm-ss-fff"))); //sw.WriteLine(sr.ReadToEnd()); //sw.Close(); //sr.Close(); StreamHelper streamHelper = new StreamHelper(); List <OrdersOrder> lsOrders = new List <OrdersOrder>(); try { if (Request.InputStream == null || Request.InputStream.Length == 0) { MB.Util.TraceEx.Write("MA没有传送任何信息"); } else { InvoiceCollection lsmaInvoice = streamHelper.DealFor <InvoiceCollection>(Request.InputStream); lsOrders = CollectData.GetERPGdnFromMaPkt(lsmaInvoice); BtsService.BtsMAServerClient client = new BtsService.BtsMAServerClient(); MB.Util.TraceEx.Write("YHX Test1"); client.MA_PKT(lsOrders.ToArray()); } } catch (Exception ex) { MB.Util.TraceEx.Write(ex.Message); } finally { using (StreamWriter sw = new StreamWriter(Response.OutputStream)) { sw.WriteLine("This is My Response"); sw.Flush(); sw.Close(); } } }
private void Result(String title, String start, String end, String cost, uint count) { String date = String.Format("{0,4:D4}-{1,2:D2}-{2,2:D2}", DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day); String time = DateTime.Now.Hour.ToString(); // Add to CollectData CollectData cd = new CollectData(); cd.title = title; cd.dateTime = DateTime.Now; cd.startIP = start; cd.endIP = end; cd.cost = uint.Parse(cost); cd.runningCount = count; cd.totalCount = GetPCCount(start, end); cd.earn = count * cd.cost; collectData[title].Add(cd); // Add to ListVIew ListViewItem item = new ListViewItem(logIndex.ToString()); item.SubItems.Add(date); item.SubItems.Add(time); item.SubItems.Add(title); item.SubItems.Add(count.ToString()); item.SubItems.Add(String.Format("{0:N2}%", ((float)count / (float)cd.totalCount) * 100.0f)); item.SubItems.Add(cd.earn.ToString()); item.SubItems.Add(Get24EarnSum(title).ToString()); lvLog.Columns[7].Text = "" + GetCollectCount(title) + "시간 누적 매출"; lvLog.Items.Add(item); logIndex++; }
static async Task Main() { ILogger logger = GetLogger(); IServiceCollection serviceCollection = ConfigureServices(logger); ServiceProvider serviceProvider = serviceCollection.BuildServiceProvider(); LoadBrands(serviceProvider); LoadModels(serviceProvider); LoadCars(serviceProvider); SeedDb(serviceProvider); CollectData collectData = serviceProvider.GetService <CollectData>(); collectData.SaveAllBrands(serviceProvider); collectData.SaveAllModels(serviceProvider); QuartzHostedService quartz = serviceProvider.GetService <QuartzHostedService>(); await quartz.StartAsync(new CancellationToken()); Thread.Sleep(1000000000); }
public ResultStatus ExecuteTransaction( CollectData cdo, CollectData_Request request, out CollectData_Result result) { result = (CollectData_Result)null; this.OnBeforeCall(nameof(ExecuteTransaction), (DCObject)cdo, (Parameters)null, (Request)request); ResultStatus res; try { res = !this._IsTransactionOpened ? ((ICollectDataService)this._Channel).ExecuteTransaction(this._UserProfile, cdo, request, out result) : this.AddMethod((Method) new CollectDataMethod(cdo, CollectDataMethods.ExecuteTransaction, (CollectData_Parameters)null)); } catch (Exception ex) { res = this.OnThrowException(ex); } if (res.IsSuccess) { this.OnAfterCall(nameof(ExecuteTransaction), res, (DCObject)cdo, (Parameters)null, (Request)request, (Result)result); } return(res); }
/// <summary> /// 开始采集 /// </summary> private void StartCollect() { timeText += Time.deltaTime; CollectData collectData = collect.GetCollectData(Time.deltaTime); slider.UpdateSlider(1 - collectData.remainingTime / collectData.maxTime, $"正在采集{collect.Name}"); if (collectData.number > 0) { collectNum += collectData.number; if (timeText >= 1.5f) { Instantiate(textObj, canvas).GetComponent <TextShow>() .SetMessageText($"{collectData.collectType}:+{collectNum}"); box.AddItem(new ItemData() { number = collectNum, name = collectData.collectType.ToString() }); collectNum = 0; timeText = 0; } } if (collectData.isDone) { FinishCollectInit(); if (collectNum != 0) { Instantiate(textObj, canvas).GetComponent <TextShow>() .SetMessageText($"{collectData.collectType}:+{collectNum}"); box.AddItem(new ItemData() { number = collectNum, name = collectData.collectType.ToString() }); } collectNum = 0; } }
public ResultStatus GetActions( CollectData collectData, CollectData_Parameters parameters, CollectData_Request request, out CollectData_Result result) { result = (CollectData_Result)null; this.OnBeforeCall(nameof(GetActions), (DCObject)collectData, (Parameters)parameters, (Request)request); ResultStatus res; try { res = !this._IsTransactionOpened ? ((ICollectDataService)this._Channel).GetActions(this._UserProfile, collectData, parameters, request, out result) : this.AddMethod((Method) new CollectDataMethod(collectData, CollectDataMethods.GetActions, parameters)); } catch (Exception ex) { res = this.OnThrowException(ex); } if (res.IsSuccess) { this.OnAfterCall(nameof(GetActions), res, (DCObject)collectData, (Parameters)parameters, (Request)request, (Result)result); } return(res); }
public override string GetHtml() { var html = string.Empty; var list = new List <TimeSpentItem>(); ///////////////////// // fetch & combine data sets ///////////////////// var websites = CollectData.GetCleanedWebsites(_date); list.AddRange(websites); var files = CollectData.GetCleanedFilesWorkedOn(_date); list.AddRange(files); var vsProjects = CollectData.GetCleanedVisualStudioProjects(_date); list.AddRange(vsProjects); var reviews = CollectData.GetCleanedCodeReviewsDone(_date); list.AddRange(reviews); var meetings = CollectData.GetCleanedMeetings(_date); list.AddRange(meetings); if (_showEmailsEnabled) { var emails = CollectData.GetCleanedOutlookInfo(_date); list.AddRange(emails); } if (_showProgramsEnabled) { var programs = CollectData.GetCleanedPrograms(_date); list.AddRange(programs); } ///////////////////// // sort the list again ///////////////////// var sortedList = list.OrderByDescending(i => i.DurationInMins).ToList(); ///////////////////// // visualize data sets //////////////////// if (sortedList == null || sortedList.Count == 0) { html += VisHelper.NotEnoughData(string.Format(CultureInfo.InvariantCulture, "We couldn't collect any files, programs used, meetings, emails, websites, code reviews or VS projects for the {0}.", _date.Date.ToShortDateString())); return(html); } // create blank table html += string.Format(CultureInfo.InvariantCulture, "<table id='{0}'>", VisHelper.CreateChartHtmlTitle(Title)); html += "<thead><tr><th>Type</th><th>Title</th><th>Time spent</th></tr></thead>"; html += "<tbody>"; foreach (var i in sortedList) { html += "<tr>"; html += "<td>" + i.Type + "</td>"; html += "<td>" + GetFormattedTitle(i.Title) + "</td>"; html += "<td>" + GetFormattedDuration(i.DurationInMins) + "</td>"; html += "</tr>"; } html += "</tbody>"; html += "</table>"; ///////////////////// // create & add javascript //////////////////// var js = "<script type='text/javascript'>" + "var tf = new TableFilter('" + VisHelper.CreateChartHtmlTitle(Title) + "', { base_path: '/', " + "col_0: 'select', col_2: 'none', popup_filters: false, auto_filter: true, auto_filter_delay: 700, highlight_keywords: true, " // filtering options (column 0: checklist or select) + "alternate_rows: true, " // styling options + "col_widths:[ '5.625em', '40em', '5.625em'], " // fixed columns sizes + "grid_layout: true, grid_width: '51.25em', grid_height: '16.4em', grid_cont_css_class: 'grd-main-cont', grid_tblHead_cont_css_class: 'grd-head-cont', " // styling & behavior of the table //+ "extensions: [{name: 'sort', types: [ 'string', 'string', 'null'] }], " + "msg_filter: 'Filtering...', display_all_text: 'Show all', no_results_message: true, watermark: ['', 'Type to filter...', ''], " + "}); " // no content options + "tf.init(); " + "</script>"; html += " " + js; return(html); }
public void addData(NDILib.Position3d position3D0,NDILib.Position3d position3D1,NDILib.Position3d position3D2,string picName,double timespan) { allDataList[allDataLength] = new CollectData(picName,timespan,position3D0,position3D1,position3D2); allDataLength++; }
static void Main(string[] args) { OrgBasicInfoUpdate(); //string ss = "{\"brandCode\":\"MB\",\"goodsName\":\"男一款多花圆领短袖恤\",\"goodsSn\":\"110496\",\"goodsWeight\":20,\"marketPrice\":69,\"opType\":\"c\",\"seasonCode\":\"0010\",\"skuVos\":[{\"barcode\":\"6907303082662\",\"colorCode\":\"01\",\"colorName\":\"漂白\",\"custumCode\":\"11049601047\",\"goodsSn\":\"110496\",\"opFrom\":\"erp1\",\"opType\":\"c\",\"sizeCode\":\"11047\",\"sizeName\":\"165/95A \"},{\"barcode\":\"6907303082679\",\"colorCode\":\"01\",\"colorName\":\"漂白\",\"custumCode\":\"11049601049\",\"goodsSn\":\"110496\",\"opFrom\":\"erp1\",\"opType\":\"c\",\"sizeCode\":\"11049\",\"sizeName\":\"1170/100A\"}],\"user\":\"erp1\"}"; ////var aa = JsonConvert.DeserializeObject<ProductInfo>(ss); ////var response=new BangggoServiceProxy().SaveProduct(aa); //var aa = JsonConvert.DeserializeObject<ServiceReference1.ProductInfo>(ss); //ServiceReference1.BanggoServiceProxyClient client = new ServiceReference1.BanggoServiceProxyClient(); //var response = client.SaveProduct(aa); //Console.WriteLine(Process.GetCurrentProcess().MainModule.FileName); //Console.WriteLine(Environment.CurrentDirectory); //Console.WriteLine(Directory.GetCurrentDirectory()); //Console.WriteLine(AppDomain.CurrentDomain.BaseDirectory); //Console.WriteLine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase); // InvoiceInfo invoice = new InvoiceInfo(); // invoice.OrderHeader = new OutPKTHdr(); // invoice.OrderHeader.Addr_Code = "abcdefg"; // invoice.LsOrderDtl = new List<OutPKTDtl>(); // invoice.LsBoxHeader = new List<OutCatonHdr>(); // invoice.LsBoxDtl = new List<OutCartonDtl>(); //// List<InvoiceInfo> lsInvoices = new List<InvoiceInfo>() { invoice }; // InvoiceCollection lsInvoices = new InvoiceCollection(); // lsInvoices.lsInvoice = new List<InvoiceInfo>(); // lsInvoices.lsInvoice.Add(invoice); // XmlSerializer xmlSerializer = new XmlSerializer(typeof(List<InvoiceInfo>), new XmlRootAttribute("invoice_1_0")); XmlSerializer xmlSerializer = new XmlSerializer(typeof(InvoiceCollection)); XmlSerializerNamespaces ns = new XmlSerializerNamespaces(); ns.Add("", ""); try { XmlSerializer xmlSerializer1 = new XmlSerializer(typeof(A)); Stream stream = new FileStream("d:\\Invoice_real.xml", FileMode.Open); // xmlSerializer1.Serialize(stream, new A() { ID = "001", Name = null, Desc = "" }, ns); var t = xmlSerializer1.Deserialize(stream) as A; stream.Close(); //invoice = xmlSerializer.Deserialize(stream) as InvoiceInfo; } catch (Exception ex) { throw ex; } try { Stream stream1 = new FileStream("d:\\Invoice.xml", FileMode.OpenOrCreate); var t = xmlSerializer.Deserialize(stream1) as InvoiceCollection; var t2 = CollectData.GetERPGdnFromMaPkt(t); HttpWebRequest webRequest = System.Net.WebRequest.Create("http://localhost:5821/Default.aspx") as HttpWebRequest; webRequest.Method = "POST"; var bytes = ASCIIEncoding.UTF8.GetBytes(new StreamReader(stream1).ReadToEnd()); webRequest.ContentLength = bytes.Length; webRequest.ContentType = "text/xml"; //webRequest.ServicePoint.Expect100Continue = false; //webRequest.Timeout = 1000 * 60; //webRequest.ContentType = "application/x-www-form-urlencoded"; var requestWriter = webRequest.GetRequestStream(); requestWriter.Write(bytes, 0, bytes.Length); var responseData = webRequest.GetResponse(); //WebClient client = new WebClient(); //string str = new StreamReader(stream1).ReadToEnd(); //byte[] bytes = ASCIIEncoding.ASCII.GetBytes(str); //var t3 = client.UploadData("http://localhost:5821/Default.aspx", "POST", bytes); } catch (Exception ex) { throw ex; } #region testcancel //#region HttpListener //using (HttpListener listerner = new HttpListener()) //{ // listerner.AuthenticationSchemes = AuthenticationSchemes.Anonymous;//指定身份验证 Anonymous匿名访问 // listerner.Prefixes.Add("http://192.168.156.91:8080/web/"); // // listerner.Prefixes.Add("http:// 192.168.156.91/web/"); // listerner.Start(); // Console.WriteLine("WebServer Start Successed......."); // while (true) // { // //等待请求连接 // //没有请求则GetContext处于阻塞状态 // HttpListenerContext ctx = listerner.GetContext(); // ctx.Response.StatusCode = 200;//设置返回给客服端http状态代码 // string name = ctx.Request.QueryString["name"]; // if (name != null) // { // Console.WriteLine(name); // } // //使用Writer输出http响应代码 // using (StreamWriter writer = new StreamWriter(ctx.Response.OutputStream)) // { // Console.WriteLine("hello"); // writer.WriteLine("<html><head><title>The WebServer Test</title></head><body>"); // writer.WriteLine("<div style=\"height:20px;color:blue;text-align:center;\"><p> hello {0}</p></div>", name); // writer.WriteLine("<ul>"); // foreach (string header in ctx.Request.Headers.Keys) // { // writer.WriteLine("<li><b>{0}:</b>{1}</li>", header, ctx.Request.Headers[header]); // } // writer.WriteLine("</ul>"); // writer.WriteLine("</body></html>"); // writer.Close(); // ctx.Response.Close(); // } // } // listerner.Stop(); //} //#endregion //DbProviderFactory dbfactory = DbProviderFactories.GetFactory(ConfigurationManager.ConnectionStrings["MB.OldERP"].ProviderName); //OracleConnection cn = dbfactory.CreateConnection() as OracleConnection; //cn.ConnectionString = ConfigurationManager.ConnectionStrings["MB.OldERP"].ConnectionString; //OracleCommand cmd = new OracleCommand( // //"select t.unit_id,t.owner_id,t.hierarchy from sys_unit t where unit_id=:unit_id "+ // "select t.unit_id,t.owner_id,t.hierarchy from sys_unit t where unit_id=:unit_id", cn); ////OracleCommand cmd = new OracleCommand("update sys_unit t set t.owner_id=rtrim(t.owner_id,'T') " + //// "where unit_id=:unit_id", cn); //List<string> lsUnit = new List<string>(); //for(int i=0;i<10;i++) //{ // lsUnit.Add("V3009" + i); //} ////cmd.ArrayBindCount = lsUnit.Count; //OracleParameter param = new OracleParameter("unit_id", OracleDbType.Varchar2); //param.Direction = ParameterDirection.Input; ////param.Value = lsUnit.ToArray(); //cmd.Parameters.Add(param); //cn.Open(); //DataTable dt = new DataTable(); //for (int i = 0; i < 1000; i++) //{ // cmd.Parameters[0].Value = "V30" + i; // var datareader = cmd.ExecuteReader(); // var columncount = datareader.FieldCount; // while (datareader.Read()) // { // for (int j = 0; j < columncount; j++) // Console.Write(datareader[j] + "|"); // Console.WriteLine(); // } // datareader.Close(); // OracleDataAdapter da = new OracleDataAdapter(cmd); // da.Fill(dt); //} //do //{ // while (datareader.Read()) // { // for (int i = 0; i < columncount; i++) // Console.Write(datareader[i] + "|"); // Console.WriteLine(); // } //} while (datareader.NextResult()); //cmd.ExecuteNonQuery(); //cn.Close(); //List<A> lsA = new List<A>(); //for (int i = 0; i < 10; i++) //{ // if(i>5) // lsA.Add(new A() { ID = (i - 5).ToString(), Name = "N" + (i - 5), Desc = "D" + (i - 5) }); // else // lsA.Add(new A() { ID = i.ToString(), Name = "N" + i, Desc = "D" + i }); //} //var t = lsA.GroupBy(o => o.ID).Select(o => new { id = o.Key, Count = o.Count() }); ////var t=new SFGDN().GetDistroDeliveredNote(); //var t1 = t.ToList().FindIndex(o => o.id == "6"); //var t2 = t.ToList().FindIndex(2,o => o.id == "1"); //ServiceReference1.Service1Client client = new ServiceReference1.Service1Client(); //client.Open(); //int i = 0; //do //{ // i++; // //if (i % 2 != 0) // //{ // // ServiceReference2.Service1Client client2 = new ServiceReference2.Service1Client(); // // Console.WriteLine("You Input {0} and Get {1}",i,client2.GetData(i)); // //} // var request = new ServiceReference1.ORDER() { ID = i.ToString(), Name = i.ToString() }; // client.BeginGetMSG(request, delegate(IAsyncResult ar) // { // var t = client.EndGetMSG(ar); // Console.WriteLine("{3}- {4}\tResponse: ID:{0}Name:{1} Str:{2}", t.ID, t.Name, t.Str, ar.AsyncState, ar.IsCompleted); // }, i); // // var t = client.GetMSG(request); // //client.GetRequest(new ServiceReference1.Root() { ID = i.ToString(), Name = i.ToString() }); // // Console.Write("{0} :Call finish", i); // //Console.WriteLine("Response: ID:{0}Name:{1} Str:{2}",t.ID,t.Name,t.Str); //} while (i < 100); #endregion Console.WriteLine("Test Over..."); Console.ReadLine(); }
private async Task <bool> GetPackagesAndRiskInformation(IEnumerable <Project> projects) { var status = false; await Task.Run(() => { var hubSettings = new HubSettings() { ServerUrl = _package.HubServerUrl, Username = _package.HubUsername, Password = _package.HubPassword, Timeout = _package.HubTimeout, ProxyHost = _package.ProxyHost, ProxyPort = _package.ProxyPort, ProxyUsername = _package.ProxyUsername, ProxyPassword = _package.ProxyPassword }; if (!_installerServices.GetInstalledPackages().Any()) { return; } if (!hubSettings.HasSettings()) { _riskAnalysisStatus = Properties.Resources.MesageNoHubSettings; status = false; } else { var client = Authenticate.EstablishHubSession(hubSettings); if (client == null) { _riskAnalysisStatus = Properties.Resources.MessageConnectionUnsuccessful; status = false; } else { String version = HubVersion.GetHubVersionNumberString(client); bool hubLessThanFour = int.Parse(version.Split('.')[0]) < 4; _packagesList.Clear(); _validProjectsList.Clear(); _validProjectsList.Add(Properties.Resources.ItemAll); foreach (var project in projects) { List <IVsPackageMetadata> packages = null; try { packages = _installerServices.GetInstalledPackages(project).ToList(); _validProjectsList.Add(project.Name); } catch { continue; } var projectPath = project.Properties; foreach (var package in packages) { var index = _packagesList.FindIndex( item => (item.Package == package.Id) && (item.Version == package.VersionString)); if (index < 0) { _packagesList.Add(new NuGetPackageViewModel.NuGetPackage { Forge = Properties.Resources.Forge, Package = package.Id, Version = package.VersionString, VsProject = project.Name }); } else { _packagesList[index].VsProject = _packagesList[index].VsProject + "|" + project.Name; } } } foreach (var item in _packagesList) { try { ProcessItem(item, client, hubLessThanFour); } catch (Exception e) { _riskAnalysisStatus = e.Message; status = false; } } if (_packagesList.Count > 0) { _packagesList = _packagesList.OrderBy(x => x.PackageStatus).ThenBy(y => y.Package).ToList(); } _validProjectsList.Sort(); status = true; Task.Run(() => CollectData.CallHome(client, hubSettings.ServerUrl, _dte.Version)); } } }); return(status); }
public ResultStatus GetActions(CollectData collectData) { return(this.GetActions(collectData, (CollectData_Parameters)null, (CollectData_Request)null, out CollectData_Result _)); }
public ResultStatus Load(CollectData collectData) { return(this.Load(collectData, (CollectData_Parameters)null, (CollectData_Request)null, out CollectData_Result _)); }
public ResultStatus ExecuteTransaction(CollectData cdo) { return(this.ExecuteTransaction(cdo, (CollectData_Request)null, out CollectData_Result _)); }
public ResultStatus CreateParametricData(CollectData collectData) { return(this.CreateParametricData(collectData, (CollectData_Parameters)null, (CollectData_Request)null, out CollectData_Result _)); }