-
Notifications
You must be signed in to change notification settings - Fork 545
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into package-builder
- Loading branch information
Showing
8 changed files
with
868 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/DocumentFormat.OpenXml.Framework/Equality/OpenXmlElementComparers.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using System.Collections.Generic; | ||
|
||
namespace DocumentFormat.OpenXml | ||
{ | ||
/// <summary> | ||
/// Equality comparer for determining value equality for <see cref="OpenXmlElement"/>. | ||
/// </summary> | ||
public static class OpenXmlElementComparers | ||
{ | ||
/// <summary> | ||
/// Gets the default equality comparer. | ||
/// </summary> | ||
public static IEqualityComparer<OpenXmlElement> Default { get; } = Create(new OpenXmlElementEqualityOptions()); | ||
|
||
/// <summary> | ||
/// Creates a <see cref="IEqualityComparer{OpenXmlElement}"/> based on the given options./> | ||
/// </summary> | ||
/// <param name="openXmlElementEqualityOptions">The options defining equality.</param> | ||
/// <returns></returns> | ||
public static IEqualityComparer<OpenXmlElement> Create(OpenXmlElementEqualityOptions openXmlElementEqualityOptions) | ||
{ | ||
return new OpenXmlElementEqualityComparer(openXmlElementEqualityOptions); | ||
} | ||
} | ||
} |
Oops, something went wrong.