private ExtensionDescriptor GetExtensionDescriptor(string locationPath, string extensionId, string extensionType, string manifestPath, bool manifestIsOptional)
        {
            var manifestText = _fileSystem.ReadFileAsync(manifestPath).Result;

            if (manifestText == null)
            {
                if (manifestIsOptional)
                {
                    manifestText = string.Format("Id: {0}", extensionId);
                }
                else
                {
                    return(null);
                }
            }

            return(GetDescriptorForExtension(locationPath, extensionId, extensionType, manifestText));
        }
Beispiel #2
0
 public async Task <string> ReadFileAsync(string path)
 {
     return(await _fileSystem.ReadFileAsync(path));
 }