|
1 | 1 |
|
2 | | -namespace Beamable.Editor.BeamCli.Commands |
3 | | -{ |
4 | | - using Beamable.Common; |
5 | | - using Beamable.Common.BeamCli; |
6 | | - |
7 | | - public partial class ProjectGeneratePropertiesArgs : Beamable.Common.BeamCli.IBeamCommandArgs |
8 | | - { |
9 | | - /// <summary>Where the file will be created</summary> |
10 | | - public string output; |
11 | | - /// <summary>Beam path to be used. Use BEAM_SOLUTION_DIR to template in $(SolutionDir)</summary> |
12 | | - public string beamPath; |
| 2 | +namespace Beamable.Editor.BeamCli.Commands |
| 3 | +{ |
| 4 | + using Beamable.Common; |
| 5 | + using Beamable.Common.BeamCli; |
| 6 | + |
| 7 | + public partial class ProjectGeneratePropertiesArgs : Beamable.Common.BeamCli.IBeamCommandArgs |
| 8 | + { |
| 9 | + /// <summary>Where the file will be created</summary> |
| 10 | + public string output; |
| 11 | + /// <summary>Beam path to be used. Use BEAM_SOLUTION_DIR to template in $(SolutionDir)</summary> |
| 12 | + public string beamPath; |
13 | 13 | /// <summary>The solution path to be used. |
14 | 14 | ///The following values have special meaning and are not treated as paths... |
15 | | - ///- "DIR.PROPS" = $([System.IO.Path]::GetDirectoryName(`$(DirectoryBuildPropsPath)`)) </summary> |
16 | | - public string solutionDir; |
17 | | - /// <summary>A path relative to the given solution directory, that will be used to store the projects /bin and /obj directories. Note: the given path will have the project's assembly name and the bin or obj folder appended</summary> |
18 | | - public string buildDir; |
19 | | - /// <summary>Serializes the arguments for command line usage.</summary> |
20 | | - public virtual string Serialize() |
21 | | - { |
22 | | - // Create a list of arguments for the command |
23 | | - System.Collections.Generic.List<string> genBeamCommandArgs = new System.Collections.Generic.List<string>(); |
24 | | - // Add the output value to the list of args. |
25 | | - genBeamCommandArgs.Add(this.output.ToString()); |
26 | | - // Add the beamPath value to the list of args. |
27 | | - genBeamCommandArgs.Add(this.beamPath.ToString()); |
28 | | - // Add the solutionDir value to the list of args. |
29 | | - genBeamCommandArgs.Add(this.solutionDir.ToString()); |
30 | | - // If the buildDir value was not default, then add it to the list of args. |
31 | | - if ((this.buildDir != default(string))) |
32 | | - { |
33 | | - genBeamCommandArgs.Add(("--build-dir=" + this.buildDir)); |
34 | | - } |
35 | | - string genBeamCommandStr = ""; |
36 | | - // Join all the args with spaces |
37 | | - genBeamCommandStr = string.Join(" ", genBeamCommandArgs); |
38 | | - return genBeamCommandStr; |
39 | | - } |
40 | | - } |
41 | | - public partial class BeamCommands |
42 | | - { |
43 | | - public virtual ProjectGeneratePropertiesWrapper ProjectGenerateProperties(ProjectGeneratePropertiesArgs generatePropertiesArgs) |
44 | | - { |
45 | | - // Create a list of arguments for the command |
46 | | - System.Collections.Generic.List<string> genBeamCommandArgs = new System.Collections.Generic.List<string>(); |
47 | | - genBeamCommandArgs.Add("beam"); |
48 | | - genBeamCommandArgs.Add(defaultBeamArgs.Serialize()); |
49 | | - genBeamCommandArgs.Add("project"); |
50 | | - genBeamCommandArgs.Add("generate-properties"); |
51 | | - genBeamCommandArgs.Add(generatePropertiesArgs.Serialize()); |
52 | | - // Create an instance of an IBeamCommand |
53 | | - Beamable.Common.BeamCli.IBeamCommand command = this._factory.Create(); |
54 | | - // Join all the command paths and args into one string |
55 | | - string genBeamCommandStr = string.Join(" ", genBeamCommandArgs); |
56 | | - // Configure the command with the command string |
57 | | - command.SetCommand(genBeamCommandStr); |
58 | | - ProjectGeneratePropertiesWrapper genBeamCommandWrapper = new ProjectGeneratePropertiesWrapper(); |
59 | | - genBeamCommandWrapper.Command = command; |
60 | | - // Return the command! |
61 | | - return genBeamCommandWrapper; |
62 | | - } |
63 | | - } |
64 | | - public partial class ProjectGeneratePropertiesWrapper : Beamable.Common.BeamCli.BeamCommandWrapper |
65 | | - { |
66 | | - } |
67 | | -} |
| 15 | + ///- "DIR.PROPS" = $([System.IO.Path]::GetDirectoryName(`$(DirectoryBuildPropsPath)`)) </summary> |
| 16 | + public string solutionDir; |
| 17 | + /// <summary>A path relative to the given solution directory, that will be used to store the projects /bin and /obj directories. Note: the given path will have the project's assembly name and the bin or obj folder appended</summary> |
| 18 | + public string buildDir; |
| 19 | + /// <summary>Serializes the arguments for command line usage.</summary> |
| 20 | + public virtual string Serialize() |
| 21 | + { |
| 22 | + // Create a list of arguments for the command |
| 23 | + System.Collections.Generic.List<string> genBeamCommandArgs = new System.Collections.Generic.List<string>(); |
| 24 | + // Add the output value to the list of args. |
| 25 | + genBeamCommandArgs.Add(this.output.ToString()); |
| 26 | + // Add the beamPath value to the list of args. |
| 27 | + genBeamCommandArgs.Add(this.beamPath.ToString()); |
| 28 | + // Add the solutionDir value to the list of args. |
| 29 | + genBeamCommandArgs.Add(this.solutionDir.ToString()); |
| 30 | + // If the buildDir value was not default, then add it to the list of args. |
| 31 | + if ((this.buildDir != default(string))) |
| 32 | + { |
| 33 | + genBeamCommandArgs.Add(("--build-dir=" + this.buildDir)); |
| 34 | + } |
| 35 | + string genBeamCommandStr = ""; |
| 36 | + // Join all the args with spaces |
| 37 | + genBeamCommandStr = string.Join(" ", genBeamCommandArgs); |
| 38 | + return genBeamCommandStr; |
| 39 | + } |
| 40 | + } |
| 41 | + public partial class BeamCommands |
| 42 | + { |
| 43 | + public virtual ProjectGeneratePropertiesWrapper ProjectGenerateProperties(ProjectGeneratePropertiesArgs generatePropertiesArgs) |
| 44 | + { |
| 45 | + // Create a list of arguments for the command |
| 46 | + System.Collections.Generic.List<string> genBeamCommandArgs = new System.Collections.Generic.List<string>(); |
| 47 | + genBeamCommandArgs.Add("beam"); |
| 48 | + genBeamCommandArgs.Add(defaultBeamArgs.Serialize()); |
| 49 | + genBeamCommandArgs.Add("project"); |
| 50 | + genBeamCommandArgs.Add("generate-properties"); |
| 51 | + genBeamCommandArgs.Add(generatePropertiesArgs.Serialize()); |
| 52 | + // Create an instance of an IBeamCommand |
| 53 | + Beamable.Common.BeamCli.IBeamCommand command = this._factory.Create(); |
| 54 | + // Join all the command paths and args into one string |
| 55 | + string genBeamCommandStr = string.Join(" ", genBeamCommandArgs); |
| 56 | + // Configure the command with the command string |
| 57 | + command.SetCommand(genBeamCommandStr); |
| 58 | + ProjectGeneratePropertiesWrapper genBeamCommandWrapper = new ProjectGeneratePropertiesWrapper(); |
| 59 | + genBeamCommandWrapper.Command = command; |
| 60 | + // Return the command! |
| 61 | + return genBeamCommandWrapper; |
| 62 | + } |
| 63 | + } |
| 64 | + public partial class ProjectGeneratePropertiesWrapper : Beamable.Common.BeamCli.BeamCommandWrapper |
| 65 | + { |
| 66 | + } |
| 67 | +} |
0 commit comments