Skip to content

Commit 584ecca

Browse files
committed
Update versioning and enhance CodeFactory SDK features
Updated version numbers in `.nuspec` and project files to `2.25220.0.1-PreRelease`. The `AssemblyFileVersion` in `AssemblyInfo.cs` has been synchronized with the new version. Minimum and maximum SDK version constants in `SdkSupport.cs` have been adjusted accordingly. Introduced new method `LoadExternalConfigAsync` in `VsActionsExtensions.cs` for loading external configuration commands. New classes and attributes for external configuration mapping have been added, including `CommandConfigAttribute` and various parameter configuration attributes. Enhanced `ExternalConfigMap` with additional properties and methods for managing configurations. Introduced `PropertySetter` for dynamic property value assignment and `ObjectNameTransformer` for managing object name transformations. Added extension methods to improve functionality in `CsClass`, `CsInterface`, and other C# model classes for better namespace and using statement management. Updated `CsFactoryManagement` to include methods for managing C# code elements and ensuring required using statements are present. Enhanced `CsSourceClassManager` with methods for adding syntax elements around fields and constructors. Overall, these changes improve the structure, functionality, and usability of the CodeFactory SDK, particularly regarding external configurations and C# code management.
1 parent 8befc38 commit 584ecca

File tree

62 files changed

+8229
-21
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+8229
-21
lines changed

Src/CodeFactoryForWindows/CodeFactory.Packager.WinVs/CodeFactoryWinVsSDK.nuspec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" >
33
<metadata>
44
<id>CodeFactory.WinVs.SDK</id>
5-
<version>2.25214.0.1-PreRelease</version>
5+
<version>2.25220.0.1-PreRelease</version>
66
<title>CodeFactory Software Development Kit for Visual Studio - Windows</title>
77
<authors>CodeFactory, LLC.</authors>
88
<owners>CodeFactory, LLC.</owners>
99
<license type="expression">MIT</license>
1010
<requireLicenseAcceptance>true</requireLicenseAcceptance>
1111
<description>Software development kit for building CodeFactory automation in Visual Studio - Windows.</description>
1212
<releaseNotes>
13-
Release Updates for 2.25214.0.1
13+
Release Updates for 2.25220.0.1
1414

1515
Recompile Release:
1616
When you update your automation to this version of the SDK.
@@ -40,9 +40,9 @@
4040
<copyright>Copyright © 2025 CodeFactory, LLC.</copyright>
4141
<tags>Factory Automation</tags>
4242
<dependencies>
43-
<dependency id="CodeFactory" version="2.25214.0.1-PreRelease"/>
44-
<dependency id="CodeFactory.WinVs" version="2.25214.0.1-PreRelease"/>
45-
<dependency id="CodeFactory.WinVs.Wpf" version="2.25214.0.1-PreRelease"/>
43+
<dependency id="CodeFactory" version="2.25220.0.1-PreRelease"/>
44+
<dependency id="CodeFactory.WinVs" version="2.25220.0.1-PreRelease"/>
45+
<dependency id="CodeFactory.WinVs.Wpf" version="2.25220.0.1-PreRelease"/>
4646
</dependencies>
4747
<icon>CFLogo128.png</icon>
4848
</metadata>

Src/CodeFactoryForWindows/CodeFactory.Packager.WinVs/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
3535
[assembly: AssemblyVersion("2.0.0.0")]
36-
[assembly: AssemblyFileVersion("2.25214.0.1")]
36+
[assembly: AssemblyFileVersion("2.25220.0.1")]

Src/CodeFactoryForWindows/CodeFactory.WinVs.Wpf/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
3535
[assembly: AssemblyVersion("2.0.0.0")]
36-
[assembly: AssemblyFileVersion("2.25214.0.1")]
36+
[assembly: AssemblyFileVersion("2.25220.0.1")]

Src/CodeFactoryForWindows/CodeFactory.WinVs.Wpf/WinVsWpf.nuspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" >
33
<metadata>
44
<id>CodeFactory.WinVs.Wpf</id>
5-
<version>2.25214.0.1-PreRelease</version>
5+
<version>2.25220.0.1-PreRelease</version>
66
<title>CodeFactory User Interface WPF for Visual Studio - Windows</title>
77
<authors>CodeFactory, LLC.</authors>
88
<owners>CodeFactory, LLC.</owners>
99
<license type="expression">MIT</license>
1010
<requireLicenseAcceptance>true</requireLicenseAcceptance>
1111
<description>Library that provides custom dialog screens hosted in Visual Studio for Windows, hosted for CodeFactory automation.</description>
1212
<releaseNotes>
13-
Release Updates for 2.25214.0.1
13+
Release Updates for 2.25220.0.1
1414

