public override bool ImportSubmodelElementsInto(AdminShell.AdministrationShellEnv env, AdminShell.IManageSubmodelElements parent) { // If we wanted to import the class, we would typically use the submodel import // instead. Therefore we import the children instead. var importer = new Importer(env, Context); // We use Count() > 0 instead of Any() to make sure that every element is imported return(Children.Count(c => importer.ImportSubmodelElements(c, parent)) > 0); }
public bool ImportSubmodelElements(Model.IElement element, AdminShell.IManageSubmodelElements parent) { if (!element.IsSelected) { return(false); } var submodelElement = CreateSubmodelElement(element); if (submodelElement != null) { parent.Add(submodelElement); return(true); } return(false); }
public override bool ImportSubmodelElementsInto(AdminShell.AdministrationShellEnv env, AdminShell.IManageSubmodelElements parent) { return(new Importer(env, Context).ImportSubmodelElements(this, parent)); }
public static bool ImportSubmodelElements(Window window, AdminShell.AdministrationShellEnv env, string defaultSourceDir, AdminShell.IManageSubmodelElements parent) { return(PerformImport(window, ImportMode.SubmodelElements, defaultSourceDir, e => e.ImportSubmodelElementsInto(env, parent))); }
public virtual bool ImportSubmodelElementsInto(AdminShell.AdministrationShellEnv env, AdminShell.IManageSubmodelElements parent) => false;
public static bool ImportSubmodelElements(AdminShell.AdministrationShellEnv env, AdminShell.IManageSubmodelElements parent) { return(PerformImport(ImportMode.SubmodelElements, e => e.ImportSubmodelElementsInto(env, parent))); }