Skip to content

Commit 451523e

Browse files
committed
fix merge conflict
2 parents ecacca6 + d20003e commit 451523e

File tree

265 files changed

+9969
-9764
lines changed

Some content is hidden

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

265 files changed

+9969
-9764
lines changed

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
55
<PackageVersion Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.14.0" />
66
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
7-
<PackageVersion Include="Microsoft.Bcl.Memory" Version="9.0.0" />
7+
<PackageVersion Include="Microsoft.Bcl.Memory" Version="9.0.4" />
88
<PackageVersion Include="Microsoft.DotNet.BuildTools.GenAPI" Version="3.0.0-preview4-06015-01" />
99
<PackageVersion Include="Microsoft.CodeAnalysis" Version="4.11.0" />
1010
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />

gen/DocumentFormat.OpenXml.Generator.Models/Generators/Elements/DataModelWriterExtensions.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,13 @@ private static void WriteMetadata(this IndentedTextWriter writer, OpenXmlGenerat
360360
{
361361
foreach (var child in containingType.KnownChildren)
362362
{
363-
writer.Write("builder.AddChild<");
364-
writer.Write(services.FindClassName(child));
365-
writer.WriteLine(">();");
363+
var className = services.FindClassName(child);
364+
365+
writer.Write("builder.AddChild(");
366+
writer.Write(className);
367+
writer.Write(".ElementType, static () => new ");
368+
writer.Write(className);
369+
writer.WriteLine("());");
366370
}
367371
}
368372

gen/DocumentFormat.OpenXml.Generator.Models/Generators/Parts/PartWriter.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public static class PartWriter
2222
"DocumentFormat.OpenXml.Framework",
2323
"System",
2424
"System.Collections.Generic",
25+
"System.Diagnostics.CodeAnalysis",
2526
};
2627

2728
private static readonly BlockOptions _options = new()
@@ -410,7 +411,7 @@ private static IEnumerable<Item> GetSchemaTypedParts(OpenXmlGeneratorServices se
410411
writer.WriteDocumentationComment("Gets or sets the root element of this part.");
411412
writer.Write("public ");
412413
writer.Write(apiName);
413-
writer.Write(" ");
414+
writer.Write("? ");
414415
writer.WriteLine(api.Class);
415416

416417
using (writer.AddBlock(_options))

generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Part_AlternativeFormatImportPart.g.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using DocumentFormat.OpenXml.Framework;
1010
using System;
1111
using System.Collections.Generic;
12+
using System.Diagnostics.CodeAnalysis;
1213

1314
namespace DocumentFormat.OpenXml.Packaging
1415
{

generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Part_CalculationChainPart.g.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using DocumentFormat.OpenXml.Framework;
1010
using System;
1111
using System.Collections.Generic;
12+
using System.Diagnostics.CodeAnalysis;
1213

1314
namespace DocumentFormat.OpenXml.Packaging
1415
{
@@ -32,7 +33,7 @@ internal CalculationChainPart()
3233
/// <summary>
3334
/// Gets or sets the root element of this part.
3435
/// </summary>
35-
public DocumentFormat.OpenXml.Spreadsheet.CalculationChain CalculationChain
36+
public DocumentFormat.OpenXml.Spreadsheet.CalculationChain? CalculationChain
3637
{
3738
get
3839
{

generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Part_CellMetadataPart.g.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using DocumentFormat.OpenXml.Framework;
1010
using System;
1111
using System.Collections.Generic;
12+
using System.Diagnostics.CodeAnalysis;
1213

1314
namespace DocumentFormat.OpenXml.Packaging
1415
{
@@ -48,7 +49,7 @@ private protected override OpenXmlPartRootElement? InternalRootElement
4849
/// <summary>
4950
/// Gets or sets the root element of this part.
5051
/// </summary>
51-
public DocumentFormat.OpenXml.Spreadsheet.Metadata Metadata
52+
public DocumentFormat.OpenXml.Spreadsheet.Metadata? Metadata
5253
{
5354
get
5455
{

generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Part_ChartColorStylePart.g.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using DocumentFormat.OpenXml.Framework;
1010
using System;
1111
using System.Collections.Generic;
12+
using System.Diagnostics.CodeAnalysis;
1213

1314
namespace DocumentFormat.OpenXml.Packaging
1415
{
@@ -32,7 +33,7 @@ internal ChartColorStylePart()
3233
/// <summary>
3334
/// Gets or sets the root element of this part.
3435
/// </summary>
35-
public DocumentFormat.OpenXml.Office2013.Drawing.ChartStyle.ColorStyle ColorStyle
36+
public DocumentFormat.OpenXml.Office2013.Drawing.ChartStyle.ColorStyle? ColorStyle
3637
{
3738
get
3839
{

generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Part_ChartDrawingPart.g.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using DocumentFormat.OpenXml.Framework;
1010
using System;
1111
using System.Collections.Generic;
12+
using System.Diagnostics.CodeAnalysis;
1213

1314
namespace DocumentFormat.OpenXml.Packaging
1415
{
@@ -69,7 +70,7 @@ private protected override OpenXmlPartRootElement? InternalRootElement
6970
/// <summary>
7071
/// Gets or sets the root element of this part.
7172
/// </summary>
72-
public DocumentFormat.OpenXml.Drawing.Charts.UserShapes UserShapes
73+
public DocumentFormat.OpenXml.Drawing.Charts.UserShapes? UserShapes
7374
{
7475
get
7576
{

generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Part_ChartPart.g.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using DocumentFormat.OpenXml.Framework;
1010
using System;
1111
using System.Collections.Generic;
12+
using System.Diagnostics.CodeAnalysis;
1213

1314
namespace DocumentFormat.OpenXml.Packaging
1415
{
@@ -44,7 +45,7 @@ internal ChartPart()
4445
/// <summary>
4546
/// Gets or sets the root element of this part.
4647
/// </summary>
47-
public DocumentFormat.OpenXml.Drawing.Charts.ChartSpace ChartSpace
48+
public DocumentFormat.OpenXml.Drawing.Charts.ChartSpace? ChartSpace
4849
{
4950
get
5051
{

generated/DocumentFormat.OpenXml/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Part_ChartStylePart.g.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using DocumentFormat.OpenXml.Framework;
1010
using System;
1111
using System.Collections.Generic;
12+
using System.Diagnostics.CodeAnalysis;
1213

1314
namespace DocumentFormat.OpenXml.Packaging
1415
{
@@ -32,7 +33,7 @@ internal ChartStylePart()
3233
/// <summary>
3334
/// Gets or sets the root element of this part.
3435
/// </summary>
35-
public DocumentFormat.OpenXml.Office2013.Drawing.ChartStyle.ChartStyle ChartStyle
36+
public DocumentFormat.OpenXml.Office2013.Drawing.ChartStyle.ChartStyle? ChartStyle
3637
{
3738
get
3839
{

0 commit comments

Comments
 (0)