public override List <string> GetAttributes() { var liba = new List <string>(); using (var tla = new TypeLibAttr(_tlib)) { liba.Add($"uuid({tla.guid})"); liba.Add($"version({tla.wMajorVerNum}.{tla.wMinorVerNum})"); } if (_tlib is ITypeLib2 tlib2) { var cds = new CustomDatas(tlib2); { foreach (var cd in cds.Items) { liba.Add("custom(" + cd.guid + ", " + ITypeInfoXtra.QuoteString(cd.varValue) + ")"); } } } var help = _tlib.GetHelpDocumentation(out var cnt); if (!string.IsNullOrEmpty(help)) { liba.Add($"helpstring(\"{help}\")"); } if (cnt != 0) { liba.Add($"helpcontext({cnt.PaddedHex()})"); } return(liba); }
private void AddData(object sender, System.Timers.ElapsedEventArgs e) { var db = new DataBaseContext(); CustomDatas.AddQuotesData(db); db.SaveChanges(); }
public string Get(string symbol) { int index = symbol.IndexOf(":", StringComparison.Ordinal); if (index > 0) { symbol = symbol.Substring(0, index); } var symbolModel = Map <Symbol, SymbolInfo>(SymbolRepository.Get(x => x.Name.ToUpper() == symbol)); //Change price resolution if (CustomDatas.GetIntegerSymbolsName().Contains(symbolModel.Name.ToUpper())) { symbolModel.MinMov = 1; symbolModel.PriceScale = 1; } return(JsonConvert.SerializeObject(symbolModel)); }
private async void CheckDatas() { string keysList = await Xamarin.Essentials.SecureStorage.GetAsync("savedKeys"); if (keysList != null) { List <string> Keys = keysList.Split('/').ToList(); foreach (string key in Keys) { string value = await Xamarin.Essentials.SecureStorage.GetAsync(key); CustomDatas.Add(new CustomData() { Key = key, Value = value }); } } }
public override void BuildIDLInto(IDLFormatter ih) { // Header for type library, followed by a first pass to pre-declare // interfaces. // dispinterfaces aren't shown seperately. ih.AppendLine("// Generated .IDL file (by OleWoo)"); ih.AppendLine("["); var liba = new List <string>(); using (var tla = new TypeLibAttr(_tlib)) { liba.Add($"uuid({tla.guid})"); liba.Add($"version({tla.wMajorVerNum}.{tla.wMinorVerNum})"); } var cds = new CustomDatas(_tlib as ITypeLib2); { foreach (var cd in cds.Items) { liba.Add("custom(" + cd.guid + ", " + ITypeInfoXtra.QuoteString(cd.varValue) + ")"); } } var help = _tlib.GetHelpDocumentation(out var cnt); if (!string.IsNullOrEmpty(help)) { liba.Add($"helpstring(\"{help}\")"); } if (cnt != 0) { liba.Add($"helpcontext({cnt.PaddedHex()})"); } cnt = 0; liba.ForEach(x => ih.AppendLine(" " + x + (++cnt == liba.Count ? "" : ","))); ih.AppendLine("]"); ih.AppendLine("library " + ShortName); ih.AppendLine("{"); using (new IDLHelperTab(ih)) { // How do I know I'm importing stdole2??! // Forward declare all interfaces. ih.AppendLine("// Forward declare all types defined in this typelib"); /* * Need to collect all dumpable interface names, in case we have dispinterfaces which don't have * top level interfaces. In THIS case, we'd dump the dispinterface. */ var interfaceNames = Children.Aggregate <ITlibNode, ICollection <string> >(new HashSet <string>(), (x, y) => { if ((y as OWInterface) != null) { x.Add(y.ShortName); } return(x); }); Children.FindAll(x => ((x as OWInterface) != null || (x as OWDispInterface) != null)).ForEach( x => ih.AppendLine(x.Name) ); Children.FindAll(x => x.DisplayAtTLBLevel(interfaceNames)).ForEach( x => { x.BuildIDLInto(ih); ih.AppendLine(""); } ); } ih.AppendLine("};"); }