GetUniqueSettingsGroup( Bam.Core.Module module, VSSettingsGroup.ESettingsGroup group, Bam.Core.TokenizedString include = null) { lock (this.ProjectSettings) { foreach (var settings in this.ProjectSettings) { if (null == include) { if ((null == settings.Include) && (settings.Group == group)) { return(settings); } } else { // ignore group, as files can mutate between them during the buildprocess (e.g. headers into custom builds) if (settings.Include.Parse() == include.Parse()) { return(settings); } } } var newGroup = new VSSettingsGroup(module, group, include); this.ProjectSettings.Add(newGroup); return(newGroup); } }
AddFile( VSSettingsGroup sourceGroup) { var path = sourceGroup.RelativeDirectory.ToString(); this.AddFilters(sourceGroup.Module, path); var filter = this.Filters[path]; if (filter.Any(item => { lock (item.Include) { if (!item.Include.IsParsed) { item.Include.Parse(); } } return(item.Include.ToString() == sourceGroup.Include.ToString()); })) { return; } var newGroup = new VSSettingsGroup(this.Project, sourceGroup.Module, sourceGroup.Group, sourceGroup.Include); newGroup.AddSetting("Filter", sourceGroup.RelativeDirectory); filter.AddUnique(newGroup); }
AddToFilter( VSSettingsGroup group) { lock (this.Filter) { this.Filter.AddFile(group); } }
AddSource( VSSettingsGroup source) { lock (this) { this.Sources.AddUnique(source); this.Filter.AddFile(source); } }
AddOtherFile( VSSettingsGroup other) { lock (this) { this.Others.AddUnique(other); this.Filter.AddFile(other); } }
AddResourceFile( VSSettingsGroup other) { lock (this) { this.Resources.AddUnique(other); this.Filter.AddFile(other); } }
AddAssemblyFile( VSSettingsGroup other) { lock (this) { this.AssemblyFiles.AddUnique(other); this.Filter.AddFile(other); } }
AddAssemblyFile( VSSettingsGroup other) { lock (this.AssemblyFiles) { this.AssemblyFiles.AddUnique(other); } AddToFilter(other); }
AddResourceFile( VSSettingsGroup other) { lock (this.Resources) { this.Resources.AddUnique(other); } AddToFilter(other); }
AddOtherFile( VSSettingsGroup other) { lock (this.Others) { this.Others.AddUnique(other); } AddToFilter(other); }
AddSource( VSSettingsGroup source) { lock (this.Sources) { this.Sources.AddUnique(source); } AddToFilter(source); }
AddHeader( VSSettingsGroup header) { lock (this.Headers) { this.Headers.AddUnique(header); } AddToFilter(header); }
AddHeader( VSSettingsGroup header) { lock (this) { this.Headers.AddUnique(header); this.Filter.AddFile(header); } }
AddFile( VSSettingsGroup sourceGroup) { this.AddFilters(sourceGroup.Module, sourceGroup.RelativeDirectory); var filter = this.Filters[sourceGroup.RelativeDirectory.Parse()]; if (filter.Any(item => item.Include.Parse() == sourceGroup.Include.Parse())) { return; } var newGroup = new VSSettingsGroup(sourceGroup.Module, sourceGroup.Group, sourceGroup.Include); newGroup.AddSetting("Filter", sourceGroup.RelativeDirectory); filter.AddUnique(newGroup); }
GetUniqueSettingsGroup( Bam.Core.Module module, VSSettingsGroup.ESettingsGroup group, Bam.Core.TokenizedString include = null) { lock (this.ProjectSettings) { foreach (var settings in this.ProjectSettings) { if (null == include) { if ((null == settings.Include) && (settings.Group == group)) { return settings; } } else { // ignore group, as files can mutate between them during the buildprocess (e.g. headers into custom builds) if (settings.Include.Parse() == include.Parse()) { return settings; } } } var newGroup = new VSSettingsGroup(module, group, include); this.ProjectSettings.Add(newGroup); return newGroup; } }