// creates and returns a RegistryList object by calling // Eth functions IsRegistryActiveAtIndex, GetRegistryAddressAtIndex, and GetRegistryNameAtIndex public async Task <RegistryList> GetRegistryList() { RegistryList list = new RegistryList(); // call number of registries function on library contract int count = await GetNumberOfRegistries.SendRequestAsync(MyWeb3); // for each receipt for (int i = 0; i < count; ++i) { // check if registry is active if (await IsRegistryActiveAtIndex.SendRequestAsync(MyWeb3, i)) { // get registry address at index string address = await GetRegistryAddressAtIndex.SendRequestAsync(MyWeb3, i); // get registry name at index string name = await GetRegistryNameAtIndex.SendRequestAsync(MyWeb3, i); // add values to RegistryList object list.AddLine(name, address); } } return(list); }
private void ResolveDic(bool useident) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 m_ClientList = RegistryList.CloneDic(_ComposerList); broadcasterList = RegistryList.CloneDic(_PropertyList); m_ClassList = 0; requestList = 0uL; if (m_IssuerList != null) { byte[] issuerList = m_IssuerList; int length = m_IssuerList.Length; if (0 == 0) { Array.Clear(issuerList, 0, length); } } if (useident) { m_ReaderList = null; } ParamsIssuerImporter comparatorFilter = _ComparatorFilter; if (uint.MaxValue != 0) { comparatorFilter._0001(); } }
static int Main(string[] args) { Console.WriteLine("Logging in to OneDrive..."); Console.WriteLine(); FlabberManager manager; try { manager = new FlabberManager(); } catch (Exception ex) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine(ex.Message); Console.ResetColor(); return(1); } // loop until user selects exit bool again = true; while (again) { try { Console.WriteLine("Existing file registries:"); RegistryList list = manager.GetRegistryList().GetAwaiter().GetResult(); list.Print(); int option = GetOption1(); if (option == 1) { NewRegistry(manager); again = false; } else if (option == 2) { RemoveRegistry(manager); } else if (option == 3) { ExistingRegistry(manager); } else { again = false; } } catch (Exception ex) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine(ex.Message); Console.ResetColor(); again = true; } Console.WriteLine(); } Console.WriteLine("Exiting..."); return(0); }
public virtual void _0001(bool isinit, AccountFilter cfg) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 recordList = isinit; m_ReaderList = null; DescriptorListAnnotation descriptorListAnnotation = default(DescriptorListAnnotation); if (cfg is DescriptorListAnnotation) { DescriptorListAnnotation obj = (DescriptorListAnnotation)cfg; if (3u != 0) { descriptorListAnnotation = obj; } } else { if (!(cfg is TemplateIssuerImporter)) { throw new ArgumentException("invalid parameters passed to GCM"); } TemplateIssuerImporter obj2 = (TemplateIssuerImporter)cfg; TemplateIssuerImporter templateIssuerImporter; if (uint.MaxValue != 0) { templateIssuerImporter = obj2; } m_FilterList = templateIssuerImporter.EnableDic(); m_InstanceList = null; if (0 == 0) { m_EventList = 16; _DicList = (MapperList)templateIssuerImporter._0001(); goto IL_00f6; } } m_FilterList = descriptorListAnnotation._0002(); m_InstanceList = descriptorListAnnotation._0001(); int num = descriptorListAnnotation._0001(); goto IL_0048; IL_00f6: num = (isinit ? 16 : (16 + m_EventList)); while (5u != 0) { int num2; if (2u != 0) { num2 = num; } m_IssuerList = new byte[num2]; if (m_FilterList != null) { int num3 = m_FilterList.Length; int num4 = 1; while (num3 >= num4) { if (m_InstanceList == null) { m_InstanceList = new byte[0]; } ParamsIssuerImporter comparatorFilter = _ComparatorFilter; MapperList dicList = _DicList; if (8u != 0) { comparatorFilter._0001(isv: true, dicList); } _ErrorList = new byte[16]; num = _ComparatorFilter._0001(_ErrorList, 0, _ErrorList, 0); if (4 == 0) { goto IL_010c; } SchemaFilter schemaFilter = procFilter; byte[] errorList = _ErrorList; if (0 == 0) { schemaFilter._0001(errorList); } _ComposerList = RunDic(m_InstanceList); if (0 == 0) { num3 = m_FilterList.Length; num4 = 12; if (num4 == 0) { continue; } if (num3 != num4) { _PropertyList = RunDic(m_FilterList); byte[] array = new byte[16]; CompareDic((ulong)((long)m_FilterList.Length * 8L), array, 8); MappingIteratorMapping.ValidateDic(_PropertyList, array); procFilter._0002(_PropertyList); goto IL_0269; } _PropertyList = new byte[16]; } Array.Copy(m_FilterList, 0, _PropertyList, 0, m_FilterList.Length); _PropertyList[15] = 1; goto IL_0269; IL_0269: m_ClientList = RegistryList.CloneDic(_ComposerList); broadcasterList = RegistryList.CloneDic(_PropertyList); m_ClassList = 0; requestList = 0uL; return; } } throw new ArgumentException("IV must be at least 1 byte"); IL_010c :; } goto IL_0048; IL_0048: int num5 = default(int); if (0 == 0) { num5 = num; } if (num5 < 96 || num5 > 128 || num5 % 8 != 0) { throw new ArgumentException("Invalid value for MAC size: " + num5); } m_EventList = num5 / 8; _DicList = descriptorListAnnotation._0001(); goto IL_00f6; }
public unsafe int _0001(byte[] v, int visZ) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 int classList = m_ClassList; int num; if (5u != 0) { num = classList; } if (!recordList) { if (num < m_EventList) { throw new ProxyList("data too short"); } int num2 = num - m_EventList; if (0 == 0) { num = num2; } } if (num > 0) { byte[] array = new byte[16]; byte[] array2 = default(byte[]); if (0 == 0) { array2 = array; } byte[] issuerList = m_IssuerList; byte[] destinationArray = array2; int length = num; if (true) { Array.Copy(issuerList, destinationArray, length); } byte[] config = array2; int num_cust = num; if (0 == 0) { FillDic(config, num_cust, v, visZ); } } byte[] array3 = new byte[16]; byte[] array4; if (5u != 0) { array4 = array3; } IntPtr intPtr = (IntPtr)(void *)m_InstanceList.LongLength; int num3; int num4; if (0 == 0) { num3 = (int)(long)intPtr; if (false) { goto IL_01a7; } CompareDic((ulong)((long)num3 * 8L), array4, 0); CompareDic(requestList * 8, array4, 8); do { MappingIteratorMapping.ValidateDic(m_ClientList, array4); }while (5 == 0); procFilter._0002(m_ClientList); byte[] array5 = new byte[16]; _ComparatorFilter._0001(_PropertyList, 0, array5, 0); MappingIteratorMapping.ValidateDic(array5, m_ClientList); num4 = num; m_ReaderList = new byte[m_EventList]; Array.Copy(array5, m_ReaderList, m_EventList); if (recordList) { Array.Copy(m_ReaderList, 0, v, visZ + m_ClassList, m_EventList); num4 += m_EventList; goto IL_019e; } byte[] array6 = new byte[m_EventList]; Array.Copy(m_IssuerList, num, array6, 0, m_EventList); intPtr = (IntPtr)(RegistryList.StopDic(m_ReaderList, array6) ? 1 : 0); } if (intPtr == (IntPtr)0) { throw new ProxyList("mac check in GCM failed"); } goto IL_019e; IL_01a7: return(num3); IL_019e: ResolveDic(useident: false); num3 = num4; goto IL_01a7; }