feat: initial commit

This commit is contained in:
Oliver Booth 2024-05-04 21:16:52 +01:00
commit e293737455
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5
165 changed files with 5760 additions and 0 deletions

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# Experiments
This repository contains various experiments and prototypes that I've developed over time. These generally entail nothing more than a ton of benchmarks, and a few various tests of language and framework features, and for the most part are not really usable in any way.
Alas, I've made this repository open source and added any and all "fuck around and find out" projects I've written over the years. Maybe it'll help people learn something new.
All the experiments have been rewritten for .NET 8 with C# 12 language features, so they should compile and run on the latest version of Roslyn. Have fun!

37
csharp/.gitignore vendored Normal file
View File

@ -0,0 +1,37 @@
*.swp
*.*~
project.lock.json
.DS_Store
*.pyc
nupkg/
# Visual Studio Code
.vscode
# Rider
.idea
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
msbuild.log
msbuild.err
msbuild.wrn
# Visual Studio 2015
.vs/

View File

@ -0,0 +1,442 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E061-LoopVsWhereBenchmarks", "E061-LoopVsWhereBenchmarks\E061-LoopVsWhereBenchmarks.csproj", "{22AEFFC8-2907-4836-9E32-225AA4CE1E98}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E025-FirstOrDefaultStruct", "E025-FirstOrDefaultStruct\E025-FirstOrDefaultStruct.csproj", "{43814C2B-541F-40EA-8EB9-7C594AADB43A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E033-EncryptionLocal", "E033-EncryptionLocal\E033-EncryptionLocal.csproj", "{AC944BBF-6BBF-48BB-9353-3D83127D0AA2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E066-ArrayVsListBenchmarks", "E066-ArrayVsListBenchmarks\E066-ArrayVsListBenchmarks.csproj", "{53F8D539-5076-4E4A-9455-A7B97C4854C4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E031-ArrayVsEnumerable", "E031-ArrayVsEnumerable\E031-ArrayVsEnumerable.csproj", "{3D4F0B68-B569-4753-B0C7-D7B30973A358}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E055-ArrayVsSpanBenchmarks", "E055-ArrayVsSpanBenchmarks\E055-ArrayVsSpanBenchmarks.csproj", "{5B080504-C0BB-476E-8A0C-2E3AA3A9466B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E030-AsyncVoid", "E030-AsyncVoid\E030-AsyncVoid.csproj", "{EA52F387-8BB9-4FF8-A736-6DF125B3CF58}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E001-BigOLoopBenchmarks", "E001-BigOLoopBenchmarks\E001-BigOLoopBenchmarks.csproj", "{102E8F58-523E-491C-8984-5A22A614CCFE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E002-DiscordUriParser", "E002-DiscordUriParser\E002-DiscordUriParser.csproj", "{595AB54B-38CC-4E35-887D-61E46E13C398}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E003-CharBenchmarks", "E003-CharBenchmarks\E003-CharBenchmarks.csproj", "{949554A1-B8CD-4D8E-93BF-EEEA4E832997}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E004-SwapBenchmarks", "E004-SwapBenchmarks\E004-SwapBenchmarks.csproj", "{22122BD2-E499-46A7-88B0-5B460998551B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E005-RegexCompiledBenchmarks", "E005-RegexCompiledBenchmarks\E005-RegexCompiledBenchmarks.csproj", "{E43955C3-05B3-4D32-A7E3-F0D0D05FB436}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E006-ConcatBenchmarks", "E006-ConcatBenchmarks\E006-ConcatBenchmarks.csproj", "{ED01E38C-83FD-487D-BE4E-94F39CFCF356}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E007-ConcatVsStringBuilderBenchmarks", "E007-ConcatVsStringBuilderBenchmarks\E007-ConcatVsStringBuilderBenchmarks.csproj", "{FF23B75C-4AD7-40E1-A72A-715CFED4FC10}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E008-X10D_ToGetParametersBenchmarks", "E008-X10D_ToGetParametersBenchmarks\E008-X10D_ToGetParametersBenchmarks.csproj", "{F2452AF6-A992-41D4-8C21-EC737A80DB7E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E009-TimeSpanParser", "E009-TimeSpanParser\E009-TimeSpanParser.csproj", "{DF605BC9-CD3A-4DC0-84D4-F87379B295F6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E010-ThreadTest", "E010-ThreadTest\E010-ThreadTest.csproj", "{55A8F85F-A740-4710-98F4-DA6E13818176}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E011-SpacedIntBenchmarks", "E011-SpacedIntBenchmarks\E011-SpacedIntBenchmarks.csproj", "{1EF789A6-8957-4E32-BB4C-D68DCE0CD1FE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E012-SourceGeneratorDummy", "E012-SourceGeneratorDummy\E012-SourceGeneratorDummy.csproj", "{DCFA6E58-68BA-4745-9574-F58DDCFEB20D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E013-ServerClient", "E013-ServerClient\E013-ServerClient.csproj", "{C31ED1D1-7FC7-48BC-8CED-DCD5BD04155C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E014-RemoveAllBenchmarks", "E014-RemoveAllBenchmarks\E014-RemoveAllBenchmarks.csproj", "{F2371518-6DA1-40B8-9C97-53322C57ABF0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E015-RegexVsCustomAttributeParser", "E015-RegexVsCustomAttributeParser\E015-RegexVsCustomAttributeParser.csproj", "{036B030C-5CB7-49C7-9F14-A986BF6A0CEF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E016-ProtoBufExtendedModel", "E016-ProtoBufExtendedModel\E016-ProtoBufExtendedModel.csproj", "{8707E46F-1246-41E6-8728-C78B8D161994}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E017-PowVsManualSquareBenchmarks", "E017-PowVsManualSquareBenchmarks\E017-PowVsManualSquareBenchmarks.csproj", "{2882913B-7382-4F6D-82BA-CDDFF5095449}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E018-OneLineMultiAssignment", "E018-OneLineMultiAssignment\E018-OneLineMultiAssignment.csproj", "{834A33D0-C8AA-435A-A631-5ECC33097E17}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E019-NullStringTest", "E019-NullStringTest\E019-NullStringTest.csproj", "{EB83B114-CC77-43AC-8633-A8E668B1A049}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E020-NestedStructPointer", "E020-NestedStructPointer\E020-NestedStructPointer.csproj", "{C37A707F-EFF7-4CE2-BB57-1BA6CD841BD0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E021-Nearest5MinuteDateTime", "E021-Nearest5MinuteDateTime\E021-Nearest5MinuteDateTime.csproj", "{4DBCBCD3-6831-47A6-BAD1-D49DA61E3280}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E022-ModifyReadonly", "E022-ModifyReadonly\E022-ModifyReadonly.csproj", "{0166ACDD-5963-4399-84C1-384D852D2728}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E023-MathEstimateBenchmarks", "E023-MathEstimateBenchmarks\E023-MathEstimateBenchmarks.csproj", "{6882C767-63CB-4387-AD13-0C59471CA759}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E024-Foreach", "E024-Foreach\E024-Foreach.csproj", "{FD9C7858-BA0F-43A5-A981-79716BD8F331}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E026-DictionaryBenchmarks", "E026-DictionaryBenchmarks\E026-DictionaryBenchmarks.csproj", "{0D5A2249-5336-451F-AC79-7CBAE41D46E0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E027-ConfigurationBenchmarks", "E027-ConfigurationBenchmarks\E027-ConfigurationBenchmarks.csproj", "{2DEF358D-4A84-4783-BE7D-18D78BEDE0A0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E028-ClassMemoryAddress", "E028-ClassMemoryAddress\E028-ClassMemoryAddress.csproj", "{DFE9EC1A-E31A-49A4-94A8-C4A36D2A9F77}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E029-CircularBitShift", "E029-CircularBitShift\E029-CircularBitShift.csproj", "{24763AC2-85DD-4473-9C89-D6BF0E8267FB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E032-BinaryFormatterExploit", "E032-BinaryFormatterExploit\E032-BinaryFormatterExploit.csproj", "{FD3B9DF2-29FC-4A51-AEB8-2495DAC5A369}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E034-EncryptionNetwork", "E034-EncryptionNetwork\E034-EncryptionNetwork.csproj", "{472698F1-9E41-47AF-8805-E358FE2B63FB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E035-Expressions", "E035-Expressions\E035-Expressions.csproj", "{957B8279-B735-454C-B381-28C647E006BB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E036-NegateVsTimesMinus1Benchmarks", "E036-NegateVsTimesMinus1Benchmarks\E036-NegateVsTimesMinus1Benchmarks.csproj", "{55920614-9DFA-4052-9930-DEBB7BFC8414}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E037-FractionReduce", "E037-FractionReduce\E037-FractionReduce.csproj", "{C434A646-C742-4EC5-9FFF-ACFADEF32B81}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E038-RecursionBenchmarks", "E038-RecursionBenchmarks\E038-RecursionBenchmarks.csproj", "{36D8561F-F0EB-4262-8CE8-FB88BE373EB4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E039-UdpTest", "E039-UdpTest\E039-UdpTest.csproj", "{7A6C21D3-FDD8-4F73-A94C-608545169F66}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E040-CleverUsing", "E040-CleverUsing\E040-CleverUsing.csproj", "{DBE4E62D-7588-45F7-9B46-F94028F0E811}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E041-InheritanceTest", "E041-InheritanceTest\E041-InheritanceTest.csproj", "{3D2CA600-8540-47A2-B488-2624D54390A8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E042-LinqBenchmarks", "E042-LinqBenchmarks\E042-LinqBenchmarks.csproj", "{EA6C122F-7AD1-46A6-BE0A-6B382BC131B6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E043-AllNumericExceptBenchmarks", "E043-AllNumericExceptBenchmarks\E043-AllNumericExceptBenchmarks.csproj", "{7D12BB88-57D5-408B-BC76-7F60CCF8F3C9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E044-FiveFiveLetter", "E044-FiveFiveLetter\E044-FiveFiveLetter.csproj", "{1F58F526-7F5A-4D4B-B80A-3C33E29C0DDC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E045-VerbosePunctuation", "E045-VerbosePunctuation\E045-VerbosePunctuation.csproj", "{18D01F93-0B92-40DC-8629-4C03759FC59E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E046-DigitalRootBenchmarks", "E046-DigitalRootBenchmarks\E046-DigitalRootBenchmarks.csproj", "{F635EBDF-9BD4-4785-87AD-2DD768C363C9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E047-DigitalRoot", "E047-DigitalRoot\E047-DigitalRoot.csproj", "{4DB29CDF-C9A1-430C-A789-1B0E65023590}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E048-ColorClamping", "E048-ColorClamping\E048-ColorClamping.csproj", "{03209BD7-DD1D-4BE4-A871-B6AA8EB48CF9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E049-CoordinateBenchmarks", "E049-CoordinateBenchmarks\E049-CoordinateBenchmarks.csproj", "{9FC59E07-F50D-4285-BE5C-4A0156089AE1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E050-CEF", "E050-CEF\E050-CEF.csproj", "{CEC6B570-FEDF-43EA-8B5D-B2322CB880C9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E051-LazyLinqTest", "E051-LazyLinqTest\E051-LazyLinqTest.csproj", "{D909599F-3A2A-4423-BAE0-A4B40A5F09C4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E052-LineCountBenchmarks", "E052-LineCountBenchmarks\E052-LineCountBenchmarks.csproj", "{F30BDA1F-3203-4191-944A-070DCF4905B2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E053-InverseSqrtBenchmarks", "E053-InverseSqrtBenchmarks\E053-InverseSqrtBenchmarks.csproj", "{0A37A89E-66A6-4BF8-8F11-D388E8406F2B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E054-DivisionBenchmarks", "E054-DivisionBenchmarks\E054-DivisionBenchmarks.csproj", "{0DACAADE-F388-4C03-AAAA-990917FA6BD7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E056-UnsafeKata", "E056-UnsafeKata\E056-UnsafeKata.csproj", "{B84420CC-FBFB-41FC-B1B3-F3F0637382FD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E057-TypeRoulette", "E057-TypeRoulette\E057-TypeRoulette.csproj", "{611F553F-AE76-4DE4-BEAF-FB07E1D42145}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E058-ToArrayVsAsReadOnlyBenchmarks", "E058-ToArrayVsAsReadOnlyBenchmarks\E058-ToArrayVsAsReadOnlyBenchmarks.csproj", "{D3956C0F-BE5A-4276-8F85-C0F8F8250931}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E059-RandomTypes", "E059-RandomTypes\E059-RandomTypes.csproj", "{E0DFB8D1-5F56-46B9-B519-A270F84D666E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E060-PointerFuckery", "E060-PointerFuckery\E060-PointerFuckery.csproj", "{B77CD82E-0BAB-4452-A5A4-AAA13D8BB9D0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E062-LoopVsCountBenchmarks", "E062-LoopVsCountBenchmarks\E062-LoopVsCountBenchmarks.csproj", "{CEBB8458-59B0-4F47-8D8C-C03BC3D69B84}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E063-LinqVsNoLinqBenchmarks", "E063-LinqVsNoLinqBenchmarks\E063-LinqVsNoLinqBenchmarks.csproj", "{B38B1DF3-599B-44F1-BC5D-8C23756EBD85}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E064-DynamicVsReflectionBenchmarks", "E064-DynamicVsReflectionBenchmarks\E064-DynamicVsReflectionBenchmarks.csproj", "{221CAE99-5A4D-41A7-8C9D-936F11760B15}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E065-DiacriticBenchmarks", "E065-DiacriticBenchmarks\E065-DiacriticBenchmarks.csproj", "{9537565E-22C6-4FD5-ACD1-E2F63D3E41B6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E067-FacebookMathProblem", "E067-FacebookMathProblem\E067-FacebookMathProblem.csproj", "{E2CA4E37-1023-4B1E-85FA-A4D3321B7BA5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E068-SseBenchmarks", "E068-SseBenchmarks\E068-SseBenchmarks.csproj", "{153CA51C-A9A9-4137-80C9-9ECB97E6B2DB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E069-IntegerToDecimalBenchmarks", "E069-IntegerToDecimalBenchmarks\E069-IntegerToDecimalBenchmarks.csproj", "{0587EEAC-ACAE-4622-89C9-AC324FAC430A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E070-TimeSpanConversionBenchmarks", "E070-TimeSpanConversionBenchmarks\E070-TimeSpanConversionBenchmarks.csproj", "{F0A3EC63-1422-4D82-A69B-8BD88FF5B5F6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E071-Thev2AndySerializer", "E071-Thev2AndySerializer\E071-Thev2AndySerializer.csproj", "{6FCF7A4E-329C-4E25-9D50-D8DF1EBE387B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "E072-StringBenchmarks", "E072-StringBenchmarks\E072-StringBenchmarks.csproj", "{3AC20C3A-0FB3-41C3-81A6-C4610050576A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{22AEFFC8-2907-4836-9E32-225AA4CE1E98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{22AEFFC8-2907-4836-9E32-225AA4CE1E98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{22AEFFC8-2907-4836-9E32-225AA4CE1E98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{22AEFFC8-2907-4836-9E32-225AA4CE1E98}.Release|Any CPU.Build.0 = Release|Any CPU
{43814C2B-541F-40EA-8EB9-7C594AADB43A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{43814C2B-541F-40EA-8EB9-7C594AADB43A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{43814C2B-541F-40EA-8EB9-7C594AADB43A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{43814C2B-541F-40EA-8EB9-7C594AADB43A}.Release|Any CPU.Build.0 = Release|Any CPU
{AC944BBF-6BBF-48BB-9353-3D83127D0AA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC944BBF-6BBF-48BB-9353-3D83127D0AA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC944BBF-6BBF-48BB-9353-3D83127D0AA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC944BBF-6BBF-48BB-9353-3D83127D0AA2}.Release|Any CPU.Build.0 = Release|Any CPU
{53F8D539-5076-4E4A-9455-A7B97C4854C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53F8D539-5076-4E4A-9455-A7B97C4854C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53F8D539-5076-4E4A-9455-A7B97C4854C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53F8D539-5076-4E4A-9455-A7B97C4854C4}.Release|Any CPU.Build.0 = Release|Any CPU
{3D4F0B68-B569-4753-B0C7-D7B30973A358}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D4F0B68-B569-4753-B0C7-D7B30973A358}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D4F0B68-B569-4753-B0C7-D7B30973A358}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3D4F0B68-B569-4753-B0C7-D7B30973A358}.Release|Any CPU.Build.0 = Release|Any CPU
{5B080504-C0BB-476E-8A0C-2E3AA3A9466B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B080504-C0BB-476E-8A0C-2E3AA3A9466B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B080504-C0BB-476E-8A0C-2E3AA3A9466B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B080504-C0BB-476E-8A0C-2E3AA3A9466B}.Release|Any CPU.Build.0 = Release|Any CPU
{EA52F387-8BB9-4FF8-A736-6DF125B3CF58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EA52F387-8BB9-4FF8-A736-6DF125B3CF58}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA52F387-8BB9-4FF8-A736-6DF125B3CF58}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EA52F387-8BB9-4FF8-A736-6DF125B3CF58}.Release|Any CPU.Build.0 = Release|Any CPU
{102E8F58-523E-491C-8984-5A22A614CCFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{102E8F58-523E-491C-8984-5A22A614CCFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{102E8F58-523E-491C-8984-5A22A614CCFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{102E8F58-523E-491C-8984-5A22A614CCFE}.Release|Any CPU.Build.0 = Release|Any CPU
{595AB54B-38CC-4E35-887D-61E46E13C398}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{595AB54B-38CC-4E35-887D-61E46E13C398}.Debug|Any CPU.Build.0 = Debug|Any CPU
{595AB54B-38CC-4E35-887D-61E46E13C398}.Release|Any CPU.ActiveCfg = Release|Any CPU
{595AB54B-38CC-4E35-887D-61E46E13C398}.Release|Any CPU.Build.0 = Release|Any CPU
{949554A1-B8CD-4D8E-93BF-EEEA4E832997}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{949554A1-B8CD-4D8E-93BF-EEEA4E832997}.Debug|Any CPU.Build.0 = Debug|Any CPU
{949554A1-B8CD-4D8E-93BF-EEEA4E832997}.Release|Any CPU.ActiveCfg = Release|Any CPU
{949554A1-B8CD-4D8E-93BF-EEEA4E832997}.Release|Any CPU.Build.0 = Release|Any CPU
{22122BD2-E499-46A7-88B0-5B460998551B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{22122BD2-E499-46A7-88B0-5B460998551B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{22122BD2-E499-46A7-88B0-5B460998551B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{22122BD2-E499-46A7-88B0-5B460998551B}.Release|Any CPU.Build.0 = Release|Any CPU
{E43955C3-05B3-4D32-A7E3-F0D0D05FB436}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E43955C3-05B3-4D32-A7E3-F0D0D05FB436}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E43955C3-05B3-4D32-A7E3-F0D0D05FB436}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E43955C3-05B3-4D32-A7E3-F0D0D05FB436}.Release|Any CPU.Build.0 = Release|Any CPU
{ED01E38C-83FD-487D-BE4E-94F39CFCF356}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED01E38C-83FD-487D-BE4E-94F39CFCF356}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED01E38C-83FD-487D-BE4E-94F39CFCF356}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED01E38C-83FD-487D-BE4E-94F39CFCF356}.Release|Any CPU.Build.0 = Release|Any CPU
{FF23B75C-4AD7-40E1-A72A-715CFED4FC10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF23B75C-4AD7-40E1-A72A-715CFED4FC10}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF23B75C-4AD7-40E1-A72A-715CFED4FC10}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF23B75C-4AD7-40E1-A72A-715CFED4FC10}.Release|Any CPU.Build.0 = Release|Any CPU
{F2452AF6-A992-41D4-8C21-EC737A80DB7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2452AF6-A992-41D4-8C21-EC737A80DB7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2452AF6-A992-41D4-8C21-EC737A80DB7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F2452AF6-A992-41D4-8C21-EC737A80DB7E}.Release|Any CPU.Build.0 = Release|Any CPU
{DF605BC9-CD3A-4DC0-84D4-F87379B295F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DF605BC9-CD3A-4DC0-84D4-F87379B295F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DF605BC9-CD3A-4DC0-84D4-F87379B295F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DF605BC9-CD3A-4DC0-84D4-F87379B295F6}.Release|Any CPU.Build.0 = Release|Any CPU
{55A8F85F-A740-4710-98F4-DA6E13818176}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55A8F85F-A740-4710-98F4-DA6E13818176}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55A8F85F-A740-4710-98F4-DA6E13818176}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55A8F85F-A740-4710-98F4-DA6E13818176}.Release|Any CPU.Build.0 = Release|Any CPU
{1EF789A6-8957-4E32-BB4C-D68DCE0CD1FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1EF789A6-8957-4E32-BB4C-D68DCE0CD1FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1EF789A6-8957-4E32-BB4C-D68DCE0CD1FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1EF789A6-8957-4E32-BB4C-D68DCE0CD1FE}.Release|Any CPU.Build.0 = Release|Any CPU
{DCFA6E58-68BA-4745-9574-F58DDCFEB20D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DCFA6E58-68BA-4745-9574-F58DDCFEB20D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DCFA6E58-68BA-4745-9574-F58DDCFEB20D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DCFA6E58-68BA-4745-9574-F58DDCFEB20D}.Release|Any CPU.Build.0 = Release|Any CPU
{C31ED1D1-7FC7-48BC-8CED-DCD5BD04155C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C31ED1D1-7FC7-48BC-8CED-DCD5BD04155C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C31ED1D1-7FC7-48BC-8CED-DCD5BD04155C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C31ED1D1-7FC7-48BC-8CED-DCD5BD04155C}.Release|Any CPU.Build.0 = Release|Any CPU
{F2371518-6DA1-40B8-9C97-53322C57ABF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2371518-6DA1-40B8-9C97-53322C57ABF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2371518-6DA1-40B8-9C97-53322C57ABF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F2371518-6DA1-40B8-9C97-53322C57ABF0}.Release|Any CPU.Build.0 = Release|Any CPU
{036B030C-5CB7-49C7-9F14-A986BF6A0CEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{036B030C-5CB7-49C7-9F14-A986BF6A0CEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{036B030C-5CB7-49C7-9F14-A986BF6A0CEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{036B030C-5CB7-49C7-9F14-A986BF6A0CEF}.Release|Any CPU.Build.0 = Release|Any CPU
{8707E46F-1246-41E6-8728-C78B8D161994}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8707E46F-1246-41E6-8728-C78B8D161994}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8707E46F-1246-41E6-8728-C78B8D161994}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8707E46F-1246-41E6-8728-C78B8D161994}.Release|Any CPU.Build.0 = Release|Any CPU
{2882913B-7382-4F6D-82BA-CDDFF5095449}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2882913B-7382-4F6D-82BA-CDDFF5095449}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2882913B-7382-4F6D-82BA-CDDFF5095449}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2882913B-7382-4F6D-82BA-CDDFF5095449}.Release|Any CPU.Build.0 = Release|Any CPU
{834A33D0-C8AA-435A-A631-5ECC33097E17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{834A33D0-C8AA-435A-A631-5ECC33097E17}.Debug|Any CPU.Build.0 = Debug|Any CPU
{834A33D0-C8AA-435A-A631-5ECC33097E17}.Release|Any CPU.ActiveCfg = Release|Any CPU
{834A33D0-C8AA-435A-A631-5ECC33097E17}.Release|Any CPU.Build.0 = Release|Any CPU
{EB83B114-CC77-43AC-8633-A8E668B1A049}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EB83B114-CC77-43AC-8633-A8E668B1A049}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB83B114-CC77-43AC-8633-A8E668B1A049}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB83B114-CC77-43AC-8633-A8E668B1A049}.Release|Any CPU.Build.0 = Release|Any CPU
{C37A707F-EFF7-4CE2-BB57-1BA6CD841BD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C37A707F-EFF7-4CE2-BB57-1BA6CD841BD0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C37A707F-EFF7-4CE2-BB57-1BA6CD841BD0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C37A707F-EFF7-4CE2-BB57-1BA6CD841BD0}.Release|Any CPU.Build.0 = Release|Any CPU
{4DBCBCD3-6831-47A6-BAD1-D49DA61E3280}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4DBCBCD3-6831-47A6-BAD1-D49DA61E3280}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4DBCBCD3-6831-47A6-BAD1-D49DA61E3280}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4DBCBCD3-6831-47A6-BAD1-D49DA61E3280}.Release|Any CPU.Build.0 = Release|Any CPU
{0166ACDD-5963-4399-84C1-384D852D2728}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0166ACDD-5963-4399-84C1-384D852D2728}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0166ACDD-5963-4399-84C1-384D852D2728}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0166ACDD-5963-4399-84C1-384D852D2728}.Release|Any CPU.Build.0 = Release|Any CPU
{6882C767-63CB-4387-AD13-0C59471CA759}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6882C767-63CB-4387-AD13-0C59471CA759}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6882C767-63CB-4387-AD13-0C59471CA759}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6882C767-63CB-4387-AD13-0C59471CA759}.Release|Any CPU.Build.0 = Release|Any CPU
{FD9C7858-BA0F-43A5-A981-79716BD8F331}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD9C7858-BA0F-43A5-A981-79716BD8F331}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD9C7858-BA0F-43A5-A981-79716BD8F331}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD9C7858-BA0F-43A5-A981-79716BD8F331}.Release|Any CPU.Build.0 = Release|Any CPU
{0D5A2249-5336-451F-AC79-7CBAE41D46E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D5A2249-5336-451F-AC79-7CBAE41D46E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D5A2249-5336-451F-AC79-7CBAE41D46E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D5A2249-5336-451F-AC79-7CBAE41D46E0}.Release|Any CPU.Build.0 = Release|Any CPU
{2DEF358D-4A84-4783-BE7D-18D78BEDE0A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2DEF358D-4A84-4783-BE7D-18D78BEDE0A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DEF358D-4A84-4783-BE7D-18D78BEDE0A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2DEF358D-4A84-4783-BE7D-18D78BEDE0A0}.Release|Any CPU.Build.0 = Release|Any CPU
{DFE9EC1A-E31A-49A4-94A8-C4A36D2A9F77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DFE9EC1A-E31A-49A4-94A8-C4A36D2A9F77}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DFE9EC1A-E31A-49A4-94A8-C4A36D2A9F77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DFE9EC1A-E31A-49A4-94A8-C4A36D2A9F77}.Release|Any CPU.Build.0 = Release|Any CPU
{24763AC2-85DD-4473-9C89-D6BF0E8267FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{24763AC2-85DD-4473-9C89-D6BF0E8267FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{24763AC2-85DD-4473-9C89-D6BF0E8267FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{24763AC2-85DD-4473-9C89-D6BF0E8267FB}.Release|Any CPU.Build.0 = Release|Any CPU
{FD3B9DF2-29FC-4A51-AEB8-2495DAC5A369}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD3B9DF2-29FC-4A51-AEB8-2495DAC5A369}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD3B9DF2-29FC-4A51-AEB8-2495DAC5A369}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD3B9DF2-29FC-4A51-AEB8-2495DAC5A369}.Release|Any CPU.Build.0 = Release|Any CPU
{472698F1-9E41-47AF-8805-E358FE2B63FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{472698F1-9E41-47AF-8805-E358FE2B63FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{472698F1-9E41-47AF-8805-E358FE2B63FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{472698F1-9E41-47AF-8805-E358FE2B63FB}.Release|Any CPU.Build.0 = Release|Any CPU
{957B8279-B735-454C-B381-28C647E006BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{957B8279-B735-454C-B381-28C647E006BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{957B8279-B735-454C-B381-28C647E006BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{957B8279-B735-454C-B381-28C647E006BB}.Release|Any CPU.Build.0 = Release|Any CPU
{55920614-9DFA-4052-9930-DEBB7BFC8414}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55920614-9DFA-4052-9930-DEBB7BFC8414}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55920614-9DFA-4052-9930-DEBB7BFC8414}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55920614-9DFA-4052-9930-DEBB7BFC8414}.Release|Any CPU.Build.0 = Release|Any CPU
{C434A646-C742-4EC5-9FFF-ACFADEF32B81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C434A646-C742-4EC5-9FFF-ACFADEF32B81}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C434A646-C742-4EC5-9FFF-ACFADEF32B81}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C434A646-C742-4EC5-9FFF-ACFADEF32B81}.Release|Any CPU.Build.0 = Release|Any CPU
{36D8561F-F0EB-4262-8CE8-FB88BE373EB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36D8561F-F0EB-4262-8CE8-FB88BE373EB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36D8561F-F0EB-4262-8CE8-FB88BE373EB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36D8561F-F0EB-4262-8CE8-FB88BE373EB4}.Release|Any CPU.Build.0 = Release|Any CPU
{7A6C21D3-FDD8-4F73-A94C-608545169F66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A6C21D3-FDD8-4F73-A94C-608545169F66}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A6C21D3-FDD8-4F73-A94C-608545169F66}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A6C21D3-FDD8-4F73-A94C-608545169F66}.Release|Any CPU.Build.0 = Release|Any CPU
{DBE4E62D-7588-45F7-9B46-F94028F0E811}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DBE4E62D-7588-45F7-9B46-F94028F0E811}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DBE4E62D-7588-45F7-9B46-F94028F0E811}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DBE4E62D-7588-45F7-9B46-F94028F0E811}.Release|Any CPU.Build.0 = Release|Any CPU
{3D2CA600-8540-47A2-B488-2624D54390A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D2CA600-8540-47A2-B488-2624D54390A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D2CA600-8540-47A2-B488-2624D54390A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3D2CA600-8540-47A2-B488-2624D54390A8}.Release|Any CPU.Build.0 = Release|Any CPU
{EA6C122F-7AD1-46A6-BE0A-6B382BC131B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EA6C122F-7AD1-46A6-BE0A-6B382BC131B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA6C122F-7AD1-46A6-BE0A-6B382BC131B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EA6C122F-7AD1-46A6-BE0A-6B382BC131B6}.Release|Any CPU.Build.0 = Release|Any CPU
{7D12BB88-57D5-408B-BC76-7F60CCF8F3C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D12BB88-57D5-408B-BC76-7F60CCF8F3C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D12BB88-57D5-408B-BC76-7F60CCF8F3C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7D12BB88-57D5-408B-BC76-7F60CCF8F3C9}.Release|Any CPU.Build.0 = Release|Any CPU
{1F58F526-7F5A-4D4B-B80A-3C33E29C0DDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F58F526-7F5A-4D4B-B80A-3C33E29C0DDC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F58F526-7F5A-4D4B-B80A-3C33E29C0DDC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1F58F526-7F5A-4D4B-B80A-3C33E29C0DDC}.Release|Any CPU.Build.0 = Release|Any CPU
{18D01F93-0B92-40DC-8629-4C03759FC59E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{18D01F93-0B92-40DC-8629-4C03759FC59E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{18D01F93-0B92-40DC-8629-4C03759FC59E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{18D01F93-0B92-40DC-8629-4C03759FC59E}.Release|Any CPU.Build.0 = Release|Any CPU
{F635EBDF-9BD4-4785-87AD-2DD768C363C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F635EBDF-9BD4-4785-87AD-2DD768C363C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F635EBDF-9BD4-4785-87AD-2DD768C363C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F635EBDF-9BD4-4785-87AD-2DD768C363C9}.Release|Any CPU.Build.0 = Release|Any CPU
{4DB29CDF-C9A1-430C-A789-1B0E65023590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4DB29CDF-C9A1-430C-A789-1B0E65023590}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4DB29CDF-C9A1-430C-A789-1B0E65023590}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4DB29CDF-C9A1-430C-A789-1B0E65023590}.Release|Any CPU.Build.0 = Release|Any CPU
{03209BD7-DD1D-4BE4-A871-B6AA8EB48CF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03209BD7-DD1D-4BE4-A871-B6AA8EB48CF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03209BD7-DD1D-4BE4-A871-B6AA8EB48CF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03209BD7-DD1D-4BE4-A871-B6AA8EB48CF9}.Release|Any CPU.Build.0 = Release|Any CPU
{9FC59E07-F50D-4285-BE5C-4A0156089AE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9FC59E07-F50D-4285-BE5C-4A0156089AE1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9FC59E07-F50D-4285-BE5C-4A0156089AE1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9FC59E07-F50D-4285-BE5C-4A0156089AE1}.Release|Any CPU.Build.0 = Release|Any CPU
{CEC6B570-FEDF-43EA-8B5D-B2322CB880C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CEC6B570-FEDF-43EA-8B5D-B2322CB880C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CEC6B570-FEDF-43EA-8B5D-B2322CB880C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CEC6B570-FEDF-43EA-8B5D-B2322CB880C9}.Release|Any CPU.Build.0 = Release|Any CPU
{D909599F-3A2A-4423-BAE0-A4B40A5F09C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D909599F-3A2A-4423-BAE0-A4B40A5F09C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D909599F-3A2A-4423-BAE0-A4B40A5F09C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D909599F-3A2A-4423-BAE0-A4B40A5F09C4}.Release|Any CPU.Build.0 = Release|Any CPU
{F30BDA1F-3203-4191-944A-070DCF4905B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F30BDA1F-3203-4191-944A-070DCF4905B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F30BDA1F-3203-4191-944A-070DCF4905B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F30BDA1F-3203-4191-944A-070DCF4905B2}.Release|Any CPU.Build.0 = Release|Any CPU
{0A37A89E-66A6-4BF8-8F11-D388E8406F2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A37A89E-66A6-4BF8-8F11-D388E8406F2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A37A89E-66A6-4BF8-8F11-D388E8406F2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A37A89E-66A6-4BF8-8F11-D388E8406F2B}.Release|Any CPU.Build.0 = Release|Any CPU
{0DACAADE-F388-4C03-AAAA-990917FA6BD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0DACAADE-F388-4C03-AAAA-990917FA6BD7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0DACAADE-F388-4C03-AAAA-990917FA6BD7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0DACAADE-F388-4C03-AAAA-990917FA6BD7}.Release|Any CPU.Build.0 = Release|Any CPU
{B84420CC-FBFB-41FC-B1B3-F3F0637382FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B84420CC-FBFB-41FC-B1B3-F3F0637382FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B84420CC-FBFB-41FC-B1B3-F3F0637382FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B84420CC-FBFB-41FC-B1B3-F3F0637382FD}.Release|Any CPU.Build.0 = Release|Any CPU
{611F553F-AE76-4DE4-BEAF-FB07E1D42145}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{611F553F-AE76-4DE4-BEAF-FB07E1D42145}.Debug|Any CPU.Build.0 = Debug|Any CPU
{611F553F-AE76-4DE4-BEAF-FB07E1D42145}.Release|Any CPU.ActiveCfg = Release|Any CPU
{611F553F-AE76-4DE4-BEAF-FB07E1D42145}.Release|Any CPU.Build.0 = Release|Any CPU
{D3956C0F-BE5A-4276-8F85-C0F8F8250931}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D3956C0F-BE5A-4276-8F85-C0F8F8250931}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3956C0F-BE5A-4276-8F85-C0F8F8250931}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D3956C0F-BE5A-4276-8F85-C0F8F8250931}.Release|Any CPU.Build.0 = Release|Any CPU
{E0DFB8D1-5F56-46B9-B519-A270F84D666E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E0DFB8D1-5F56-46B9-B519-A270F84D666E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E0DFB8D1-5F56-46B9-B519-A270F84D666E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E0DFB8D1-5F56-46B9-B519-A270F84D666E}.Release|Any CPU.Build.0 = Release|Any CPU
{B77CD82E-0BAB-4452-A5A4-AAA13D8BB9D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B77CD82E-0BAB-4452-A5A4-AAA13D8BB9D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B77CD82E-0BAB-4452-A5A4-AAA13D8BB9D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B77CD82E-0BAB-4452-A5A4-AAA13D8BB9D0}.Release|Any CPU.Build.0 = Release|Any CPU
{CEBB8458-59B0-4F47-8D8C-C03BC3D69B84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CEBB8458-59B0-4F47-8D8C-C03BC3D69B84}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CEBB8458-59B0-4F47-8D8C-C03BC3D69B84}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CEBB8458-59B0-4F47-8D8C-C03BC3D69B84}.Release|Any CPU.Build.0 = Release|Any CPU
{B38B1DF3-599B-44F1-BC5D-8C23756EBD85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B38B1DF3-599B-44F1-BC5D-8C23756EBD85}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B38B1DF3-599B-44F1-BC5D-8C23756EBD85}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B38B1DF3-599B-44F1-BC5D-8C23756EBD85}.Release|Any CPU.Build.0 = Release|Any CPU
{221CAE99-5A4D-41A7-8C9D-936F11760B15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{221CAE99-5A4D-41A7-8C9D-936F11760B15}.Debug|Any CPU.Build.0 = Debug|Any CPU
{221CAE99-5A4D-41A7-8C9D-936F11760B15}.Release|Any CPU.ActiveCfg = Release|Any CPU
{221CAE99-5A4D-41A7-8C9D-936F11760B15}.Release|Any CPU.Build.0 = Release|Any CPU
{9537565E-22C6-4FD5-ACD1-E2F63D3E41B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9537565E-22C6-4FD5-ACD1-E2F63D3E41B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9537565E-22C6-4FD5-ACD1-E2F63D3E41B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9537565E-22C6-4FD5-ACD1-E2F63D3E41B6}.Release|Any CPU.Build.0 = Release|Any CPU
{E2CA4E37-1023-4B1E-85FA-A4D3321B7BA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E2CA4E37-1023-4B1E-85FA-A4D3321B7BA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2CA4E37-1023-4B1E-85FA-A4D3321B7BA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E2CA4E37-1023-4B1E-85FA-A4D3321B7BA5}.Release|Any CPU.Build.0 = Release|Any CPU
{153CA51C-A9A9-4137-80C9-9ECB97E6B2DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{153CA51C-A9A9-4137-80C9-9ECB97E6B2DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{153CA51C-A9A9-4137-80C9-9ECB97E6B2DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{153CA51C-A9A9-4137-80C9-9ECB97E6B2DB}.Release|Any CPU.Build.0 = Release|Any CPU
{0587EEAC-ACAE-4622-89C9-AC324FAC430A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0587EEAC-ACAE-4622-89C9-AC324FAC430A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0587EEAC-ACAE-4622-89C9-AC324FAC430A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0587EEAC-ACAE-4622-89C9-AC324FAC430A}.Release|Any CPU.Build.0 = Release|Any CPU
{F0A3EC63-1422-4D82-A69B-8BD88FF5B5F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0A3EC63-1422-4D82-A69B-8BD88FF5B5F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0A3EC63-1422-4D82-A69B-8BD88FF5B5F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F0A3EC63-1422-4D82-A69B-8BD88FF5B5F6}.Release|Any CPU.Build.0 = Release|Any CPU
{6FCF7A4E-329C-4E25-9D50-D8DF1EBE387B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FCF7A4E-329C-4E25-9D50-D8DF1EBE387B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FCF7A4E-329C-4E25-9D50-D8DF1EBE387B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6FCF7A4E-329C-4E25-9D50-D8DF1EBE387B}.Release|Any CPU.Build.0 = Release|Any CPU
{3AC20C3A-0FB3-41C3-81A6-C4610050576A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3AC20C3A-0FB3-41C3-81A6-C4610050576A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3AC20C3A-0FB3-41C3-81A6-C4610050576A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3AC20C3A-0FB3-41C3-81A6-C4610050576A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>E001_BigOLoopBenchmarks</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,36 @@
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
BenchmarkRunner.Run<BigOLoop>();
[SimpleJob, MemoryDiagnoser(false)]
public class BigOLoop
{
[Benchmark]
[Arguments(1)]
[Arguments(10)]
[Arguments(100)]
[Arguments(1000)]
[Arguments(10000)]
public void Linear(int dimension)
{
int total = dimension * dimension;
for (var iterator = 0; iterator < total; iterator++)
{
}
}
[Benchmark]
[Arguments(1)]
[Arguments(10)]
[Arguments(100)]
[Arguments(1000)]
[Arguments(10000)]
public void Exponential(int dimension)
{
for (var x = 0; x < dimension; x++)
for (var y = 0; y < dimension; y++)
{
}
}
}

View File

@ -0,0 +1,18 @@
using BenchmarkDotNet.Attributes;
namespace E002_DiscordUriParser;
[SimpleJob, MemoryDiagnoser(false)]
public class DiscordUriParserBenchmarks
{
private const string Message = "This is a test https://discord.com/channels/" +
"779115633837211659/815556722722209803/944679403420524654";
[Benchmark]
[Arguments(Message)]
public (ulong, ulong, ulong) UsingUri(string input) => DiscordUrlParser.UsingUri(input);
[Benchmark]
[Arguments(Message)]
public (ulong, ulong, ulong) UsingRegex(string input) => DiscordUrlParser.UsingRegex(input);
}

View File

@ -0,0 +1,79 @@
using System.Text.RegularExpressions;
namespace E002_DiscordUriParser;
public partial class DiscordUrlParser
{
private static readonly Regex Regex = GetUrlRegex();
public static (ulong, ulong, ulong) UsingRegex(string input)
{
Match match = Regex.Match(input);
if (!match.Success)
{
return (0, 0, 0);
}
return (ulong.Parse(match.Groups[1].Value), ulong.Parse(match.Groups[2].Value), ulong.Parse(match.Groups[3].Value));
}
public static (ulong, ulong, ulong) UsingUri(string input)
{
string[] words = input.Split(' ');
foreach (string word in words)
{
if (!Uri.IsWellFormedUriString(word, UriKind.Absolute))
{
continue;
}
var uri = new Uri(word);
string host = uri.Host;
if (host.IndexOf('.') != host.LastIndexOf('.'))
{
// fuck your subdomains
host = host[(host.LastIndexOf('.', host.LastIndexOf('.', host.Length - 1) - 1) + 1)..];
}
if (host != "discord.com")
{
continue;
}
string path = uri.AbsolutePath;
if (!path.StartsWith("/channels/"))
{
continue;
}
path = path["/channels/".Length..];
int firstSeparatorIndex = path.IndexOf('/');
if (firstSeparatorIndex == -1)
{
continue;
}
int secondSeparatorIndex = path.IndexOf('/', firstSeparatorIndex + 1);
if (secondSeparatorIndex == -1)
{
continue;
}
if (ulong.TryParse(path[..firstSeparatorIndex], out ulong guild)
&& ulong.TryParse(path[(firstSeparatorIndex + 1)..secondSeparatorIndex], out ulong channel)
&& ulong.TryParse(path[(secondSeparatorIndex + 1)..], out ulong message))
{
return (guild, channel, message);
}
}
return (0, 0, 0);
}
/*lang=regex*/
private const string UrlRegexPattern = @"https://(?:www\.|canary\.|beta\.)?discord.com/channels/([0-9]+)/([0-9]+)/([0-9]+)/?";
[GeneratedRegex(UrlRegexPattern, RegexOptions.IgnoreCase | RegexOptions.Compiled, "en-GB")]
private static partial Regex GetUrlRegex();
}

View File

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>E002_DiscordUriParser</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,5 @@
var message = "This is a test https://canary.discord.com/channels/779115633837211659/815556722722209803/944679403420524654";
Console.WriteLine(E002_DiscordUriParser.DiscordUrlParser.UsingUri(message));
message = "This is a test https://beta.discord.com/channels/779115633837211659/815556722722209803/944679403420524654";
Console.WriteLine(E002_DiscordUriParser.DiscordUrlParser.UsingUri(message));

View File

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>E003_CharBenchmarks</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,20 @@
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
BenchmarkRunner.Run<CharBenchmark>();
[SimpleJob, MemoryDiagnoser(false)]
public class CharBenchmark
{
[Benchmark]
public char TestA()
{
return 'a';
}
[Benchmark]
public char TestUtf16()
{
return '\u0369';
}
}

View File

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>E004_SwapBenchmarks</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,47 @@
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
BenchmarkRunner.Run<SwapBenchmarks>();
[SimpleJob, MemoryDiagnoser(false)]
public class SwapBenchmarks
{
[Benchmark]
[Arguments(69, 420)]
public void Swap1(ref int a, ref int b)
{
a ^= b ^ (b = a);
}
[Benchmark]
[Arguments(69, 420)]
public void Swap2(ref int a, ref int b)
{
a = (a ^= b) ^ (b ^= a);
}
[Benchmark]
[Arguments(69, 420)]
public void Swap3(ref int a, ref int b)
{
a ^= b;
b ^= a;
a ^= b;
}
[Benchmark]
[Arguments(69, 420)]
public void SwapClassic(ref int a, ref int b)
{
int t = a;
a = b;
b = t;
}
[Benchmark]
[Arguments(69, 420)]
public void SwapViaDeconstruction(ref int a, ref int b)
{
(a, b) = (b, a);
}
}

View File

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>E005_RegexCompiledBenchmarks</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,26 @@
using System.Text.RegularExpressions;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
BenchmarkRunner.Run<RegexCompiledBenchmarks>();
[SimpleJob, MemoryDiagnoser(false)]
public class RegexCompiledBenchmarks
{
private static readonly Regex RegexInstance = new(@"\d");
private static readonly Regex CompiledRegexInstance = new(@"\d", RegexOptions.Compiled);
[Benchmark]
[Arguments("1234567890")]
public int BasicRegex(string input)
{
return RegexInstance.Matches(input).Count;
}
[Benchmark]
[Arguments("1234567890")]
public int CompiledRegex(string input)
{
return CompiledRegexInstance.Matches(input).Count;
}
}

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,51 @@
using System.Text;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
BenchmarkRunner.Run<ConcatBenchmarks>();
[SimpleJob, MemoryDiagnoser(false)]
public class ConcatBenchmarks
{
private string _string1;
private string _string2;
private string _string3;
[GlobalSetup]
public void Setup()
{
_string1 = "Hello";
_string2 = "World";
_string3 = "!";
}
[Benchmark]
public string PlusOperator()
{
return _string1 + _string2 + _string3;
}
[Benchmark]
public string String_Concat()
{
return string.Concat(_string1, _string2, _string3);
}
[Benchmark]
public string StringBuilder()
{
return new StringBuilder().Append(_string1).Append(_string2).Append(_string3).ToString();
}
[Benchmark]
public string Interpolation()
{
return $"{_string1}{_string2}{_string3}";
}
[Benchmark]
public string String_Format()
{
return string.Format("{0}{1}{2}", _string1, _string2, _string3);
}
}

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,41 @@
using System.Text;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
BenchmarkRunner.Run<ConcatVsStringBuilderBenchmarks>();
[SimpleJob, MemoryDiagnoser(false)]
public class ConcatVsStringBuilderBenchmarks
{
private int _count;
private string _string;
[GlobalSetup]
public void Setup()
{
_count = 100;
_string = "Hello World";
}
[Benchmark]
public string PlusOperator()
{
var result = "";
for (var i = 0; i < _count; i++)
result += _string;
return result;
}
[Benchmark]
public string StringBuilder()
{
var result = new StringBuilder();
for (var i = 0; i < _count; i++)
result.Append(_string);
return result.ToString();
}
}

View File

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>E008_X10D_ToGetParametersBenchmarks</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,50 @@
using System.Web;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
BenchmarkRunner.Run<X10DToGetParametersBenchmarks>();
[SimpleJob, MemoryDiagnoser(false)]
public class X10DToGetParametersBenchmarks
{
public Dictionary<string, int> Dictionary { get; } = new();
[GlobalSetup]
public void Setup()
{
for (var index = 0; index < 26; index++)
Dictionary.Add(('a' + index).ToString(), index);
}
[Benchmark]
public string List()
{
static string Sanitize<TKey, TValue>(KeyValuePair<TKey, TValue> pair) where TKey : notnull
{
string key = HttpUtility.UrlEncode(pair.Key.ToString())!;
string? value = HttpUtility.UrlEncode(pair.Value?.ToString());
return $"{key}={value}";
}
var list = new List<string>();
foreach (var pair in Dictionary)
{
list.Add(Sanitize(pair));
}
return string.Join('&', list);
}
[Benchmark]
public string Linq()
{
static string Sanitize<TKey, TValue>(KeyValuePair<TKey, TValue> pair) where TKey : notnull
{
string key = HttpUtility.UrlEncode(pair.Key.ToString())!;
string? value = HttpUtility.UrlEncode(pair.Value?.ToString());
return $"{key}={value}";
}
return string.Join('&', Dictionary.Select(Sanitize));
}
}

View File

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>E009_TimeSpanParser</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Humanizer.Core" Version="2.14.1"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,69 @@
using Humanizer;
using Humanizer.Localisation;
Console.WriteLine(Parse("2y").Humanize(10, true, minUnit: TimeUnit.Second, maxUnit: TimeUnit.Year));
Console.WriteLine(Parse("2m").Humanize(10, true, minUnit: TimeUnit.Second, maxUnit: TimeUnit.Year));
Console.WriteLine(Parse("2mo").Humanize(10, true, minUnit: TimeUnit.Second, maxUnit: TimeUnit.Year));
Console.WriteLine(Parse("1y2mo3m").Humanize(10, true, minUnit: TimeUnit.Second, maxUnit: TimeUnit.Year));
Console.WriteLine(Parse("3d").Humanize(10, true, minUnit: TimeUnit.Second, maxUnit: TimeUnit.Year));
Console.WriteLine(Parse("1y1mo1w1d1h1m1s").Humanize(10, true, minUnit: TimeUnit.Second, maxUnit: TimeUnit.Year));
return;
static TimeSpan Parse(string value)
{
TimeSpan result = TimeSpan.Zero;
var unitValue = 0;
for (var index = 0; index < value.Length; index++)
{
char current = value[index];
switch (current)
{
case var digitChar when char.IsDigit(digitChar):
var digit = (int)char.GetNumericValue(digitChar);
unitValue = unitValue * 10 + digit;
break;
case 'y':
result += TimeSpan.FromDays(unitValue * 365);
unitValue = 0;
break;
case 'm':
if (index < value.Length - 1 && value[index + 1] == 'o')
{
index++;
result += TimeSpan.FromDays(unitValue * 30);
}
else
{
result += TimeSpan.FromMinutes(unitValue);
}
unitValue = 0;
break;
case 'w':
result += TimeSpan.FromDays(unitValue * 7);
unitValue = 0;
break;
case 'd':
result += TimeSpan.FromDays(unitValue);
unitValue = 0;
break;
case 'h':
result += TimeSpan.FromHours(unitValue);
unitValue = 0;
break;
case 's':
result += TimeSpan.FromSeconds(unitValue);
unitValue = 0;
break;
}
}
return result;
}

View File

@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>E010_ThreadTest</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,20 @@
using System.Timers;
using Timer = System.Timers.Timer;
var timer = new Timer
{
Interval = 1000,
Enabled = true
};
timer.Elapsed += TimerOnElapsed;
Console.WriteLine($"Calling start in thread {Environment.CurrentManagedThreadId}");
timer.Start();
Console.ReadLine();
static void TimerOnElapsed(object? sender, ElapsedEventArgs e)
{
(sender as Timer)?.Stop();
Console.WriteLine($"Elapsed raised in thread {Environment.CurrentManagedThreadId}");
}

View File

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>E011_SpacedIntBenchmarks</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,36 @@
using System.Text;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
BenchmarkRunner.Run<SpacedIntBenchmarks>();
[SimpleJob, MemoryDiagnoser(false)]
public class SpacedIntBenchmarks
{
private const int Value = 12345689;
[Benchmark]
[Arguments(Value)]
public string SelectWithConcat(int value)
{
return string.Concat(value.ToString().Select(digit => $"{digit} "));
}
[Benchmark]
[Arguments(Value)]
public string DivisionWithBuilder(int value)
{
var builder = new StringBuilder();
while (value > 0)
{
int digit = value - (value / 10 * 10);
builder.Insert(0, digit);
builder.Insert(1, ' ');
value /= 10;
}
return builder.ToString();
}
}

View File

@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>E012_SourceGeneratorDummy</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,53 @@
using System.Reflection;
using System.Text;
Type[] s_types = Type.EmptyTypes;
Init();
var source = new StringBuilder();
using var writer = new StringWriter(source);
foreach (Type type in s_types)
{
writer.WriteLine("// This file was generated by X10D.");
writer.WriteLine("// Do not edit it manually.");
writer.WriteLine();
writer.WriteLine("namespace X10D");
writer.WriteLine();
writer.WriteLine("public static partial class EnumerableExtensions");
writer.WriteLine("{");
writer.WriteLine(" /// <summary>");
writer.WriteLine($" /// Computes the product of a sequence of <see cref=\"{type.FullName}\" /> values.");
writer.WriteLine(" /// </summary>");
writer.WriteLine(
$" /// <param name=\"source\">The sequence of <see cref=\"{type.FullName}\" /> values that are used to calculate the product.</param>");
writer.WriteLine(" /// <returns>The product of the values in the sequence.</returns>");
if (type.GetCustomAttribute<CLSCompliantAttribute>() is { } compliant)
writer.WriteLine($" [CLSCompliant({compliant.IsCompliant.ToString().ToLower()})]");
writer.WriteLine($" public static {type.FullName} Product(this IEnumerable<{type.FullName}> source)");
writer.WriteLine(" {");
writer.WriteLine(" if (source is null)");
writer.WriteLine(" throw new ArgumentNullException(nameof(source));");
writer.WriteLine();
writer.WriteLine(" var result = 1m;");
writer.WriteLine();
writer.WriteLine(" foreach (var item in source)");
writer.WriteLine(" result *= item;");
writer.WriteLine();
writer.WriteLine(" return result;");
writer.WriteLine(" }");
writer.WriteLine("}");
}
return;
void Init()
{
s_types = new[]
{
typeof(int), typeof(uint)
};
}

View File

@ -0,0 +1,117 @@
using System.Text;
namespace E012_SourceGeneratorDummy;
/// <summary>
/// Represents a reader that can read a <see cref="StringBuilder" />.
/// </summary>
public class StringBuilderReader : TextReader
{
private readonly StringBuilder _stringBuilder;
private int _index;
/// <summary>
/// Initializes a new instance of the <see cref="StringBuilderReader" /> class.
/// </summary>
/// <param name="stringBuilder">The <see cref="StringBuilder" /> to wrap.</param>
/// <exception cref="ArgumentNullException"><paramref name="stringBuilder" /> is <see langword="null" />.</exception>
public StringBuilderReader(StringBuilder stringBuilder)
{
_stringBuilder = stringBuilder ?? throw new ArgumentNullException(nameof(stringBuilder));
}
/// <inheritdoc />
public override int Read()
{
if (_index >= _stringBuilder.Length)
return -1;
return _stringBuilder[_index++];
}
/// <inheritdoc />
public override int Read(char[] buffer, int index, int count)
{
if (buffer is null)
throw new ArgumentNullException(nameof(buffer));
if (index < 0)
throw new ArgumentOutOfRangeException(nameof(index));
if (count < 0)
throw new ArgumentOutOfRangeException(nameof(count));
if (buffer.Length - index < count)
throw new ArgumentException("The buffer is too small.", nameof(buffer));
if (_index >= _stringBuilder.Length)
return -1;
int length = Math.Min(_stringBuilder.Length - _index, count);
_stringBuilder.CopyTo(_index, buffer, index, length);
_index += length;
return length;
}
/// <inheritdoc />
public override int Read(Span<char> buffer)
{
int count = Math.Min(buffer.Length, _stringBuilder.Length - _index);
for (var index = 0; index < count; index++)
buffer[index] = _stringBuilder[index + _index];
_index += count;
return count;
}
/// <inheritdoc />
public override int ReadBlock(Span<char> buffer)
{
return Read(buffer);
}
/// <inheritdoc />
public override int Peek()
{
if (_index >= _stringBuilder.Length)
return -1;
return _stringBuilder[_index];
}
/// <inheritdoc />
public override int ReadBlock(char[] buffer, int index, int count)
{
if (_index >= _stringBuilder.Length)
return -1;
int length = Math.Min(count, _stringBuilder.Length - _index);
_stringBuilder.CopyTo(_index, buffer, index, length);
_index += length;
return length;
}
/// <inheritdoc />
public override string? ReadLine()
{
if (_index >= _stringBuilder.Length)
return null;
int start = _index;
while (_index < _stringBuilder.Length && _stringBuilder[_index] != '\n')
_index++;
if (_index < _stringBuilder.Length)
_index++;
return _stringBuilder.ToString(start, _index - start - 1);
}
/// <inheritdoc />
public override string ReadToEnd()
{
return _stringBuilder.ToString();
}
/// <inheritdoc />
public override void Close()
{
_index = _stringBuilder.Length;
}
}

View File

@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>E013_ServerClient</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,66 @@
using System.Net;
using System.Net.Sockets;
using System.Security.Cryptography;
using System.Text;
new Thread(ServerWorker).Start();
new Thread(ClientWorker).Start();
return;
static void ClientWorker()
{
using var socket = new Socket(SocketType.Stream, ProtocolType.Tcp);
socket.Connect(new IPEndPoint(IPAddress.Loopback, 1234));
using var stream = new NetworkStream(socket);
// read public key from server
using var reader = new BinaryReader(stream);
using var writer = new BinaryWriter(stream);
using var rsa = new RSACryptoServiceProvider(2048);
rsa.ImportParameters(new RSAParameters
{
Modulus = reader.ReadBytes(reader.ReadInt32()),
Exponent = reader.ReadBytes(reader.ReadInt32())
});
while (Console.ReadLine() is { } line)
{
// encrypt line and send to server
byte[] encrypted = rsa.Encrypt(Encoding.UTF8.GetBytes(line), RSAEncryptionPadding.OaepSHA1);
writer.Write(encrypted.Length);
writer.Write(encrypted);
}
}
static void ServerWorker()
{
using var socket = new Socket(SocketType.Stream, ProtocolType.Tcp);
socket.Bind(new IPEndPoint(IPAddress.Any, 1234));
socket.Listen(1);
// generate RSA key pair
using var rsa = new RSACryptoServiceProvider(2048);
RSAParameters publicKey = rsa.ExportParameters(false);
// accept client socket
using Socket client = socket.Accept();
using var stream = new NetworkStream(client);
// write public key
using var writer = new BinaryWriter(stream);
writer.Write(publicKey.Modulus!.Length);
writer.Write(publicKey.Modulus);
writer.Write(publicKey.Exponent!.Length);
writer.Write(publicKey.Exponent);
while (true)
{
// read encrypted line from client
using var reader = new BinaryReader(new NetworkStream(client));
int length = reader.ReadInt32();
byte[] encrypted = reader.ReadBytes(length);
byte[] decrypted = rsa.Decrypt(encrypted, RSAEncryptionPadding.OaepSHA1);
Console.WriteLine($"Client sent: {Encoding.UTF8.GetString(decrypted)}");
}
}

View File

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>E014_RemoveAllBenchmarks</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.12"/>
</ItemGroup>
</Project>

View File

@ -0,0 +1,43 @@
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
BenchmarkRunner.Run<RemoveAllBenchmarks>();