/// <summary> /// Gets a descriptor provider set for a given framework folder. /// </summary> public static DescriptorProviderSet GetDescriptorProviderSet(string frameworkFolder) { DescriptorProviderSet result; lock (providerSetsLock) { if (providerSets.TryGetValue(frameworkFolder, out result)) { return(result); } } try { var apk = LoadBaseApk(frameworkFolder); result = new DescriptorProviderSet(CreateAttrXmlParser(apk), CreateLayoutXmlParser(apk), CreateResourcesArsc(apk)); lock (providerSetsLock) { providerSets[frameworkFolder] = result; } return(result); } catch (Exception ex) { ErrorLog.DumpError(ex); throw; } }
/// <summary> /// Gets a descriptor provider set for a given framework folder. /// </summary> public static DescriptorProviderSet GetDescriptorProviderSet(string frameworkFolder) { DescriptorProviderSet result; lock (providerSetsLock) { if (providerSets.TryGetValue(frameworkFolder, out result)) return result; } try { var apk = LoadBaseApk(frameworkFolder); result = new DescriptorProviderSet(CreateAttrXmlParser(apk), CreateLayoutXmlParser(apk), CreateResourcesArsc(apk)); lock (providerSetsLock) { providerSets[frameworkFolder] = result; } return result; } catch (Exception ex) { ErrorLog.DumpError(ex); throw; } }
/// <summary> /// Gets the descriptor provider to use for this kind of resources. /// </summary> /// <returns></returns> protected override DescriptorProvider GetDescriptorProvider(DescriptorProviderSet providerSet) { return providerSet.LayoutDescriptors; }
/// <summary> /// Gets the descriptor provider to use for this kind of resources. /// </summary> /// <returns></returns> protected abstract DescriptorProvider GetDescriptorProvider(DescriptorProviderSet providerSet);