// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. namespace WixToolset.BuildTasks { using System; using System.Collections; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Xml; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; /// /// This task assigns Culture metadata to files based on the value of the Culture attribute on the /// WixLocalization element inside the file. /// public class CreateItemAvoidingInference : Task { private string inputProperties; private ITaskItem[] outputItems; /// /// The output items. /// [Output] public ITaskItem[] OuputItems { get { return this.outputItems; } } /// /// The properties to converty to items. /// [Required] public string InputProperties { get { return this.inputProperties; } set { this.inputProperties = value; } } /// /// Gets a complete list of external cabs referenced by the given installer database file. /// /// True upon completion of the task execution. public override bool Execute() { List newItems = new List(); foreach (string property in this.inputProperties.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries)) { newItems.Add(new TaskItem(property)); } this.outputItems = newItems.ToArray(); return true; } } }