Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static void WriteFileHeader(this TextWriter writer)
writer.WriteLine(Line2);
writer.WriteLine();
writer.WriteLine("#nullable enable");
writer.WriteLine("#pragma warning disable CS0618");
writer.WriteLine();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ public static class DataModelWriterExtensions
{
public static class AttributeStrings
{
public const string ObsoleteClassWarn = "[Obsolete(\"Unused class, will be removed in a future version.\", false)]";
public const string ObsoletePropertyWarn = "[Obsolete(\"Unused property, will be removed in a future version.\", false)]";
public const string ObsoletePropertyError = "[Obsolete(\"Unused property, will be removed in a future version.\", true)]";
public const string ObsoleteAttributeWarn = "[Obsolete(\"Unused attribute, will be removed in a future version.\", false)]";
public const string ObsoleteAttributeError = "[Obsolete(\"Unused attribute, will be removed in a future version.\", true)]";
public const string ObsoleteChildWarn = "[Obsolete(\"Obsolete child element, will be removed in a future version.\", false)]";
public const string EditorBrowsableAlways = "[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)] ";
public const string EditorBrowsableAdvanced = "[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)] ";
public const string EditorBrowsableNever = "[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] ";
Expand All @@ -30,6 +32,18 @@ public static class AttributeStrings
AttributeStrings.EditorBrowsableNever,
];

private static readonly List<string> ObsoleteClassErrorList =
[
AttributeStrings.ObsoleteClassWarn,
AttributeStrings.EditorBrowsableNever,
];

private static readonly List<string> ObsoleteChildWarnList =
[
AttributeStrings.ObsoleteChildWarn,
AttributeStrings.EditorBrowsableNever,
];

// Use this dictionary to add attributes like ObsoleteAttribute or other directives to classes, child elements or attributes.
private static readonly Dictionary<TypedQName, Dictionary<TypedQName, List<string>>> _attributeData =
new Dictionary<TypedQName, Dictionary<TypedQName, List<string>>>()
Expand Down Expand Up @@ -117,6 +131,36 @@ public static class AttributeStrings
},
}
},
{
"xlpda:CT_PivotCacheDynamicArray/xlpda:pivotCacheDynamicArray",
new Dictionary<TypedQName, List<string>>()
{
{
"xlpda:CT_PivotCacheDynamicArray/xlpda:pivotCacheDynamicArray",
ObsoleteClassErrorList
},
}
},
{
"xprd:CT_PivotCacheRichInfo/xprd:richInfo",
new Dictionary<TypedQName, List<string>>()
{
{
"xprd:CT_PivotCacheRichInfo/xprd:richInfo",
ObsoleteClassErrorList
},
}
},
{
"x:CT_PivotCacheDefinitionExtension/x:ext",
new Dictionary<TypedQName, List<string>>()
{
{
"xprd:CT_PivotCacheRichInfo/xprd:richInfo",
ObsoleteChildWarnList
},
}
},
};

public static bool GetDataModelSyntax(this IndentedTextWriter writer, OpenXmlGeneratorServices services, SchemaNamespace model)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using System.Collections.Generic;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Features;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Features;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Features;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Features;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Features;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Features;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Features;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Features;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Features;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable
#pragma warning disable CS0618

using DocumentFormat.OpenXml.Features;
using DocumentFormat.OpenXml.Framework;
Expand Down
Loading
Loading