All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Cleaned up
CancellationToken.ThrowIfCancellationRequested()
calls. - Update project url references.
- Update DocumentFormat.OpenXml reference to 2.18.0.
- Update System.CodeDom reference to 7.0.0.
- Added asynchronous versions of the
GenerateSourceCode(...)
extenson methods forOpenXmlElement
,OpenXmlPart
, andOpenXmlPackage
objects.
- [Breaking Change]: Updated
IOpenXmlElementHandler
andIOpenXmlPartHandler
interfaces to addCancellationToken
parameters to all applicable method definitions. - Update DocumentFormat.OpenXml reference to 2.16.0.
- Update System.CodeDom reference to 6.0.0.
- When creating and initializing
OpenXmlUnknownElement
variables, use theCreateOpenXmlUnknownElement
static method instead of the traditional constructor. - When the
BuildCodeStatements
method ofOpenXmlElementExtensions
extensions class encounterd a DateTime property it was throwing aSystem.ArgumentException
Invalid Primitive Type System.DateTime. fixed by @vtgrady2k
- Refactored the variable name generation process to reuse existing variable names when they become available.
- [Breaking Change]: Added
UseUniqueVariableNames
property toISerializeSettings
interface. This allows to switch between unique and reused variable names. - [Breaking Change]: Changed
typeCounts
parameter totypes
in theIOpenXmlElementHandler.BuildCodeStatements(...)
method to account for the repurposing of existing variable name. - Update DocumentFormat.OpenXml reference to 2.14.0.
- Use the correct
CodeExpression
classes for theXmlNodeType
parameter of theOpenXmlMiscNode
constructor.
- Refactored the using directive generation logic to better match how the OpenXML SDK Productivity Tool used to create them. Using directive aliases are now dynamically generated based on the OpenXml object that the code output is based on.
- [Breaking Change]: Updated the
namespace
parameter type in theIOpenXmlElementHandler
andIOpenXmlPartHandler
interface methods fromISet<string>
toIDictionary<string, string>
to account for the new namespace/using directive generation logic. The following interface methods are impacted:IOpenXmlElementHandler.BuildCodeStatements(...)
IOpenXmlPartHandler.BuildEntryMethodCodeStatements(...)
IOpenXmlPartHandler.BuildHelperMethod(...)
- Issue related to Hyperlink and external relationship references were not being added properly
in all
OpenXmlPart
code creation scenarios. - Use the right constructor parameters for
OpenXmlMiscNode
objects.
- New
ISerializeSettings
interface to allows greater flexibility in the source code generation. - New
IOpenXmlHandler
,IOpenXmlElementHandler
, andIOpenXmlPartHandler
interfaces that will allow developers to control how source code is created.
- Change visibility of many of the static method helpers so developers can use them in their custom code generation.
- Update DocumentFormat.OpenXml reference to 2.13.0.
- Make sure that the return type of generated element methods include the namespace alias if needed.
- Choose between the default method or contentType parameter method for the custom OpenXmlPart.AddNewPart methods (ex: pkg.AddExtendedFilePropertiesPart() or mainDocumentPart.AddImagePart("image/x-emf"))
- Updated process to account for more OpenXmlPart classes that may require custom AddNewPart methods to initialize.
- Changed the
CreatePackage
method to take in aString
parameter for the full file path of the target file instead of aStream
when generating code forOpenXmlPackage
objects. This was to avoid using a C#ref
parameter that made using the generated code in a C# project more difficult to use.
- TargetInvocationException/FormatException when trying to parse a value that is not valid for
OpenXmlSimpleType
derived types being evaluated. See this for more details. - When encountering OpenXmlUnknownElement objects, make sure to initialize them with the appropriate
ctor
method. - Correct the initialization parameters for the generated
AddExternalRelationship
method. - Issue where AddPart methods for OpenXmlPart paths that have already been visited are generated on variables that do not exist.
- TargetInvocationException/FormatException when trying to parse a value that is not valid for
the
EnumValue
type being evaluated. See this for more details.
- Update DocumentFormat.OpenXml reference to 2.11.3.
- Ambiguous Match Exception occuring when trying to identify parts that need to use the
AddImagePart
initialization method.
- Change the parameters for all of the methods to
ref
parameters. This changes the generated VB code to createbyref
parameters instead ofbyval
ones.
- Added documentation output
- Use the alias
AP
for DocumentFormat.OpenXml.ExtendedProperties namespace objects - Use the
AddImagePart
method for initializingImagePart
objects. - Included the content type parameter for the
AddNewPart
method forEmbeddedPackagePart
objects.
- Added initial project to convert OpenXml SDK based documents to source code files.