1515
Recompile Release:
1616
When you update your automation to this version of the SDK.
@@ -19,8 +19,8 @@
1919
<copyright>Copyright © 2025 CodeFactory, LLC.</copyright>
2020
<tags>Factory Automation</tags>
2121
<dependencies>
22-
<dependency id="CodeFactory" version="2.25214.0.1-PreRelease"/>
23-
<dependency id="CodeFactory.WinVs" version="2.25214.0.1-PreRelease"/>
22+
<dependency id="CodeFactory" version="2.25220.0.1-PreRelease"/>
23+
<dependency id="CodeFactory.WinVs" version="2.25220.0.1-PreRelease"/>
2424
</dependencies>
2525
<icon>CFLogo128.png</icon>
2626
</metadata>

Src/CodeFactoryForWindows/CodeFactory.WinVs/CodeFactory.WinVs.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<SignAssembly>True</SignAssembly>
77
<AssemblyOriginatorKeyFile>CFSigner.snk</AssemblyOriginatorKeyFile>
88
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
9-
<Version>2.25214.0.1-PreRelease</Version>
9+
<Version>2.25220.0.1-PreRelease</Version>
1010
<Authors>CodeFactory, LLC.</Authors>
1111
<Company>CodeFactory, LLC.</Company>
1212
<Product>CodeFactory Base Library</Product>
@@ -17,10 +17,10 @@
1717
<IncludeSymbols>False</IncludeSymbols>
1818
<Title>CodeFactory API for Visual Studio - Windows </Title>
1919
<AssemblyVersion>2.0.0.0</AssemblyVersion>
20-
<FileVersion>2.25214.0.1</FileVersion>
20+
<FileVersion>2.25220.0.1</FileVersion>
2121
<PackageIcon>CFLogo128.png</PackageIcon>
2222
<PackageReleaseNotes>
23-
Release Updates for 2.25214.0.1
23+
Release Updates for 2.25220.0.1
2424

