Exemplo n.º 1
0
 public ResourceDescription GetValues(long resourceId, List <ModelCode> propIds)
 {
     try
     {
         ResourceDescription retVal = nm.GetValues(resourceId, propIds);
         return(retVal);
     }
     catch (Exception ex)
     {
         string message = string.Format("Getting values for resource with ID = 0x{0:x16} failed. {1}", resourceId, ex.Message);
         CommonTrace.WriteTrace(CommonTrace.TraceError, message);
         throw new Exception(message);
     }
 }
Exemplo n.º 2
0
        private List <ResourceDescription> CollectData(List <long> resultIDs)
        {
            try
            {
                List <ResourceDescription> result = new List <ResourceDescription>();

                List <ModelCode> propertyIds = null;
                foreach (long globalId in resultIDs)
                {
                    propertyIds = class2PropertyIDs[(DMSType)ModelCodeHelper.ExtractTypeFromGlobalId(globalId)];
                    result.Add(networkModel.GetValues(globalId, propertyIds));
                }

                return(result);
            }
            catch (Exception ex)
            {
                CommonTrace.WriteTrace(CommonTrace.TraceError, "Collecting ResourceDescriptions failed. Exception: " + ex.Message);
                throw;
            }
        }