Esempio n. 1
0
 public List <ResourceVersionContract> GetResourceVersionHistory(long resourceId)
 {
     return(new List <ResourceVersionContract>
     {
         MockResourceData.GetResourceVersionContract(5),
         MockResourceData.GetResourceVersionContract(4),
         MockResourceData.GetResourceVersionContract(3),
         MockResourceData.GetResourceVersionContract(2),
         MockResourceData.GetResourceVersionContract(1)
     });
 }
Esempio n. 2
0
        public List <ResourceContract> GetResourceList(long projectId, [FromQuery] ResourceTypeEnumContract?resourceType)
        {
            var list = new List <ResourceContract>();

            if (resourceType != null)
            {
                for (int i = 5; i >= 0; i--)
                {
                    list.Add(MockResourceData.GetResourceContract(i, resourceType.Value));
                }
            }
            else
            {
                var random = new Random();
                for (int i = 11; i >= 0; i--)
                {
                    ResourceTypeEnumContract type = (ResourceTypeEnumContract)random.Next(4);
                    list.Add(MockResourceData.GetResourceContract(i, type));
                }
            }
            return(list);
        }