2525
Recompile Release:
2626
When you update your automation to this version of the SDK.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace CodeFactory.WinVs.Commands
8+
{
9+
/// <summary>
10+
/// Specifies metadata for a command configuration, including its name, associated command type, guidance text, and
11+
/// optional documentation URL. This attribute is applied to classes to define their command configuration details.
12+
/// </summary>
13+
/// <remarks>Use this attribute to annotate classes that represent command configurations. The metadata
14+
/// provided by this attribute can be used to categorize commands, associate them with specific command types, and
15+
/// provide additional guidance or documentation for users.</remarks>
16+
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
17+
public class CommandConfigAttribute:ExternalConfigAttribute
18+
{
19+
20+
/// <summary>
21+
/// Initializes a new instance of the <see cref="CommandConfigAttribute"/> class.
22+
/// </summary>
23+
/// <remarks>This attribute is used to specify that the associated member represents a command
24+
/// configuration. It is primarily intended for use in scenarios where external configuration types need to be
25+
/// explicitly defined.</remarks>
26+
public CommandConfigAttribute(): base(ExternalConfigType.Command)
27+
{
28+
//Intentionally left blank, this is used to define the type of external configuration this attribute represents.
29+
}
30+
31+
/// <summary>
32+
/// The name of the command configuration.
33+
/// </summary>
34+
public string Name { get; set; }
35+
36+
/// <summary>
37+
/// The type of the command that supports this configuration.
38+
/// </summary>
39+
public Type SupportingCommand { get; set; }
40+
41+
/// <summary>
42+
/// Gets the guidance text associated with the command configuration. This can provide additional context or instructions for users.
43+
/// </summary>
44+
public string Guidance { get; set; }
45+
46+
/// <summary>
47+
/// Gets or sets the URL that provides additional guidance or documentation.
48+
/// </summary>
49+
public string GuidanceUrl { get; set; }
50+
51+
/// <summary>
52+
/// The category of the command configuration, which can be used to group similar commands together.
53+
/// </summary>
54+
public string Category { get; set; }
55+
}
56+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Runtime.CompilerServices;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace CodeFactory.WinVs.Commands
9+
{
10+
/// <summary>
11+
/// Represents an external configuration map for a command, including its type, guidance, and related documentation.
12+
/// </summary>
13+
/// <remarks>This class is used to define the configuration details for a specific command, including its
14+
/// name, type, optional guidance text, and an optional URL for additional documentation. It extends the <see
15+
/// cref="ExternalConfigMap"/> class and is specifically tailored for command-related configurations.</remarks>
16+
public class CommandExternalConfigMap: ExternalConfigMap
17+
{
18+
/// <summary>
19+
/// Initializes a new instance of the <see cref="CommandExternalConfigMap"/> class with the specified name,
20+
/// command type, guidance, and guidance URL.
21+
/// </summary>
22+
/// <param name="name">The name of the external configuration command. Cannot be null or empty.</param>
23+
/// <param name="commandType">The type of the command represented by this configuration. Cannot be null or empty.</param>
24+
/// <param name="category">The category assoicated with the command configuration.</param>
25+
/// <param name="guidance">The guidance text associated with the command. This can provide additional context or instructions. Can be
26+
/// null.</param>
27+
/// <param name="guidanceUrl">The URL pointing to detailed guidance or documentation for the command. Can be null.</param>
28+
public CommandExternalConfigMap( string name, string commandType, string category, string guidance, string guidanceUrl):base(ExternalConfigType.Command,name,false,guidance,guidanceUrl,null)
29+
{
30+
CommandType = commandType;
31+
Category = category;
32+
}
33+
34+
/// <summary>
35+
/// The fully qualified type name of the command that supports this configuration.
36+
/// </summary>
37+
public string CommandType { get; init; }
38+
39+
/// <summary>
40+
/// Gets or sets the category associated with the command configuration. This can be used to group similar commands together.
41+
/// </summary>
42+
public string Category { get; set; }
43+
}
44+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace CodeFactory.WinVs.Commands
8+
{
9+
/// <summary>
10+
/// Specifies that a property represents a configuration setting for an execution project.
11+
/// </summary>
12+
/// <remarks>This attribute is intended to be applied to properties to indicate their role in defining
13+
/// configuration settings for execution projects. It can only be applied to properties and does not support
14+
/// multiple instances on the same property.</remarks>
15+
[AttributeUsage (AttributeTargets.Property, AllowMultiple = false,Inherited = true)]
16+
public class ExecutionProjectConfigAttribute: ExternalConfigAttribute
17+
{
18+
/// <summary>
19+
/// Specifies that the associated member is configured to use the "ExecuteProject" external configuration type.
20+
/// </summary>
21+
/// <remarks>This attribute is used to indicate that a member is associated with the
22+
/// "ExecuteProject" configuration type. It is primarily intended for use in scenarios where external
23+
/// configuration types are categorized and processed.</remarks>
24+
public ExecutionProjectConfigAttribute() : base(ExternalConfigType.ExecuteProject)
25+
{
26+
// Intentionally left blank, this is used to define the type of external configuration this attribute represents.
27+
}
28+
29+
/// <summary>
30+
/// Gets the guidance text associated with the command configuration. This can provide additional context or instructions for users.
31+
/// </summary>
32+
public string Guidance { get; set; } = "The project the automation command will execute from.";
33+
34+
/// <summary>
35+
/// Gets or sets the URL that provides additional guidance or documentation.
36+
/// </summary>
37+
public string GuidanceUrl { get; set; }
38+
}
39+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace CodeFactory.WinVs.Commands
8+
{
9+
/// <summary>
10+
/// Represents an external configuration map specific to execution projects, providing guidance and a mechanism to
11+
/// set configuration values.
12+
/// </summary>
13+
/// <remarks>This class is a specialized implementation of <see cref="ExternalConfigMap"/> designed for
14+
/// execution project configurations. It includes guidance text, an optional guidance URL, and a delegate for
15+
/// setting configuration values dynamically.</remarks>
16+
public class ExecutionProjectExternalConfigMap : ExternalConfigMap
17+
{
18+
/// <summary>
19+
/// Initializes a new instance of the <see cref="ExecutionProjectExternalConfigMap"/> class with the specified
20+
/// name, guidance, guidance URL, and configuration value setter.
21+
/// </summary>
22+
/// <param name="name">The name of the external configuration map.</param>
23+
/// <param name="guidance">The guidance text associated with the configuration map.</param>
24+
/// <param name="guidanceUrl">The URL providing additional guidance for the configuration map.</param>
25+
/// <param name="setConfigurationValue">An action delegate used to set the configuration value. The first parameter represents the target object,
26+
/// and the second parameter represents the value to set.</param>
27+
public ExecutionProjectExternalConfigMap(string name, string guidance, string guidanceUrl, IPropertySetter setConfigurationValue) : base(ExternalConfigType.ExecuteProject, name, true, guidance, guidanceUrl, setConfigurationValue)
28+
{
29+
//Intentionally blank
30+
}
31+
32+
33+
}
34+
}

0 commit comments

Comments
 (0)