Skip to content

Commit 4a1e593

Browse files
committed
add #pragma warning disable CS0618 to all generated files
1 parent 0b61534 commit 4a1e593

File tree

282 files changed

+282
-35
lines changed

Some content is hidden

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

282 files changed

+282
-35
lines changed

gen/DocumentFormat.OpenXml.Generator.Models/Editor/TextWriterExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public static void WriteFileHeader(this TextWriter writer)
2929
writer.WriteLine(Line2);
3030
writer.WriteLine();
3131
writer.WriteLine("#nullable enable");
32+
writer.WriteLine("#pragma warning disable CS0618");
3233
writer.WriteLine();
3334
}
3435

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -406,22 +406,11 @@ private static void WriteMetadata(this IndentedTextWriter writer, OpenXmlGenerat
406406
{
407407
var className = services.FindClassName(child);
408408

409-
if (className == "DocumentFormat.OpenXml.Office.SpreadSheetML.Y2024.PivotDynamicArrays.PivotCacheDynamicArray" || className == "DocumentFormat.OpenXml.Office.SpreadSheetML.Y2022.PivotRichData.PivotCacheRichInfo")
410-
{
411-
writer.WriteLine("#pragma warning disable CS0618");
412-
}
413-
414409
writer.Write("builder.AddChild(");
415-
416410
writer.Write(className);
417411
writer.Write(".ElementType, static () => new ");
418412
writer.Write(className);
419413
writer.WriteLine("());");
420-
421-
if (className == "DocumentFormat.OpenXml.Office.SpreadSheetML.Y2024.PivotDynamicArrays.PivotCacheDynamicArray" || className == "DocumentFormat.OpenXml.Office.SpreadSheetML.Y2022.PivotRichData.PivotCacheRichInfo")
422-
{
423-
writer.WriteLine("#pragma warning restore CS0618");
424-
}
425414
}
426415
}
427416

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,23 +96,11 @@ private static void WriteItemNode(this IndentedTextWriter writer, OpenXmlGenerat
9696
if (particle.Kind == ParticleType.Element)
9797
{
9898
var info = services.FindClassName(particle.Name);
99-
100-
if (info == "DocumentFormat.OpenXml.Office.SpreadSheetML.Y2024.PivotDynamicArrays.PivotCacheDynamicArray" || info == "DocumentFormat.OpenXml.Office.SpreadSheetML.Y2022.PivotRichData.PivotCacheRichInfo")
101-
{
102-
writer.WriteLine("#pragma warning disable CS0618");
103-
}
104-
10599
writer.WriteObject("ElementParticle", particle, w =>
106100
{
107101
w.Write(info);
108102
w.Write(".ElementType");
109103
});
110-
111-
if (info == "DocumentFormat.OpenXml.Office.SpreadSheetML.Y2024.PivotDynamicArrays.PivotCacheDynamicArray" || info == "DocumentFormat.OpenXml.Office.SpreadSheetML.Y2022.PivotRichData.PivotCacheRichInfo")
112-
{
113-
writer.WriteLine();
114-
writer.WriteLine("#pragma warning restore CS0618");
115-
}
116104
}
117105
else if (particle.Kind == ParticleType.Any)
118106
{

generated/DocumentFormat.OpenXml.Framework/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Namespaces.g.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
55

66
#nullable enable
7+
#pragma warning disable CS0618
78

89
using System.Collections.Generic;
910

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
55

66
#nullable enable
7+
#pragma warning disable CS0618
78

89
using DocumentFormat.OpenXml;
910
using DocumentFormat.OpenXml.Features;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
55

66
#nullable enable
7+
#pragma warning disable CS0618
78

89
using DocumentFormat.OpenXml;
910
using DocumentFormat.OpenXml.Features;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
55

66
#nullable enable
7+
#pragma warning disable CS0618
78

89
using DocumentFormat.OpenXml;
910
using DocumentFormat.OpenXml.Features;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
55

66
#nullable enable
7+
#pragma warning disable CS0618
78

89
using DocumentFormat.OpenXml;
910
using DocumentFormat.OpenXml.Features;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
55

66
#nullable enable
7+
#pragma warning disable CS0618
78

89
using DocumentFormat.OpenXml;
910
using DocumentFormat.OpenXml.Features;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
55

66
#nullable enable
7+
#pragma warning disable CS0618
78

89
using DocumentFormat.OpenXml;
910
using DocumentFormat.OpenXml.Features;

0 commit comments

Comments
 (0)