Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
FolkerKinzel committed Jul 19, 2024
1 parent 0f4a3d9 commit 2473803
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/BenchmarksCurrentVersion/PatternMatchingBench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public bool OrTruePatternMatching()
return result;
}

static bool HasToBeQuoted(int bt) => bt != '\t' && (bt > 126 || bt == '=' || bt < 32);
private static bool HasToBeQuoted(int bt) => bt != '\t' && (bt > 126 || bt == '=' || bt < 32);

static bool HasToBeQuotedPatternMatching(int bt) => bt is not '\t' and (> 126 or '=' or < 32);
private static bool HasToBeQuotedPatternMatching(int bt) => bt is not '\t' and (> 126 or '=' or < 32);


}
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void UnMaskParameterValueTest1(string input, bool isLabel, string expecte
[TestMethod]
public void UnMaskParameterValueTest2()
{
string trailing = new string('a', 500);
string trailing = new('a', 500);
string s = "^'" + trailing;

Assert.AreEqual("\"" + trailing, s.AsSpan().UnMaskParameterValue(false));
Expand Down
2 changes: 1 addition & 1 deletion src/FolkerKinzel.VCards/FolkerKinzel.VCards.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PackageId>FolkerKinzel.VCards</PackageId>
<Product>FolkerKinzel.VCards</Product>
<Version>7.2.0-beta.2</Version>
<FileVersion>7.2.0.8</FileVersion>
<FileVersion>7.2.0.10</FileVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<PackageReleaseNotes>https://github.com/FolkerKinzel/VCards/releases/tag/v7.2.0-beta.2</PackageReleaseNotes>
<PackageTags>.net vcard vcf c#</PackageTags>
Expand Down
4 changes: 4 additions & 0 deletions src/FolkerKinzel.VCards/Intls/Serializers/VcfSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,10 @@ private void AppendProperties()
case Prop.ContactUris:
AppendContactUris((IEnumerable<TextProperty?>)kvp.Value);
break;
#if DEBUG
default:
throw new NotImplementedException();
#endif
}//switch
}//foreach
}
Expand Down
9 changes: 0 additions & 9 deletions src/FolkerKinzel.VCards/Resources/Res.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions src/FolkerKinzel.VCards/Resources/Res.resx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,4 @@
<data name="StreamNotWritable" xml:space="preserve">
<value>The Stream is not writable.</value>
</data>
<data name="UnrecognizedDataType" xml:space="preserve">
<value>Unrecognized data type.</value>
</data>
</root>
3 changes: 3 additions & 0 deletions src/FolkerKinzel.VCards/VCard_Meta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public bool IsEmpty()
{
VCardProperty prop => !prop.IsEmpty,
IEnumerable<VCardProperty?> numerable => numerable.Any(x => !(x?.IsEmpty ?? true)),
#if DEBUG
_ => throw new NotImplementedException()
#endif
});
#pragma warning restore CS8509 // The switch expression does not handle all possible values of its input type (it is not exhaustive).

Expand Down
3 changes: 3 additions & 0 deletions src/FolkerKinzel.VCards/VCard_ctor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ private VCard(VCard vCard)
IEnumerable<TimeZoneProperty?> tzPropEnumerable => tzPropEnumerable.Select(cloner).Cast<TimeZoneProperty?>().ToArray(),

ICloneable cloneable => cloneable.Clone(), // AccessProperty, KindProperty, TimeStampProperty, UuidProperty
#if DEBUG
_ => throw new NotImplementedException()
#endif
});
#pragma warning restore CS8509 // The switch expression does not handle all possible values of its input type (it is not exhaustive).
}//foreach
Expand Down

0 comments on commit 2473803

Please sign in to comment.