Exemplo n.º 1
0
        public void GetAllDatasourceNames(Action <IEnumerable <string>, Exception> completed)
        {
            DiagnosticsDomainContext diagCtx = new DiagnosticsDomainContext();



            diagCtx.GetAllDatasourceNames(result =>
            {
                Exception ex = null;
                if (result.HasError)
                {
                    result.MarkErrorAsHandled();
                    ex = result.Error;
                    throw new GadgetException(result.Error.Message);
                }

                IEnumerable <string> datasourcesNames = ((InvokeOperation <IEnumerable <string> >)result).Value;
                completed(datasourcesNames, ex);
            }, null);
        }