Exemple #1
0
        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);
            }
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 AddToFilter(
     VSSettingsGroup group)
 {
     lock (this.Filter)
     {
         this.Filter.AddFile(group);
     }
 }
Exemple #4
0
 AddSource(
     VSSettingsGroup source)
 {
     lock (this)
     {
         this.Sources.AddUnique(source);
         this.Filter.AddFile(source);
     }
 }
Exemple #5
0
 AddOtherFile(
     VSSettingsGroup other)
 {
     lock (this)
     {
         this.Others.AddUnique(other);
         this.Filter.AddFile(other);
     }
 }
Exemple #6
0
 AddResourceFile(
     VSSettingsGroup other)
 {
     lock (this)
     {
         this.Resources.AddUnique(other);
         this.Filter.AddFile(other);
     }
 }
Exemple #7
0
 AddAssemblyFile(
     VSSettingsGroup other)
 {
     lock (this)
     {
         this.AssemblyFiles.AddUnique(other);
         this.Filter.AddFile(other);
     }
 }
Exemple #8
0
 AddAssemblyFile(
     VSSettingsGroup other)
 {
     lock (this.AssemblyFiles)
     {
         this.AssemblyFiles.AddUnique(other);
     }
     AddToFilter(other);
 }
Exemple #9
0
 AddResourceFile(
     VSSettingsGroup other)
 {
     lock (this.Resources)
     {
         this.Resources.AddUnique(other);
     }
     AddToFilter(other);
 }
Exemple #10
0
 AddOtherFile(
     VSSettingsGroup other)
 {
     lock (this.Others)
     {
         this.Others.AddUnique(other);
     }
     AddToFilter(other);
 }
Exemple #11
0
 AddSource(
     VSSettingsGroup source)
 {
     lock (this.Sources)
     {
         this.Sources.AddUnique(source);
     }
     AddToFilter(source);
 }
Exemple #12
0
 AddHeader(
     VSSettingsGroup header)
 {
     lock (this.Headers)
     {
         this.Headers.AddUnique(header);
     }
     AddToFilter(header);
 }
Exemple #13
0
 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);
 }
Exemple #15
0
        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);
        }
Exemple #16
0
 AddSource(
     VSSettingsGroup source)
 {
     lock (this)
     {
         this.Sources.AddUnique(source);
         this.Filter.AddFile(source);
     }
 }
Exemple #17
0
 AddHeader(
     VSSettingsGroup header)
 {
     lock (this)
     {
         this.Headers.AddUnique(header);
         this.Filter.AddFile(header);
     }
 }
Exemple #18
0
 AddResourceFile(
     VSSettingsGroup other)
 {
     lock (this)
     {
         this.Resources.AddUnique(other);
         this.Filter.AddFile(other);
     }
 }
Exemple #19
0
 AddOtherFile(
     VSSettingsGroup other)
 {
     lock (this)
     {
         this.Others.AddUnique(other);
         this.Filter.AddFile(other);
     }
 }
Exemple #20
0
        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;
            }
        }