Exemplo n.º 1
0
        public async Task <OracleId?> GetId(string name)
        {
            var id = await NameRepository.GetId(Scopes.Oracles, name);

            if (id is null)
            {
                return(null);
            }
            OracleId.TryParse(id, out var r);
            return(r);
        }
Exemplo n.º 2
0
        public async Task <ICollection <KeyValuePair <string, OracleId> > > GetIds()
        {
            var ids = await NameRepository.GetIds(Scopes.Oracles);

            var result = new List <KeyValuePair <string, OracleId> >();

            foreach (var id in ids)
            {
                if (OracleId.TryParse(id.Value, out var idObj))
                {
                    result.Add(new KeyValuePair <string, OracleId>(id.Key, idObj));
                }
            }
            return(result);
        }