public void AddBuildFile( BuildFile other) { var existingBuildFile = this.BuildFiles.Where(item => item.GUID == other.GUID).FirstOrDefault(); if (null == existingBuildFile) { this.BuildFiles.Add(other); other.Parent = this; } }
AddBuildFile( BuildFile other) { var existingBuildFile = this.BuildFiles.Where(item => item.GUID == other.GUID).FirstOrDefault(); if (null == existingBuildFile) { this.BuildFiles.Add(other); other.Parent = this; } }
EnsureBuildFileExists( FileReference fileRef) { lock (this.BuildFiles) { var existingBuildFile = this.BuildFiles.Where(item => item.FileRef == fileRef).FirstOrDefault(); if (null != existingBuildFile) { return(existingBuildFile); } var newBuildFile = new BuildFile(fileRef); this.BuildFiles.Add(newBuildFile); return(newBuildFile); } }
EnsureBuildFileExists( FileReference fileRef, Target target) { lock (this.BuildFiles) { var existingBuildFile = this.BuildFiles.FirstOrDefault(item => item.FileRef == fileRef && item.OwningTarget == target); if (null != existingBuildFile) { return(existingBuildFile); } var newBuildFile = new BuildFile(fileRef, target); this.BuildFiles.Add(newBuildFile); return(newBuildFile); } }
public BuildFile EnsureBuildFileExists( FileReference fileRef) { lock (this.BuildFiles) { var existingBuildFile = this.BuildFiles.Where(item => item.FileRef == fileRef).FirstOrDefault(); if (null != existingBuildFile) { return existingBuildFile; } var newBuildFile = new BuildFile(fileRef); this.BuildFiles.Add(newBuildFile); return newBuildFile; } }