public string GetAssemblyPath(ExtensionDescriptorEntry descriptor) { var assemblyPath = _applicationFolder.Combine(descriptor.Location, descriptor.Id, "bin", descriptor.Id + ".dll"); return(!_applicationFolder.FileExists(assemblyPath) ? null : assemblyPath); }
private IEnumerable <T> Init() { if (!_applicationFolder.FileExists(_filePath)) { return(null); } var serializer = new XmlSerializer(typeof(T[])); var content = _applicationFolder.ReadFile(_filePath); using (var reader = new StringReader(content)) { var array = serializer.Deserialize(reader) as T[]; return(array); } }