Skip to content

Commit

Permalink
fix: Fixed small issue with xml doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Jul 15, 2024
1 parent 7fd0d70 commit e7b5710
Show file tree
Hide file tree
Showing 17,045 changed files with 426,429 additions and 79,524 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion src/libs/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</ItemGroup>

<PropertyGroup Label="Versioning">
<Version>0.13.7</Version>
<Version>0.13.8</Version>
<MinVerMinimumMajorMinor>0.1</MinVerMinimumMajorMinor>
<MinVerTagPrefix>v</MinVerTagPrefix>
<MinVerDefaultPreReleaseIdentifiers>dev</MinVerDefaultPreReleaseIdentifiers>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,9 @@ public static string GetXmlDocumentationSummary(this OpenApiOperation operation)
public static string ClearForXml(this string text)
{
text = text ?? throw new ArgumentNullException(nameof(text));

return text
.Replace("&", "&amp;")
.Replace("<", "&lt;")
.Replace(">", "&gt;");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,64 @@

namespace System
{
/// <summary>
///
/// </summary>
public readonly struct AllOf<T1> : global::System.IEquatable<AllOf<T1>>
{
/// <summary>
///
/// </summary>
#if NET6_0_OR_GREATER
public T1? Value1 { get; init; }
#else
public T1? Value1 { get; }
#endif

/// <summary>
///
/// </summary>
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))]
#endif
public bool IsValue1 => Value1 != null;

/// <summary>
///
/// </summary>
public static implicit operator AllOf<T1>(T1 value) => new AllOf<T1>(value);

/// <summary>
///
/// </summary>
public static implicit operator T1?(AllOf<T1> @this) => @this.Value1;

/// <summary>
///
/// </summary>
public AllOf(T1? value)
{
Value1 = value;
}

/// <summary>
///
/// </summary>
public object? Object =>
Value1 as object
;

/// <summary>
///
/// </summary>
public bool Validate()
{
return IsValue1;
}

/// <summary>
///
/// </summary>
public override int GetHashCode()
{
var fields = new object?[]
Expand All @@ -47,23 +78,35 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null
return fields.Aggregate(offset, HashCodeAggregator);
}

/// <summary>
///
/// </summary>
public bool Equals(AllOf<T1> other)
{
return
global::System.Collections.Generic.EqualityComparer<T1?>.Default.Equals(Value1, other.Value1)
;
}

/// <summary>
///
/// </summary>
public static bool operator ==(AllOf<T1> obj1, AllOf<T1> obj2)
{
return global::System.Collections.Generic.EqualityComparer<AllOf<T1>>.Default.Equals(obj1, obj2);
}

/// <summary>
///
/// </summary>
public static bool operator !=(AllOf<T1> obj1, AllOf<T1> obj2)
{
return !(obj1 == obj2);
}

/// <summary>
///
/// </summary>
public override bool Equals(object? obj)
{
return obj is AllOf<T1> o && Equals(o);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,71 +5,118 @@

namespace System
{
/// <summary>
///
/// </summary>
public readonly struct AllOf<T1, T2> : global::System.IEquatable<AllOf<T1, T2>>
{
/// <summary>
///
/// </summary>
#if NET6_0_OR_GREATER
public T1? Value1 { get; init; }
#else
public T1? Value1 { get; }
#endif

/// <summary>
///
/// </summary>
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))]
#endif
public bool IsValue1 => Value1 != null;

/// <summary>
///
/// </summary>
public static implicit operator AllOf<T1, T2>(T1 value) => new AllOf<T1, T2>(value);

/// <summary>
///
/// </summary>
public static implicit operator T1?(AllOf<T1, T2> @this) => @this.Value1;

/// <summary>
///
/// </summary>
public AllOf(T1? value)
{
Value1 = value;
}

/// <summary>
///
/// </summary>
#if NET6_0_OR_GREATER
public T2? Value2 { get; init; }
#else
public T2? Value2 { get; }
#endif

/// <summary>
///
/// </summary>
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
#endif
public bool IsValue2 => Value2 != null;

/// <summary>
///
/// </summary>
public static implicit operator AllOf<T1, T2>(T2 value) => new AllOf<T1, T2>(value);

/// <summary>
///
/// </summary>
public static implicit operator T2?(AllOf<T1, T2> @this) => @this.Value2;

/// <summary>
///
/// </summary>
public AllOf(T2? value)
{
Value2 = value;
}

/// <summary>
///
/// </summary>
public AllOf(
T1? value1,

T2? value2
)
{
Value1 = value1;

Value2 = value2;
}

/// <summary>
///
/// </summary>
public object? Object =>
Value2 as object ??
Value1 as object
;

/// <summary>
///
/// </summary>
public bool Validate()
{
return IsValue1 && IsValue2;
}

/// <summary>
///
/// </summary>
public override int GetHashCode()
{
var fields = new object?[]
{
Value1,
typeof(T1),

Value2,
typeof(T2),
};
Expand All @@ -81,25 +128,36 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null
return fields.Aggregate(offset, HashCodeAggregator);
}

/// <summary>
///
/// </summary>
public bool Equals(AllOf<T1, T2> other)
{
return
global::System.Collections.Generic.EqualityComparer<T1?>.Default.Equals(Value1, other.Value1) &&

global::System.Collections.Generic.EqualityComparer<T2?>.Default.Equals(Value2, other.Value2)
;
}

/// <summary>
///
/// </summary>
public static bool operator ==(AllOf<T1, T2> obj1, AllOf<T1, T2> obj2)
{
return global::System.Collections.Generic.EqualityComparer<AllOf<T1, T2>>.Default.Equals(obj1, obj2);
}

/// <summary>
///
/// </summary>
public static bool operator !=(AllOf<T1, T2> obj1, AllOf<T1, T2> obj2)
{
return !(obj1 == obj2);
}

/// <summary>
///
/// </summary>
public override bool Equals(object? obj)
{
return obj is AllOf<T1, T2> o && Equals(o);
Expand Down
Loading

0 comments on commit e7b5710

Please sign in to comment.