1 write to AssignedFiles
Microsoft.Build.Tasks.Core (1)
AssignCulture.cs (1)
135AssignedFiles = new ITaskItem[Files.Length];
60 references to AssignedFiles
Microsoft.Build.Tasks.Core (18)
AssignCulture.cs (18)
146AssignedFiles[i] = new TaskItem(Files[i]); 148string dependentUpon = AssignedFiles[i].GetMetadata(ItemMetadataNames.dependentUpon); 149string existingCulture = AssignedFiles[i].GetMetadata(ItemMetadataNames.culture); 153AssignedFiles[i].SetMetadata(ItemMetadataNames.withCulture, "true"); 154cultureList.Add(AssignedFiles[i]); 156CultureNeutralAssignedFiles[i] = new TaskItem(AssignedFiles[i]); 161AssignedFiles[i].ItemSpec, 165ConversionUtilities.ValidBooleanFalse(AssignedFiles[i].GetMetadata(ItemMetadataNames.withCulture))); 173existingCulture, AssignedFiles[i].ItemSpec, info.culture); 177AssignedFiles[i].RemoveMetadata(ItemMetadataNames.culture); 183AssignedFiles[i].SetMetadata(ItemMetadataNames.culture, info.culture); 184AssignedFiles[i].SetMetadata(ItemMetadataNames.withCulture, "true"); 185cultureList.Add(AssignedFiles[i]); 189noCultureList.Add(AssignedFiles[i]); 190AssignedFiles[i].SetMetadata(ItemMetadataNames.withCulture, "false"); 194new TaskItem(AssignedFiles[i]) { ItemSpec = info.cultureNeutralFilename }; 200AssignedFiles[i].GetMetadata(ItemMetadataNames.culture), 201AssignedFiles[i].ItemSpec);
Microsoft.Build.Tasks.UnitTests (42)
AssignCulture_Tests.cs (42)
30Assert.Single(t.AssignedFiles); 32Assert.Equal("fr", t.AssignedFiles[0].GetMetadata("Culture")); 33Assert.Equal("MyResource.fr.resx", t.AssignedFiles[0].ItemSpec); 50Assert.Single(t.AssignedFiles); 52Assert.Equal("fr", t.AssignedFiles[0].GetMetadata("Culture")); 53Assert.Equal("MyResource.fr.resx", t.AssignedFiles[0].ItemSpec); 72Assert.Single(t.AssignedFiles); 74Assert.Equal("fr", t.AssignedFiles[0].GetMetadata("Culture")); 75Assert.Equal("MyResource.fr.resx", t.AssignedFiles[0].ItemSpec); 93Assert.Single(t.AssignedFiles); 95Assert.Equal("fr", t.AssignedFiles[0].GetMetadata("Culture")); 96Assert.Equal("My Random String", t.AssignedFiles[0].GetMetadata("MyAttribute")); 97Assert.Equal("MyResource.fr.resx", t.AssignedFiles[0].ItemSpec); 115Assert.Single(t.AssignedFiles); 117Assert.Equal(String.Empty, t.AssignedFiles[0].GetMetadata("Culture")); 118Assert.Equal("MyResource.resx", t.AssignedFiles[0].ItemSpec); 134Assert.Single(t.AssignedFiles); 136Assert.Equal(String.Empty, t.AssignedFiles[0].GetMetadata("Culture")); 137Assert.Equal("MyResource", t.AssignedFiles[0].ItemSpec); 154Assert.Single(t.AssignedFiles); 156Assert.Equal(String.Empty, t.AssignedFiles[0].GetMetadata("Culture")); 157Assert.Equal("MyResource..resx", t.AssignedFiles[0].ItemSpec); 177Assert.Single(t.AssignedFiles); 200Assert.Single(t.AssignedFiles); 202Assert.Equal(culture, t.AssignedFiles[0].GetMetadata("Culture")); 203Assert.Equal($"MyResource.{culture}.resx", t.AssignedFiles[0].ItemSpec); 222Assert.Single(t.AssignedFiles); 224Assert.Equal(culture, t.AssignedFiles[0].GetMetadata("Culture")); 225Assert.Equal($"MyResource.{culture}.resx", t.AssignedFiles[0].ItemSpec); 240Assert.Single(t.AssignedFiles); 242Assert.Equal(culture, t.AssignedFiles[0].GetMetadata("Culture")); 243Assert.Equal($"MyResource.{culture}.resx", t.AssignedFiles[0].ItemSpec); 257Assert.Single(t.AssignedFiles); 259Assert.Equal("true", t.AssignedFiles[0].GetMetadata("WithCulture")); 260Assert.Equal(culture, t.AssignedFiles[0].GetMetadata("Culture")); 261Assert.Equal($"MyResource.{culture}.resx", t.AssignedFiles[0].ItemSpec); 279Assert.Single(t.AssignedFiles); 281Assert.Equal("en-GB", t.AssignedFiles[0].GetMetadata("Culture")); 282Assert.Equal("MyResource.fr.resx", t.AssignedFiles[0].ItemSpec); 300Assert.Single(t.AssignedFiles); 302Assert.Equal("fr", t.AssignedFiles[0].GetMetadata("Culture")); 303Assert.Equal("MyResource.fr.resx", t.AssignedFiles[0].ItemSpec);