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