diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs index 95b36eb70..d1248f914 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs @@ -12,6 +12,8 @@ using Tango.Core.Helpers; using Tango.BL.Entities; using System.Reflection; using Tango.BL; +using Tango.Core.DI; +using Tango.MachineStudio.Common.Buid; namespace Tango.MachineStudio.Technician.TechItems { @@ -254,7 +256,9 @@ namespace Tango.MachineStudio.Technician.TechItems { List<TechItem> items = new List<TechItem>(); - foreach (var type in typeof(TechItem).Assembly.GetTypes().Where(x => typeof(TechItem).IsAssignableFrom(x) && !x.IsAbstract).OrderBy(x => x.GetCustomAttribute<TechItemAttribute>().Index)) + var buildProvder = TangoIOC.Default.GetInstance<IBuildProvider>(); + + foreach (var type in typeof(TechItem).Assembly.GetTypes().Where(x => typeof(TechItem).IsAssignableFrom(x) && !x.IsAbstract).Where(x => x.GetCustomAttribute<TechItemAttribute>().SupportsLite || buildProvder.BuildType == MSBuildType.Default).OrderBy(x => x.GetCustomAttribute<TechItemAttribute>().Index)) { items.Add(Activator.CreateInstance(type) as TechItem); } |
