public Extension(IAppExtension extension, IAppServiceConnectionFactory connectionFactory) { _connectionFactory = connectionFactory; AppExtension = extension; UniqueId = extension.GetUniqueId(); _state = ExtensionState.Uninitialized; }
private async Task LoadExtension(IAppExtension extension) { if (!extension.Package.VerifyIsOK() || !_allowedPackageSignatureKinds.Contains(extension.Package.SignatureKind)) { //TODO: Log return; } var identifier = extension.GetUniqueId(); var existingExtension = Extensions.FirstOrDefault(e => e.UniqueId == identifier); if (existingExtension == null) { var newExtension = new Extension <TMessage, TResponse>(extension, _connectionFactory); Extensions.Add(newExtension); await newExtension.Initialize(); newExtension.Load(); } else { existingExtension.Unload(); await existingExtension.Update(extension); } }
public ExtensionDataSet(IAppExtension extension, string name, ImageSource icon, Guid id) { Name = name; Icon = icon; Id = id; Extension = extension; IsSelected = false; }
//internal static string GetAboutUrl() //{ // IAppExtension app = GetExtentions(AppType.None).Where(e => e.App.Name == "About").FirstOrDefault(); // if (app != null) // return "OpenAbout(event,\"" + app.Item.Text + "\", \"" + ServiceProvider.NavigationManager.NavigateURL().TrimEnd('/') + "?mid=0&icp=true&guid=" + app.SettingGuid + "\")"; // else // return ""; //} internal static string GetAboutUrl() { IAppExtension app = GetExtentions(AppType.None).Where(e => e.App.Name == "About").FirstOrDefault(); if (app != null) { string url = null; url = ServiceProvider.NavigationManager.NavigateURL().ToLower().Replace(PortalSettings.Current.DefaultLanguage.ToLower(), PortalSettings.Current.CultureCode.ToLower()).TrimEnd('/') + MenuManager.GetURL() + "mid=0&icp=true&guid=" + app.SettingGuid; return("OpenAbout(event,\"" + app.Item.Text + "\", \"" + url + "\")"); } else { return(""); } }