public object GetByType(Type type) { if (type == typeof(ILeafUI)) { return(OpenFx.BaseApi.NewLeafUI()); } else if (type.Name.StartsWith(nameof(ILogger))) { return(LoggerFactory.Auto(type, leafType)); } else if (type == typeof(IUx)) { return(ctx.Ux); } else if (type == typeof(IAppManager)) { return(ctx.App); } else if (type == typeof(ITemporaryFloder)) { return(ctx.Tmp); } else if (type == typeof(IEmbeddedFileManager)) { return(ctx.EmbeddedManager); } else if (type == typeof(IOSApi)) { return(ctx.GetService <IOSApi>(ServicesNames.OS)); } else if (type == typeof(IDeviceSelector)) { return(ctx.GetService <IDeviceSelector>(ServicesNames.DEVICE_SELECTOR)); } else if (type == typeof(IMd5Service)) { return(ctx.GetService <IMd5Service>(ServicesNames.MD5)); } else if (type == typeof(IResourcesManager)) { return(ctx.GetService <IResourcesManager>(ServicesNames.RESOURCES)); } else if (type == typeof(ICompApi)) { return(ctx.Comp); } else if (type == typeof(ISoundService)) { return(ctx.GetService <ISoundService>(ServicesNames.SOUND)); } else if (type == typeof(Context)) { return(ctx); } else if (type == typeof(IDevice)) { return(ctx.GetService <IDeviceSelector>(ServicesNames.DEVICE_SELECTOR).GetCurrent(ctx)); } else if (type == typeof(TextAttrManager)) { var m = new TextAttrManager(leafType); m.Load(); return(m); } return(null); }
static DpmFailedMessageParser() { textAttrManager.Load(); }