public async Task <ResourceDescription> GetValues(long globalId) { string message = "Getting values method started."; Console.WriteLine(message); //CommonTrace.WriteTrace(CommonTrace.TraceError, message); XmlTextWriter xmlWriter = null; ResourceDescription rd = null; try { short type = ModelCodeHelper.ExtractTypeFromGlobalId(globalId); List <ModelCode> properties = modelResourcesDesc.GetAllPropertyIds((DMSType)type); networkModelGdaClient = NetworkModelGdaClient.CreateClient(); rd = await networkModelGdaClient.GetValues(globalId, properties); xmlWriter = new XmlTextWriter(Config.Instance.ResultDirecotry + "\\GetValues_Results.xml", Encoding.Unicode); xmlWriter.Formatting = Formatting.Indented; rd.ExportToXml(xmlWriter); xmlWriter.Flush(); message = "Getting values method successfully finished."; Console.WriteLine(message); //CommonTrace.WriteTrace(CommonTrace.TraceError, message); } catch (Exception e) { message = string.Format("Getting values method for entered id = {0} failed.\n\t{1}", globalId, e.Message); Console.WriteLine(message); //CommonTrace.WriteTrace(CommonTrace.TraceError, message); } finally { if (xmlWriter != null) { xmlWriter.Close(); } } return(rd); }
public ResourceDescription GetValues(long resourceId, List <ModelCode> propIds) { return(proxy.GetValues(resourceId, propIds)); }