Exemple #1
0
        private IntegrationTestHelper SetupForProjectManagementTests()
        {
            var app = IntegrationTestHelper.CreateApp(Output);

            var sourceFileConfigurations = new List <AddSourceFileConfiguration>
            {
                new AddSourceFileConfiguration
                {
                    FunctionName           = "build",
                    PropertyName           = "sources",
                    ArgumentTypeName       = "Arguments",
                    ArgumentPosition       = 0,
                    ArgumentTypeModuleName = "__Config__"
                }
            };

            var addSourceConfiguration = new AddSourceFileConfigurationParams
            {
                Configurations = sourceFileConfigurations.ToArray()
            };

            app.SendNotification("dscript/sourceFileConfiguration", addSourceConfiguration);

            app.NotifyDocumentOpened(
                @"
namespace StaticLibrary {
     export interface Arguments {
         sources: File[];
     }

     export interface BuildResult {        
     }

     export function build(args: Arguments): BuildResult {
        return undefined;
     }
}");

            return(app);
        }
 protected void OnSourceFileConfigurationNotification(JToken token)
 {
     m_addSourceFileConfiguration = token.ToObject <AddSourceFileConfigurationParams>();
 }