feat: expose plugin and viewNode outsize registry

This commit is contained in:
pengfei.zhou 2022-06-02 19:58:21 +08:00 committed by osborn
parent 19a8aaae94
commit 34b759bb82
3 changed files with 19 additions and 0 deletions

View File

@ -248,4 +248,12 @@ public class DoricRegistry {
public DoricResourceManager getResourceManager() { public DoricResourceManager getResourceManager() {
return doricResourceManager; return doricResourceManager;
} }
public Set<String> allPlugins() {
return pluginInfoMap.keySet();
}
public Set<String> allViewNodes() {
return nodeInfoMap.keySet();
}
} }

View File

@ -56,6 +56,9 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)register:(DoricLibrary *)library; + (void)register:(DoricLibrary *)library;
-(NSArray <NSString *>*)allPlugins;
-(NSArray <NSString *>*)allViewNodes;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@ -198,4 +198,12 @@ - (void)onLog:(DoricLogType)type message:(NSString *)message {
[monitor onLog:type message:message]; [monitor onLog:type message:message];
} }
} }
- (NSArray <NSString *> *)allPlugins {
return self.plugins.allKeys;
}
- (NSArray <NSString *> *)allViewNodes {
return self.nodes.allKeys;
}
@end @end