public static void UpdateFileProperties(List<SalesforceFileProxy> files, FileProperties[] properties)
 {
     foreach (FileProperties fileProperties in properties)
     {
         foreach (SalesforceFileProxy projectFileEntity in files)
         {
             if (projectFileEntity.FileName == fileProperties.fileName)
             {
                 projectFileEntity.FullName = fileProperties.fullName;
                 projectFileEntity.Id = fileProperties.id;
                 projectFileEntity.CreatedByName = fileProperties.createdByName;
                 projectFileEntity.ModifiedByName = fileProperties.lastModifiedByName;
                 projectFileEntity.CreatedDateUtcTicks = fileProperties.createdDate.ToFileTimeUtc().ToString();
                 projectFileEntity.Id = fileProperties.id;
                 projectFileEntity.NamespacePrefix = fileProperties.namespacePrefix;
                 projectFileEntity.Type = projectFileEntity.Type ?? fileProperties.type;
                 projectFileEntity.LastModifiedDateUtcTicks = projectFileEntity.Type != "CustomObject" ? fileProperties.lastModifiedDate.ToFileTimeUtc().ToString() : DateTimeProvider.UtcNow.ToFileTimeUtc().ToString();
             }
             else if (projectFileEntity.FileName.Contains("-meta.xml"))
                 projectFileEntity.Type = "Metadata";
             else if (projectFileEntity.FileName.Contains("/package.xml"))
                 projectFileEntity.Type = "Package";
         }
     }
 }
        public FileProperties[] ListMetadata(ListMetadataQuery[] queries, double asOfVersion)
        {
            if (queries == null || queries.Length == 0)
                throw new ArgumentNullException(nameof(queries));

            FileProperties[] filePropertiesArray = _service.listMetadata(queries, asOfVersion);

            if (filePropertiesArray == null || filePropertiesArray.Length == 0)
                filePropertiesArray = new FileProperties[0];

            return filePropertiesArray;
        }