From e965b22304040fa54ceb76d1aecb918ee502f5a5 Mon Sep 17 00:00:00 2001 From: Ogoun Date: Wed, 1 May 2024 16:58:25 +0300 Subject: [PATCH] Warning fixes --- .../Models/TestSerializableDTO.cs | 5 + .../ZeroLevel.UnitTests/TokenEncryptorTest.cs | 5 + ZeroLevel.ML/ImageMetainfo.cs | 2 +- ZeroLevel.ML/ZeroLevel.ML.csproj | 3 + ZeroLevel.MsSql/ZeroLevel.MsSql.csproj | 24 +- .../ZeroLevel.Sleopok.Engine.csproj | 18 +- ZeroLevel/DataStructures/SparseMatrix.cs | 2 +- ZeroLevel/Models/ZeroServiceInfo.cs | 4 +- ZeroLevel/Services/BaseZeroService.cs | 2 +- ZeroLevel/Services/Bootstrap.cs | 18 +- ZeroLevel/Services/Cache/LRUCache.cs | 2 +- ZeroLevel/Services/Cache/TimerCachee.cs | 6 +- ZeroLevel/Services/Collections/Capacitor.cs | 2 +- .../Services/Collections/ConcurrentHashSet.cs | 28 +- .../Services/Collections/EverythingStorage.cs | 4 +- .../Services/Collections/FastBitArray.cs | 22 +- .../Services/Collections/FixSizeQueue.cs | 12 +- .../Services/Collections/IFixSizeQueue.cs | 2 +- .../KeyListValueTransactCollection.cs | 2 +- .../Collections/KeyValueTransactCollection.cs | 6 +- .../Collections/RoundRobinCollection.cs | 2 +- .../Services/Collections/ZPriorityQueue.cs | 26 +- .../Services/Config/BaseConfiguration.cs | 25 +- .../Services/Config/BaseConfigurationSet.cs | 17 +- .../Config/ConfigRecordParseAttribute.cs | 2 +- ZeroLevel/Services/Config/Configuration.cs | 8 +- .../Implementation/AppWebConfigReader.cs | 10 +- .../Implementation/CommandLineReader.cs | 2 +- .../Config/Implementation/IniFileReader.cs | 4 +- .../DOM/DSL/Contexts/TElementContext.cs | 4 +- .../DOM/DSL/Contexts/TFunctionContext.cs | 6 +- .../DOM/DSL/Contexts/TPropertyContext.cs | 4 +- .../Services/DOM/DSL/Contexts/TRootContext.cs | 4 +- .../Services/DOM/DSL/Model/TContentElement.cs | 14 +- .../Services/DOM/DSL/Model/TEnvironment.cs | 8 +- .../Services/DOM/DSL/Model/TFlowRules.cs | 4 +- .../DOM/DSL/Services/PlainTextTableBuilder.cs | 4 +- .../Services/DOM/DSL/Services/TContainer.cs | 70 +- .../DOM/DSL/Services/TContainerFactory.cs | 2 +- .../DSL/Services/TContentToStringConverter.cs | 98 +-- .../Services/DOM/DSL/Services/TRender.cs | 12 +- ZeroLevel/Services/DOM/DSL/TEngine.cs | 4 +- .../Services/DOM/DSL/Tokens/TElementToken.cs | 4 +- .../Services/DOM/DSL/Tokens/TFunctionToken.cs | 4 +- .../Services/DOM/DSL/Tokens/TPropertyToken.cs | 4 +- .../Services/DOM/DSL/Tokens/TSystemToken.cs | 2 +- ZeroLevel/Services/DOM/DSL/Tokens/TToken.cs | 12 +- ZeroLevel/Services/DOM/Model/AttachContent.cs | 2 +- ZeroLevel/Services/DOM/Model/Category.cs | 6 +- ZeroLevel/Services/DOM/Model/Header.cs | 4 +- .../Services/DOM/Services/ContentBuilder.cs | 20 +- .../DOM/Services/DocumentContentReader.cs | 16 +- .../Services/DependencyInjection/Container.cs | 56 +- .../DependencyInjection/ContainerFactory.cs | 2 +- .../Contracts/IContainerRegister.cs | 32 +- .../Internal/ConstructorMetadata.cs | 14 +- .../DependencyInjection/ParameterAttribute.cs | 4 +- .../DependencyInjection/ResolveAttribute.cs | 4 +- ZeroLevel/Services/Encryption/AesEncryptor.cs | 14 +- .../Services/Extensions/ArrayExtensions.cs | 4 +- .../Services/Extensions/BitArrayExtensions.cs | 2 +- .../CollectionComparsionExtensions.cs | 34 +- ZeroLevel/Services/Extensions/EncodingEx.cs | 2 +- .../Services/Extensions/EndpointExtensions.cs | 14 +- .../Services/Extensions/EnumExtensions.cs | 8 +- .../Extensions/EnumerableExtensions.cs | 4 +- ZeroLevel/Services/Extensions/FPCommon.cs | 12 +- .../Services/Extensions/LinqExtension.cs | 10 +- ZeroLevel/Services/Extensions/Monades.cs | 10 +- .../Services/Extensions/TaskExtension.cs | 8 +- .../Services/Extensions/TypeExtensions.cs | 8 +- ZeroLevel/Services/Fiber.cs | 16 +- .../Services/FileSystem/BigFileParser.cs | 8 +- ZeroLevel/Services/FileSystem/FSUtils.cs | 18 +- ZeroLevel/Services/FileSystem/FileArchive.cs | 20 +- .../FileSystem/PeriodicFileSystemWatcher.cs | 18 +- .../Services/HashFunctions/StringHash.cs | 2 +- ZeroLevel/Services/IL.cs | 6 +- .../Services/Invokation/InvokeWrapper.cs | 37 +- .../Implementation/EncryptedFileLog.cs | 10 +- .../Logging/Implementation/TextFileLogger.cs | 28 +- ZeroLevel/Services/Logging/Log.cs | 4 +- ZeroLevel/Services/Logging/LogRouterr.cs | 6 +- ZeroLevel/Services/Mathemathics/Histogram.cs | 12 +- ZeroLevel/Services/Memory/MMFViewAccessor.cs | 2 +- .../Services/Memory/StreamVewAccessor.cs | 2 +- .../MemoryPools/Collections/Linq/Aggregate.cs | 14 +- .../Collections/Linq/Append.Enumerable.cs | 10 +- .../MemoryPools/Collections/Linq/Average.cs | 80 +-- .../Collections/Linq/Cast.Enumerable.cs | 8 +- .../Collections/Linq/Concat.Enumerable.cs | 12 +- .../Collections/Linq/Distinct.Enumerable.cs | 6 +- .../Collections/Linq/Except.Enumerable.cs | 16 +- .../Collections/Linq/FirstFirstOrDefault.cs | 24 +- .../Collections/Linq/GenericEnumerable.cs | 4 +- .../Linq/GenericPoolingEnumerator.cs | 8 +- .../Collections/Linq/GroupBy.Enumerable.cs | 24 +- .../Linq/GroupBy.ResultEnumerable.cs | 22 +- .../MemoryPools/Collections/Linq/GroupBy.cs | 6 +- .../Collections/Linq/Intersect.Enumerable.cs | 20 +- .../MemoryPools/Collections/Linq/Join.cs | 22 +- .../Collections/Linq/LastLastOrDefault.cs | 18 +- .../MemoryPools/Collections/Linq/MinMax.cs | 80 +-- .../Collections/Linq/OfType.Enumerable.cs | 8 +- .../Collections/Linq/Prepend.Enumerable.cs | 10 +- .../Collections/Linq/Reverse.Enumerable.cs | 14 +- .../Collections/Linq/Select.Enumerable.cs | 10 +- .../Linq/Select.WithContextEnumerable.cs | 14 +- .../Linq/SelectMany.ExprEnumerable.cs | 16 +- .../SelectMany.ExprWithContextEnumerable.cs | 18 +- .../Collections/Linq/SimpleExpressions.cs | 240 +++---- .../Collections/Linq/SingleSingleOrDefault.cs | 18 +- .../Linq/SkipTake.ExprPoolingEnumerable.cs | 10 +- .../MemoryPools/Collections/Linq/Sum.cs | 30 +- .../Collections/Linq/Union.Enumerable.cs | 12 +- .../Collections/Linq/Where.Enumerable.cs | 10 +- .../Linq/Where.WithContextEnumerable.cs | 10 +- .../Collections/Linq/Zip.Enumerable.cs | 12 +- .../AsSingleQueryList.EnumerableRef.cs | 8 +- .../AsSingleQueryList.EnumerableVal.cs | 10 +- .../Specialized/IdealHashDictionary.cs | 2 +- .../Collections/Specialized/LocalList.cs | 32 +- .../Collections/Specialized/LongLocalList.cs | 2 +- .../PoolingDictionary.KeysCollection.cs | 4 +- .../PoolingDictionary.ValuesCollection.cs | 4 +- .../Specialized/PoolingDictionary.cs | 124 ++-- .../Specialized/PoolingListBase.cs | 616 +++++++++--------- .../Collections/Specialized/PoolingNode.cs | 2 +- .../Specialized/PoolingNodeBase.cs | 4 +- .../Specialized/PoolingNodeCanon.cs | 2 +- .../Collections/Specialized/PoolingQueue.cs | 12 +- .../Specialized/PoolingStackBase.cs | 10 +- .../Services/MemoryPools/DefaultObjectPool.cs | 10 +- .../MemoryPools/DefaultObjectPoolProvider.cs | 2 +- .../MemoryPools/DisposableObjectPool.cs | 8 +- ZeroLevel/Services/MemoryPools/JetPool.cs | 2 +- .../Memory/CountdownMemoryOwner.cs | 6 +- .../Services/MemoryPools/Memory/JetStack.cs | 6 +- ZeroLevel/Services/MemoryPools/ObjectPool.cs | 2 +- ZeroLevel/Services/MemoryPools/Pool.cs | 3 +- .../Network/Contracts/ISocketClient.cs | 2 +- ZeroLevel/Services/Network/ExClient.cs | 2 +- ZeroLevel/Services/Network/Exchange.cs | 36 +- .../Network/Extensions/ExchangeExtension.cs | 16 +- .../Network/FileTransfer/FileSender.cs | 8 +- .../Network/FileTransfer/FileWriter.cs | 2 +- ZeroLevel/Services/Network/Model/Frame.cs | 10 +- .../Network/Model/ServiceEndpointInfo.cs | 4 +- .../Network/Model/ServiceRegisterInfo.cs | 4 +- .../Services/Network/Proxies/ProxyBalancer.cs | 2 +- .../Services/Network/Proxies/ProxyBinding.cs | 4 +- ZeroLevel/Services/Network/SocketClient.cs | 6 +- ZeroLevel/Services/Network/SocketServer.cs | 2 +- .../Network/Utils/ExClientServerCachee.cs | 8 +- .../Services/Network/Utils/FrameParser.cs | 4 +- ZeroLevel/Services/Network/Utils/NetUtils.cs | 20 +- .../Services/Network/Utils/RequestBuffer.cs | 2 +- ZeroLevel/Services/Network/Utils/Router.cs | 24 +- .../Network/Utils/ServiceRouteStorage.cs | 32 +- .../Services/ObjectMapping/MapFieldInfo.cs | 12 +- .../Services/ObjectMapping/TypeMapper.cs | 23 +- .../KeysIndex/StorePartitionSparseIndex.cs | 4 +- .../Partition/BasePartition.cs | 10 +- .../CompactKeyStorePartitionBuilder.cs | 6 +- .../Partition/StoreMergePartitionAccessor.cs | 11 +- .../Partition/StorePartitionAccessor.cs | 24 +- .../Partition/StorePartitionBuilder.cs | 8 +- .../PhisicalFileAccessorCachee.cs | 8 +- ZeroLevel/Services/PartitionStorage/Store.cs | 16 +- ZeroLevel/Services/Pools/ObjectPool.cs | 4 +- .../Builder/MemoryStorageQueryBuilder.cs | 10 +- ZeroLevel/Services/Queries/Query.cs | 2 +- .../Services/Queries/Storage/MemoryStorage.cs | 6 +- .../Reflection/EntryAssebmlyAttribute.cs | 2 +- .../Services/Reflection/StackTraceReader.cs | 2 +- .../Reflection/StringToTypeConverter.cs | 2 +- .../Reflection/TypeGetterSetterBuilder.cs | 16 +- ZeroLevel/Services/Reflection/TypeHelpers.cs | 17 +- .../Services/Semantic/Contracts/LexToken.cs | 8 +- .../Services/Semantic/Helpers/BagOfTerms.cs | 10 +- ZeroLevel/Services/Semantic/LexProvider.cs | 4 +- .../Services/Semantic/LexProviderFactory.cs | 2 +- .../Services/Semantic/Search/BoyerMoore.cs | 16 +- .../Semantic/Search/KnuthMorrisPratt.cs | 16 +- .../Services/Semantic/Search/RabinKarp.cs | 16 +- .../Semantic/Snowball/DanishStemmer.cs | 82 +-- .../Semantic/Snowball/DutchStemmer.cs | 64 +- .../Semantic/Snowball/EnglishStemmer.cs | 220 +++---- .../Semantic/Snowball/FinnishStemmer.cs | 168 ++--- .../Semantic/Snowball/FrenchStemmer.cs | 288 ++++---- .../Semantic/Snowball/GermanStemmer.cs | Bin 23312 -> 23316 bytes .../Semantic/Snowball/HungarianStemmer.cs | 364 +++++------ .../Semantic/Snowball/ItalianStemmer.cs | 394 +++++------ .../Semantic/Snowball/NorwegianStemmer.cs | 84 +-- .../Semantic/Snowball/PortugalStemmer.cs | 384 +++++------ .../Semantic/Snowball/RomanianStemmer.cs | 452 ++++++------- .../Semantic/Snowball/RussianStemmer.cs | 266 ++++---- .../Semantic/Snowball/SpanishStemmer.cs | 404 ++++++------ .../Semantic/Snowball/StemmerOperations.cs | Bin 86684 -> 86688 bytes ZeroLevel/Services/Semantic/Trie.cs | 30 +- .../Serialization/MemoryStreamReader.cs | 46 +- .../Serialization/MemoryStreamWriter.cs | 68 +- .../Serialization/MessageSerializer.cs | 50 +- .../Serialization/PrimitiveTypeSerializer.cs | 2 +- .../Services/Shedulling/DateTimeSheduller.cs | 36 +- .../Services/Shedulling/ExpiredObject.cs | 2 +- ZeroLevel/Services/Shedulling/ISheduller.cs | 2 +- ZeroLevel/Services/Shedulling/Sheduller.cs | 8 +- .../Services/Shedulling/ShedullerImpl.cs | 4 +- ...cificationConstructorParametersResolver.cs | 8 +- .../Specification/CurrySpecification.cs | 2 +- .../Specification/ExpressionSpecification.cs | 2 +- .../Specification/PredicateBuilder.cs | 5 +- .../Services/SpecificationBuilder.cs | 2 +- .../Text/PlainTextTables/TextTableData.cs | 4 +- .../Text/PlainTextTables/TextTableRender.cs | 2 +- ZeroLevel/Services/Text/SuffixAutomata.cs | 6 +- ZeroLevel/Services/Trees/Tree.cs | 2 +- ZeroLevel/Services/Trees/TreeNode.cs | 2 +- ZeroLevel/Services/Trees/TreesVisitor.cs | 18 +- ZeroLevel/Services/Utils/Multiprocessor.cs | 2 +- ZeroLevel/Services/Web/HtmlUtility.cs | 20 +- ZeroLevel/Services/Web/UrlBuilder.cs | 2 +- ZeroLevel/Services/Web/UrlUtility.cs | 30 +- .../Services/Windows/WindowsLibraryLoader.cs | 4 +- ZeroLevel/ZeroLevel.csproj | 10 +- ZeroLevel/lz.ico | Bin 82239 -> 0 bytes 227 files changed, 3350 insertions(+), 3313 deletions(-) delete mode 100644 ZeroLevel/lz.ico diff --git a/Tests/ZeroLevel.UnitTests/Models/TestSerializableDTO.cs b/Tests/ZeroLevel.UnitTests/Models/TestSerializableDTO.cs index 6c53e6c..0d2d9ca 100644 --- a/Tests/ZeroLevel.UnitTests/Models/TestSerializableDTO.cs +++ b/Tests/ZeroLevel.UnitTests/Models/TestSerializableDTO.cs @@ -37,5 +37,10 @@ namespace ZeroLevel.UnitTests.Models writer.WriteString(this.Title); writer.WriteLong(this.Timestamp); } + + public override int GetHashCode() + { + return Id.GetHashCode() ^ (Title?.GetHashCode() ?? 0) ^ Timestamp.GetHashCode(); + } } } diff --git a/Tests/ZeroLevel.UnitTests/TokenEncryptorTest.cs b/Tests/ZeroLevel.UnitTests/TokenEncryptorTest.cs index 15ef310..c4585ab 100644 --- a/Tests/ZeroLevel.UnitTests/TokenEncryptorTest.cs +++ b/Tests/ZeroLevel.UnitTests/TokenEncryptorTest.cs @@ -37,6 +37,11 @@ namespace ZeroLevel.UnitTests writer.WriteString(this.Login); writer.WriteString(this.Name); } + + public override int GetHashCode() + { + return (Login?.GetHashCode() ?? 0) ^ (Name?.GetHashCode() ?? 0); + } } [Fact] diff --git a/ZeroLevel.ML/ImageMetainfo.cs b/ZeroLevel.ML/ImageMetainfo.cs index 260cc83..270706f 100644 --- a/ZeroLevel.ML/ImageMetainfo.cs +++ b/ZeroLevel.ML/ImageMetainfo.cs @@ -104,7 +104,7 @@ p2 pixel units = -p2 focal units / focal length public sealed class ImageMetainfo { - private CameraMath _camera = null; + private CameraMath _camera = null!; public CameraMath CreateCamera() { if (_camera == null) diff --git a/ZeroLevel.ML/ZeroLevel.ML.csproj b/ZeroLevel.ML/ZeroLevel.ML.csproj index ed005df..8999d1e 100644 --- a/ZeroLevel.ML/ZeroLevel.ML.csproj +++ b/ZeroLevel.ML/ZeroLevel.ML.csproj @@ -5,6 +5,9 @@ netstandard2.1 enable True + $(AssemblyVersion) + 4.0.0.0 + $(AssemblyVersion) diff --git a/ZeroLevel.MsSql/ZeroLevel.MsSql.csproj b/ZeroLevel.MsSql/ZeroLevel.MsSql.csproj index 42b7706..d6714ca 100644 --- a/ZeroLevel.MsSql/ZeroLevel.MsSql.csproj +++ b/ZeroLevel.MsSql/ZeroLevel.MsSql.csproj @@ -1,16 +1,20 @@  - - netstandard2.1 - enable - + + latest + netstandard2.1 + enable + $(AssemblyVersion) + 4.0.0.0 + $(AssemblyVersion) + - - - + + + - - - + + + diff --git a/ZeroLevel.Sleopok.Engine/ZeroLevel.Sleopok.Engine.csproj b/ZeroLevel.Sleopok.Engine/ZeroLevel.Sleopok.Engine.csproj index 20c1104..e8df569 100644 --- a/ZeroLevel.Sleopok.Engine/ZeroLevel.Sleopok.Engine.csproj +++ b/ZeroLevel.Sleopok.Engine/ZeroLevel.Sleopok.Engine.csproj @@ -1,12 +1,16 @@  - - netstandard2.1 - enable - + + latest + netstandard2.1 + enable + $(AssemblyVersion) + 4.0.0.0 + $(AssemblyVersion) + - - - + + + diff --git a/ZeroLevel/DataStructures/SparseMatrix.cs b/ZeroLevel/DataStructures/SparseMatrix.cs index 4dd46fb..ad5aa77 100644 --- a/ZeroLevel/DataStructures/SparseMatrix.cs +++ b/ZeroLevel/DataStructures/SparseMatrix.cs @@ -56,7 +56,7 @@ namespace ZeroLevel.DataStructures } //If there is no item on the given position return defaault value - return default(T); + return default(T)!; } set { diff --git a/ZeroLevel/Models/ZeroServiceInfo.cs b/ZeroLevel/Models/ZeroServiceInfo.cs index f6de918..eaae7f0 100644 --- a/ZeroLevel/Models/ZeroServiceInfo.cs +++ b/ZeroLevel/Models/ZeroServiceInfo.cs @@ -42,7 +42,7 @@ namespace ZeroLevel public bool Equals(ZeroServiceInfo other) { - if (other == null) return false; + if (other == null!) return false; if (object.ReferenceEquals(this, other)) return true; if (string.Compare(this.Name, other.Name, true) != 0) return false; if (string.Compare(this.ServiceKey, other.ServiceKey, true) != 0) return false; @@ -54,7 +54,7 @@ namespace ZeroLevel public override bool Equals(object obj) { - return this.Equals(obj as ZeroServiceInfo); + return this.Equals((obj as ZeroServiceInfo)!); } public override int GetHashCode() diff --git a/ZeroLevel/Services/BaseZeroService.cs b/ZeroLevel/Services/BaseZeroService.cs index c46e014..d549b4f 100644 --- a/ZeroLevel/Services/BaseZeroService.cs +++ b/ZeroLevel/Services/BaseZeroService.cs @@ -127,7 +127,7 @@ namespace ZeroLevel.Services.Applications } } } - return default(T); + return default(T)!; } #endregion Config diff --git a/ZeroLevel/Services/Bootstrap.cs b/ZeroLevel/Services/Bootstrap.cs index f10504a..413520c 100644 --- a/ZeroLevel/Services/Bootstrap.cs +++ b/ZeroLevel/Services/Bootstrap.cs @@ -29,7 +29,7 @@ namespace ZeroLevel public BootstrapFluent(IZeroService service) { - if (service == null) + if (service == null!) { throw new ArgumentNullException(nameof(service)); } @@ -56,7 +56,7 @@ namespace ZeroLevel catch (Exception ex) { Log.Error(ex, $"[Bootstrap] Service {_service?.Name} run error"); - return null; + return null!; } return this; } @@ -108,7 +108,7 @@ namespace ZeroLevel { Log.Info($"[Bootstrap] Resolve assembly '{args.Name}' {args.Name}"); string name = args.Name.Split(',')[0]; - if (name.EndsWith(".resources")) return null; + if (name.EndsWith(".resources")) return null!; foreach (string file in Directory. GetFiles(Path.Combine(Configuration.BaseDirectory), "*.dll", SearchOption.TopDirectoryOnly)) { @@ -123,7 +123,7 @@ namespace ZeroLevel { Log.Error(ex, $"[Bootstrap] Fault load assembly '{args.Name}'"); } - return null; + return null!; } public static BootstrapFluent Startup(string[] args, @@ -155,13 +155,13 @@ namespace ZeroLevel IZeroService service = null!; IConfigurationSet config = Configuration.DefaultSet; config.CreateSection("commandline", Configuration.ReadFromCommandLine(args)); - if (configurationSet != null) + if (configurationSet != null!) { config.Merge(configurationSet); } Log.CreateLoggingFromConfiguration(Configuration.DefaultSet); - if (preStartConfiguration != null) + if (preStartConfiguration != null!) { try { @@ -185,20 +185,20 @@ namespace ZeroLevel { Log.SystemError(ex, "[Bootstrap] Service start canceled, service constructor call fault"); } - if (postStartConfiguration != null) + if (postStartConfiguration != null!) { try { if (postStartConfiguration() == false) { Log.SystemInfo("[Bootstrap] Service start canceled, because custom postconfig return false"); - return null; + return null!; } } catch (Exception ex) { Log.SystemError(ex, "[Bootstrap] Service start canceled, postconfig faulted"); - return null; + return null!; } } return service; diff --git a/ZeroLevel/Services/Cache/LRUCache.cs b/ZeroLevel/Services/Cache/LRUCache.cs index 24db5d9..2f5a814 100644 --- a/ZeroLevel/Services/Cache/LRUCache.cs +++ b/ZeroLevel/Services/Cache/LRUCache.cs @@ -58,7 +58,7 @@ namespace ZeroLevel.Services.Cache } } - value = default(TValue); + value = default(TValue)!; return false; } diff --git a/ZeroLevel/Services/Cache/TimerCachee.cs b/ZeroLevel/Services/Cache/TimerCachee.cs index 2f3fdfa..b5c5543 100644 --- a/ZeroLevel/Services/Cache/TimerCachee.cs +++ b/ZeroLevel/Services/Cache/TimerCachee.cs @@ -62,7 +62,7 @@ namespace ZeroLevel.Services.Cache { try { - if (_onDisposeAction != null) + if (_onDisposeAction != null!) { _onDisposeAction.Invoke(v.Value); } @@ -92,7 +92,7 @@ namespace ZeroLevel.Services.Cache { try { - if (_onDisposeAction != null) + if (_onDisposeAction != null!) { _onDisposeAction.Invoke(_cachee[key].Value); } @@ -114,7 +114,7 @@ namespace ZeroLevel.Services.Cache { try { - if (_onDisposeAction != null) + if (_onDisposeAction != null!) { _onDisposeAction.Invoke(pair.Value.Value); } diff --git a/ZeroLevel/Services/Collections/Capacitor.cs b/ZeroLevel/Services/Collections/Capacitor.cs index 4c11fb5..ec625c8 100644 --- a/ZeroLevel/Services/Collections/Capacitor.cs +++ b/ZeroLevel/Services/Collections/Capacitor.cs @@ -18,7 +18,7 @@ namespace ZeroLevel.Services.Collections public Capacitor(int dischargeValue, Action dischargeAction) { if (dischargeValue < 1) dischargeValue = 16; - if (dischargeAction == null) throw new ArgumentNullException(nameof(dischargeAction)); + if (dischargeAction == null!) throw new ArgumentNullException(nameof(dischargeAction)); _buffer = new T[dischargeValue]; _dischargeAction = dischargeAction; } diff --git a/ZeroLevel/Services/Collections/ConcurrentHashSet.cs b/ZeroLevel/Services/Collections/ConcurrentHashSet.cs index e8635cd..418f059 100644 --- a/ZeroLevel/Services/Collections/ConcurrentHashSet.cs +++ b/ZeroLevel/Services/Collections/ConcurrentHashSet.cs @@ -187,7 +187,7 @@ namespace ZeroLevel.Collections public ConcurrentHashSet(IEnumerable collection, IEqualityComparer comparer) : this(comparer) { - if (collection == null) throw new ArgumentNullException(nameof(collection)); + if (collection == null!) throw new ArgumentNullException(nameof(collection)); InitializeFromCollection(collection); } @@ -214,7 +214,7 @@ namespace ZeroLevel.Collections public ConcurrentHashSet(int concurrencyLevel, IEnumerable collection, IEqualityComparer comparer) : this(concurrencyLevel, DefaultCapacity, false, comparer) { - if (collection == null) throw new ArgumentNullException(nameof(collection)); + if (collection == null!) throw new ArgumentNullException(nameof(collection)); InitializeFromCollection(collection); } @@ -337,7 +337,7 @@ namespace ZeroLevel.Collections // The Volatile.Read ensures that the load of the fields of 'n' doesn't move before the load from buckets[i]. var current = Volatile.Read(ref tables.Buckets[bucketNo]); - while (current != null) + while (current != null!) { if (hashcode == current.Hashcode && _comparer.Equals(current.Item, equalValue)) { @@ -348,7 +348,7 @@ namespace ZeroLevel.Collections current = current.Next; } - actualValue = default; + actualValue = default!; return false; } @@ -376,13 +376,13 @@ namespace ZeroLevel.Collections } Node previous = null!; - for (var current = tables.Buckets[bucketNo]; current != null; current = current.Next) + for (var current = tables.Buckets[bucketNo]; current != null!; current = current.Next) { Debug.Assert((previous == null && current == tables.Buckets[bucketNo]) || previous!.Next == current); if (hashcode == current.Hashcode && _comparer.Equals(current.Item, item)) { - if (previous == null) + if (previous == null!) { Volatile.Write(ref tables.Buckets[bucketNo], current.Next); } @@ -434,7 +434,7 @@ namespace ZeroLevel.Collections // Provides a manually-implemented version of (approximately) this iterator: // Node?[] buckets = _tables.Buckets; // for (int i = 0; i < buckets.Length; i++) - // for (Node? current = Volatile.Read(ref buckets[i]); current != null; current = current.Next) + // for (Node? current = Volatile.Read(ref buckets[i]); current != null!; current = current.Next) // yield return new current.Item; private readonly ConcurrentHashSet _set; @@ -502,7 +502,7 @@ namespace ZeroLevel.Collections case StateOuterloop: Node[] buckets = _buckets; - Debug.Assert(buckets != null); + Debug.Assert(buckets != null!); int i = ++_i; if ((uint)i < (uint)buckets!.Length) @@ -517,7 +517,7 @@ namespace ZeroLevel.Collections case StateInnerLoop: Node node = _node; - if (node != null) + if (node != null!) { Current = node.Item; _node = node.Next; @@ -538,7 +538,7 @@ namespace ZeroLevel.Collections void ICollection.CopyTo(T[] array, int arrayIndex) { - if (array == null) throw new ArgumentNullException(nameof(array)); + if (array == null!) throw new ArgumentNullException(nameof(array)); if (arrayIndex < 0) throw new ArgumentOutOfRangeException(nameof(arrayIndex)); var locksAcquired = 0; @@ -606,8 +606,8 @@ namespace ZeroLevel.Collections } // Try to find this item in the bucket - Node previous = null; - for (var current = tables.Buckets[bucketNo]; current != null; current = current.Next) + Node previous = null!; + for (var current = tables.Buckets[bucketNo]; current != null!; current = current.Next) { Debug.Assert(previous == null && current == tables.Buckets[bucketNo] || previous!.Next == current); if (hashcode == current.Hashcode && _comparer.Equals(current.Item, item)) @@ -791,7 +791,7 @@ namespace ZeroLevel.Collections for (var i = 0; i < tables.Buckets.Length; i++) { var current = tables.Buckets[i]; - while (current != null) + while (current != null!) { var next = current.Next; GetBucketAndLockNo(current.Hashcode, out int newBucketNo, out int newLockNo, newBuckets.Length, newLocks.Length); @@ -868,7 +868,7 @@ namespace ZeroLevel.Collections var buckets = _tables.Buckets; for (var i = 0; i < buckets.Length; i++) { - for (var current = buckets[i]; current != null; current = current.Next) + for (var current = buckets[i]; current != null!; current = current.Next) { array[index] = current.Item; index++; //this should never flow, CopyToItems is only called when there's no overflow risk diff --git a/ZeroLevel/Services/Collections/EverythingStorage.cs b/ZeroLevel/Services/Collections/EverythingStorage.cs index a2c88bb..07805f5 100644 --- a/ZeroLevel/Services/Collections/EverythingStorage.cs +++ b/ZeroLevel/Services/Collections/EverythingStorage.cs @@ -59,14 +59,14 @@ namespace ZeroLevel.Services.Collections public void Insert(string key, T entity) { - _insert.Invoke(_instance, new object[] { key, entity }); + _insert.Invoke(_instance, new object[] { key, entity! }); } public void InsertOrUpdate(string key, T entity) { if ((bool)_containsKey.Invoke(_instance, key)) _remove.Invoke(_instance, key); - _insert.Invoke(_instance, new object[] { key, entity }); + _insert.Invoke(_instance, new object[] { key, entity! }); } public bool ContainsKey(string key) diff --git a/ZeroLevel/Services/Collections/FastBitArray.cs b/ZeroLevel/Services/Collections/FastBitArray.cs index 30fdc95..efbf569 100644 --- a/ZeroLevel/Services/Collections/FastBitArray.cs +++ b/ZeroLevel/Services/Collections/FastBitArray.cs @@ -62,7 +62,7 @@ namespace ZeroLevel.Collections =========================================================================*/ public FastBitArray(byte[] bytes) { - if (bytes == null) + if (bytes == null!) { throw new ArgumentNullException(nameof(bytes)); } @@ -135,7 +135,7 @@ namespace ZeroLevel.Collections private void SetValues(int[] values) { - if (values == null) + if (values == null!) { throw new ArgumentNullException(nameof(values)); } @@ -157,7 +157,7 @@ namespace ZeroLevel.Collections =========================================================================*/ public FastBitArray(FastBitArray bits) { - if (bits == null) + if (bits == null!) { throw new ArgumentNullException(nameof(bits)); } @@ -183,7 +183,7 @@ namespace ZeroLevel.Collections private void SetValues(bool[] values) { - if (values == null) + if (values == null!) { throw new ArgumentNullException(nameof(values)); } @@ -276,7 +276,7 @@ namespace ZeroLevel.Collections =========================================================================*/ public FastBitArray And(FastBitArray value) { - if (value == null) + if (value == null!) throw new ArgumentNullException(nameof(value)); if (Length != value.Length) throw new ArgumentException("The array lengths differ."); @@ -303,7 +303,7 @@ namespace ZeroLevel.Collections =========================================================================*/ public FastBitArray Or(FastBitArray value) { - if (value == null) + if (value == null!) throw new ArgumentNullException(nameof(value)); if (Length != value.Length) throw new ArgumentException("The array lengths differ"); @@ -385,7 +385,7 @@ namespace ZeroLevel.Collections =========================================================================*/ public FastBitArray Xor(FastBitArray value) { - if (value == null) + if (value == null!) throw new ArgumentNullException(nameof(value)); if (Length != value.Length) throw new ArgumentException("The array lengths differ"); @@ -465,7 +465,7 @@ namespace ZeroLevel.Collections // ICollection implementation public void CopyTo(Array array, int index) { - if (array == null) + if (array == null!) throw new ArgumentNullException(nameof(array)); if (index < 0) throw new ArgumentOutOfRangeException(nameof(index), "The index cannot be less than 0."); @@ -508,7 +508,7 @@ namespace ZeroLevel.Collections public Object Clone() { - Contract.Ensures(Contract.Result() != null); + Contract.Ensures(Contract.Result() != null!); Contract.Ensures(((FastBitArray)Contract.Result()).Length == this.Length); return new FastBitArray(this); } @@ -517,9 +517,9 @@ namespace ZeroLevel.Collections { get { - if (_syncRoot == null) + if (_syncRoot == null!) { - System.Threading.Interlocked.CompareExchange(ref _syncRoot, new Object(), null); + System.Threading.Interlocked.CompareExchange(ref _syncRoot!, new Object(), null!); } return _syncRoot; } diff --git a/ZeroLevel/Services/Collections/FixSizeQueue.cs b/ZeroLevel/Services/Collections/FixSizeQueue.cs index fb3a399..e528175 100644 --- a/ZeroLevel/Services/Collections/FixSizeQueue.cs +++ b/ZeroLevel/Services/Collections/FixSizeQueue.cs @@ -45,8 +45,8 @@ namespace ZeroLevel.Services.Collections public bool Equals(T x, T y) { - if (x == null && y == null) return true; - if (x == null || y == null) return false; + if (x == null && y == null!) return true; + if (x == null || y == null!) return false; if ((object)x == (object)y) return true; if (ReferenceEquals(x, y)) return true; return x.Equals(y); @@ -57,7 +57,7 @@ namespace ZeroLevel.Services.Collections lock (_accessLocker) { Func eq_func; - if (comparer == null) + if (comparer == null!) { eq_func = Equals; } @@ -94,13 +94,13 @@ namespace ZeroLevel.Services.Collections if (_count > 0) { t = _array[_startIndex]; - _array[_startIndex] = default(T); + _array[_startIndex] = default(T)!; _startIndex = (_startIndex + 1) % _array.Length; _count--; return true; } } - t = default(T); + t = default(T)!; return false; } @@ -112,7 +112,7 @@ namespace ZeroLevel.Services.Collections if (_count > 0) { ret = _array[_startIndex]; - _array[_startIndex] = default(T); + _array[_startIndex] = default(T)!; _startIndex = (_startIndex + 1) % _array.Length; _count--; return ret; diff --git a/ZeroLevel/Services/Collections/IFixSizeQueue.cs b/ZeroLevel/Services/Collections/IFixSizeQueue.cs index 6d84335..c8de152 100644 --- a/ZeroLevel/Services/Collections/IFixSizeQueue.cs +++ b/ZeroLevel/Services/Collections/IFixSizeQueue.cs @@ -14,6 +14,6 @@ namespace ZeroLevel.Services.Collections IEnumerable Dump(); - bool Contains(T item, IComparer comparer = null); + bool Contains(T item, IComparer comparer = null!); } } \ No newline at end of file diff --git a/ZeroLevel/Services/Collections/KeyListValueTransactCollection.cs b/ZeroLevel/Services/Collections/KeyListValueTransactCollection.cs index b43e348..71a9d6d 100644 --- a/ZeroLevel/Services/Collections/KeyListValueTransactCollection.cs +++ b/ZeroLevel/Services/Collections/KeyListValueTransactCollection.cs @@ -208,7 +208,7 @@ namespace ZeroLevel.Services.Collections { if (disposing) { - if (_collection != null) + if (_collection != null!) { _collection.Clear(); } diff --git a/ZeroLevel/Services/Collections/KeyValueTransactCollection.cs b/ZeroLevel/Services/Collections/KeyValueTransactCollection.cs index 924a740..623bd30 100644 --- a/ZeroLevel/Services/Collections/KeyValueTransactCollection.cs +++ b/ZeroLevel/Services/Collections/KeyValueTransactCollection.cs @@ -179,7 +179,7 @@ namespace ZeroLevel.Services.Collections } else { - if (!_collection[id].Equals(value)) + if (!_collection[id]!.Equals(value)) { if (false == _updatedRecords.ContainsKey(id)) { @@ -254,12 +254,12 @@ namespace ZeroLevel.Services.Collections { if (disposing) { - if (_collection != null) + if (_collection != null!) { foreach (TKey key in _collection.Keys) { var disposable = _collection[key] as IDisposable; - if (disposable != null) + if (disposable != null!) disposable.Dispose(); } _collection.Clear(); diff --git a/ZeroLevel/Services/Collections/RoundRobinCollection.cs b/ZeroLevel/Services/Collections/RoundRobinCollection.cs index 715ad30..164235e 100644 --- a/ZeroLevel/Services/Collections/RoundRobinCollection.cs +++ b/ZeroLevel/Services/Collections/RoundRobinCollection.cs @@ -147,7 +147,7 @@ namespace ZeroLevel.Services.Collections { get { - return _index == -1 ? default(T) : _collection[_index]; + return (_index == -1 ? default(T) : _collection[_index])!; } } diff --git a/ZeroLevel/Services/Collections/ZPriorityQueue.cs b/ZeroLevel/Services/Collections/ZPriorityQueue.cs index 446b4be..91786a5 100644 --- a/ZeroLevel/Services/Collections/ZPriorityQueue.cs +++ b/ZeroLevel/Services/Collections/ZPriorityQueue.cs @@ -18,15 +18,15 @@ namespace ZeroLevel.Services.Collections public class ZPriorityQueue : IPriorityQueue { - private sealed class PriorityQueueObject + private sealed class PriorityQueueObject { public readonly int Priority; - public readonly T Value; + public readonly T1 Value; - public PriorityQueueObject Next; + public PriorityQueueObject Next; - public PriorityQueueObject(T val, int priority) + public PriorityQueueObject(T1 val, int priority) { Value = val; Priority = priority; @@ -34,7 +34,7 @@ namespace ZeroLevel.Services.Collections } private readonly Func _handler; - private PriorityQueueObject _head = null; + private PriorityQueueObject _head = null!; private readonly object _rw_lock = new object(); private int _counter = 0; @@ -42,7 +42,7 @@ namespace ZeroLevel.Services.Collections public ZPriorityQueue(Func handler) { - if (handler == null) + if (handler == null!) throw new ArgumentNullException(nameof(handler)); _handler = handler; } @@ -59,7 +59,7 @@ namespace ZeroLevel.Services.Collections else { var cursor = _head; - PriorityQueueObject prev = null; + PriorityQueueObject prev = null!; do { if (cursor.Priority > insert.Priority) @@ -77,11 +77,11 @@ namespace ZeroLevel.Services.Collections } prev = cursor; cursor = cursor.Next; - if (cursor == null) + if (cursor == null!) { prev.Next = insert; } - } while (cursor != null); + } while (cursor != null!); } _counter++; } @@ -90,17 +90,17 @@ namespace ZeroLevel.Services.Collections public T HandleCurrentItem() { - T v = default(T); + T v = default(T)!; lock (_rw_lock) { var item = _head; - PriorityQueueObject prev = null; - while (item != null) + PriorityQueueObject prev = null!; + while (item != null!) { var result = this._handler.Invoke(item.Value); if (result.IsCompleted) { - if (prev != null) + if (prev != null!) { prev.Next = item.Next; } diff --git a/ZeroLevel/Services/Config/BaseConfiguration.cs b/ZeroLevel/Services/Config/BaseConfiguration.cs index 0bad1bc..1ab43aa 100644 --- a/ZeroLevel/Services/Config/BaseConfiguration.cs +++ b/ZeroLevel/Services/Config/BaseConfiguration.cs @@ -118,7 +118,7 @@ namespace ZeroLevel.Services.Config { if (result.Count > 0) return result[0]; - return null; + return null!; } throw new KeyNotFoundException("Key not found: " + key); } @@ -154,7 +154,7 @@ namespace ZeroLevel.Services.Config { return (T)StringToTypeConverter.TryConvert(result[0], typeof(T)); } - return default(T); + return default(T)!; } throw new KeyNotFoundException("Parameter not found: " + key); } @@ -192,7 +192,7 @@ namespace ZeroLevel.Services.Config return (T)StringToTypeConverter.TryConvert(result[0], typeof(T)); } } - return default(T); + return default(T)!; } /// @@ -280,7 +280,7 @@ namespace ZeroLevel.Services.Config { _keyValues.TryAdd(key, new List()); } - _keyValues[key].Add(value?.Trim() ?? null); + _keyValues[key].Add((value?.Trim() ?? null)!); } return this; } @@ -296,7 +296,7 @@ namespace ZeroLevel.Services.Config } foreach (var value in values) { - _keyValues[key].Add(value?.Trim() ?? null); + _keyValues[key].Add((value?.Trim() ?? null)!); } } return this; @@ -318,7 +318,7 @@ namespace ZeroLevel.Services.Config { _keyValues[key].Clear(); } - _keyValues[key].Add(value?.Trim() ?? null); + _keyValues[key].Add((value?.Trim() ?? null)!); } return this; } @@ -360,8 +360,7 @@ namespace ZeroLevel.Services.Config { if (false == _freezed) { - IList removed; - _keyValues.TryRemove(GetKey(key), out removed); + _keyValues.TryRemove(GetKey(key), out _); } return this; } @@ -404,7 +403,7 @@ namespace ZeroLevel.Services.Config public bool Equals(IConfiguration other) { - if (other == null) + if (other == null!) { return false; } @@ -508,12 +507,12 @@ namespace ZeroLevel.Services.Config if (count > 0) { var values = this.Items(member.Name); - IConfigRecordParser parser = member.Original.GetCustomAttribute()?.Parser; + IConfigRecordParser parser = member.Original.GetCustomAttribute()?.Parser!; if (TypeHelpers.IsArray(member.ClrType) && member.ClrType.GetArrayRank() == 1) { int index = 0; var itemType = member.ClrType.GetElementType(); - if (parser == null) + if (parser == null!) { var elements = values.SelectMany(v => SplitRange(v, itemType)).ToArray(); var arrayBuilder = CollectionFactory.CreateArray(itemType, elements.Length); @@ -540,7 +539,7 @@ namespace ZeroLevel.Services.Config { var itemType = member.ClrType.GenericTypeArguments.First(); var collectionBuilder = CollectionFactory.Create(itemType); - if (parser == null) + if (parser == null!) { var elements = values.SelectMany(v => SplitRange(v, itemType)).ToArray(); foreach (var item in elements) @@ -561,7 +560,7 @@ namespace ZeroLevel.Services.Config else { var single = values.First(); - if (parser != null) + if (parser != null!) { member.Setter(instance, parser.Parse(single)); } diff --git a/ZeroLevel/Services/Config/BaseConfigurationSet.cs b/ZeroLevel/Services/Config/BaseConfigurationSet.cs index 257a71f..aeb713e 100644 --- a/ZeroLevel/Services/Config/BaseConfigurationSet.cs +++ b/ZeroLevel/Services/Config/BaseConfigurationSet.cs @@ -158,7 +158,7 @@ namespace ZeroLevel.Services.Config public bool Equals(IConfigurationSet other) { - if (other == null) return false; + if (other == null!) return false; return this.SectionNames.NoOrderingEquals(other.SectionNames) && this.Sections.NoOrderingEquals(other.Sections); } @@ -274,14 +274,17 @@ namespace ZeroLevel.Services.Config { var mapper = TypeMapper.Create(true); var instance = Default.Bind(); - mapper.TraversalMembers(member => + if (instance != null) { - if (ContainsSection(member.Name)) + mapper.TraversalMembers(member => { - member.Setter(instance, GetSection(member.Name).Bind(member.ClrType)); - } - }); - return instance; + if (ContainsSection(member.Name)) + { + member.Setter(instance, GetSection(member.Name).Bind(member.ClrType)); + } + }); + } + return instance!; } } } \ No newline at end of file diff --git a/ZeroLevel/Services/Config/ConfigRecordParseAttribute.cs b/ZeroLevel/Services/Config/ConfigRecordParseAttribute.cs index b2dcbb1..a23eb11 100644 --- a/ZeroLevel/Services/Config/ConfigRecordParseAttribute.cs +++ b/ZeroLevel/Services/Config/ConfigRecordParseAttribute.cs @@ -9,7 +9,7 @@ namespace ZeroLevel.Services.Config public ConfigRecordParseAttribute(Type parserType) { - if (parserType == null) throw new ArgumentNullException(nameof(parserType)); + if (parserType == null!) throw new ArgumentNullException(nameof(parserType)); Parser = (IConfigRecordParser)Activator.CreateInstance(parserType); } } diff --git a/ZeroLevel/Services/Config/Configuration.cs b/ZeroLevel/Services/Config/Configuration.cs index 9f5ad5f..7ff8c4f 100644 --- a/ZeroLevel/Services/Config/Configuration.cs +++ b/ZeroLevel/Services/Config/Configuration.cs @@ -29,7 +29,7 @@ namespace ZeroLevel _emptySet.FreezeConfiguration(true); DefaultSet = Configuration.CreateSet(); var assembly = EntryAssemblyAttribute.GetEntryAssembly(); - if (assembly != null) + if (assembly != null!) { BaseDirectory = Path.GetDirectoryName(assembly.Location); AppLocation = assembly.Location; @@ -52,7 +52,7 @@ namespace ZeroLevel public static IConfiguration Empty { get { return _empty; } } public static IConfigurationSet EmptySet { get { return _emptySet; } } - public static IConfiguration Default => DefaultSet?.Default; + public static IConfiguration Default => DefaultSet?.Default!; public static IConfigurationSet DefaultSet { get; private set; } public static void Save(string name, IConfiguration configuration) @@ -62,7 +62,7 @@ namespace ZeroLevel public static void Save(IConfiguration configuration) { - if (DefaultSet == null) + if (DefaultSet == null!) { DefaultSet = Configuration.CreateSet(configuration); } @@ -79,7 +79,7 @@ namespace ZeroLevel public static void Save(IConfigurationSet configuration) { - if (DefaultSet == null) + if (DefaultSet == null!) { DefaultSet = configuration; } diff --git a/ZeroLevel/Services/Config/Implementation/AppWebConfigReader.cs b/ZeroLevel/Services/Config/Implementation/AppWebConfigReader.cs index 95d4894..b13807b 100644 --- a/ZeroLevel/Services/Config/Implementation/AppWebConfigReader.cs +++ b/ZeroLevel/Services/Config/Implementation/AppWebConfigReader.cs @@ -14,7 +14,7 @@ namespace ZeroLevel.Services.Config.Implementation internal AppWebConfigReader(string configFilePath = null!) { - if (configFilePath == null) + if (configFilePath == null!) { var appConfig = Path.Combine(Configuration.BaseDirectory, $"{System.AppDomain.CurrentDomain.FriendlyName}.config"); if (File.Exists(appConfig)) @@ -49,7 +49,7 @@ namespace ZeroLevel.Services.Config.Implementation internal IEnumerable GetSections() { - if (_configFilePath != null) + if (_configFilePath != null!) { var xdoc = XDocument.Load(_configFilePath); var cs = xdoc.Descendants("connectionStrings"). @@ -62,7 +62,7 @@ namespace ZeroLevel.Services.Config.Implementation internal IEnumerable> ReadSection(string sectionName) { - if (_configFilePath != null) + if (_configFilePath != null!) { var xdoc = XDocument.Load(_configFilePath); return xdoc.Descendants(sectionName). @@ -78,7 +78,7 @@ namespace ZeroLevel.Services.Config.Implementation private static string FindName(XElement n) { - if (n == null) return string.Empty; + if (n == null!) return string.Empty; var attributes = n.Attributes(). ToDictionary(i => i.Name.LocalName.ToLowerInvariant(), j => j.Value); foreach (var v in new[] { "key", "name", "code", "id" }) @@ -91,7 +91,7 @@ namespace ZeroLevel.Services.Config.Implementation private static string FindValue(XElement n) { - if (n == null) return string.Empty; + if (n == null!) return string.Empty; var attributes = n.Attributes(). ToDictionary(i => i.Name.LocalName.ToLowerInvariant(), j => j.Value); foreach (var v in new[] { "value", "val", "file", "db", "connectionstring" }) diff --git a/ZeroLevel/Services/Config/Implementation/CommandLineReader.cs b/ZeroLevel/Services/Config/Implementation/CommandLineReader.cs index 44e8ebc..6909961 100644 --- a/ZeroLevel/Services/Config/Implementation/CommandLineReader.cs +++ b/ZeroLevel/Services/Config/Implementation/CommandLineReader.cs @@ -16,7 +16,7 @@ namespace ZeroLevel.Services.Config.Implementation public IConfiguration ReadConfiguration() { var result = Configuration.Create(); - if (_args != null) + if (_args != null!) { try { diff --git a/ZeroLevel/Services/Config/Implementation/IniFileReader.cs b/ZeroLevel/Services/Config/Implementation/IniFileReader.cs index 67ef979..cdbcc1f 100644 --- a/ZeroLevel/Services/Config/Implementation/IniFileReader.cs +++ b/ZeroLevel/Services/Config/Implementation/IniFileReader.cs @@ -30,7 +30,7 @@ namespace ZeroLevel.Services.Config.Implementation public IConfiguration ReadConfiguration() { var result = Configuration.Create(); - string sectionName = null; + string sectionName = null!; foreach (var line in File.ReadAllLines(_iniPath)) { if (string.IsNullOrWhiteSpace(line)) @@ -82,7 +82,7 @@ namespace ZeroLevel.Services.Config.Implementation public IConfigurationSet ReadConfigurationSet() { var result = Configuration.CreateSet(); - string sectionName = null; + string sectionName = null!; foreach (var line in File.ReadAllLines(_iniPath)) { if (string.IsNullOrWhiteSpace(line)) diff --git a/ZeroLevel/Services/DOM/DSL/Contexts/TElementContext.cs b/ZeroLevel/Services/DOM/DSL/Contexts/TElementContext.cs index 0727e96..246f641 100644 --- a/ZeroLevel/Services/DOM/DSL/Contexts/TElementContext.cs +++ b/ZeroLevel/Services/DOM/DSL/Contexts/TElementContext.cs @@ -40,7 +40,7 @@ namespace DOM.DSL.Contexts } else { - _next = new TSystemToken { Command = name, Arg = null }; + _next = new TSystemToken { Command = name, Arg = null! }; } } else @@ -72,7 +72,7 @@ namespace DOM.DSL.Contexts public TToken Complete() { - return new TElementToken { ElementName = _name, NextToken = _next?.Clone() }; + return new TElementToken { ElementName = _name, NextToken = _next?.Clone()! }; } } } \ No newline at end of file diff --git a/ZeroLevel/Services/DOM/DSL/Contexts/TFunctionContext.cs b/ZeroLevel/Services/DOM/DSL/Contexts/TFunctionContext.cs index 7bb49ae..9210cfc 100644 --- a/ZeroLevel/Services/DOM/DSL/Contexts/TFunctionContext.cs +++ b/ZeroLevel/Services/DOM/DSL/Contexts/TFunctionContext.cs @@ -38,7 +38,7 @@ namespace DOM.DSL.Contexts { if (argTokens.Count > 0) { - _argTokens.Add(new TBlockToken("", null, argTokens.Select(t => t.Clone()).ToArray())); + _argTokens.Add(new TBlockToken("", null!, argTokens.Select(t => t.Clone()).ToArray())); argTokens.Clear(); } }); @@ -187,8 +187,8 @@ namespace DOM.DSL.Contexts return new TFunctionToken { FunctionName = _name, - NextToken = _nextToken?.Clone(), - FunctionArgs = _argTokens?.Select(t => t.Clone()) + NextToken = _nextToken?.Clone()!, + FunctionArgs = _argTokens?.Select(t => t.Clone())! }; } } diff --git a/ZeroLevel/Services/DOM/DSL/Contexts/TPropertyContext.cs b/ZeroLevel/Services/DOM/DSL/Contexts/TPropertyContext.cs index 1aaff79..698e937 100644 --- a/ZeroLevel/Services/DOM/DSL/Contexts/TPropertyContext.cs +++ b/ZeroLevel/Services/DOM/DSL/Contexts/TPropertyContext.cs @@ -185,8 +185,8 @@ namespace DOM.DSL.Contexts return new TPropertyToken { PropertyName = _name, - PropertyIndex = new TBlockToken(_name, null, _indexTokens.Select(t => t.Clone()).ToArray()), - NextToken = _nextToken?.Clone() + PropertyIndex = new TBlockToken(_name, null!, _indexTokens.Select(t => t.Clone()).ToArray()), + NextToken = _nextToken?.Clone()! }; } } diff --git a/ZeroLevel/Services/DOM/DSL/Contexts/TRootContext.cs b/ZeroLevel/Services/DOM/DSL/Contexts/TRootContext.cs index 5bb0e87..f437c9e 100644 --- a/ZeroLevel/Services/DOM/DSL/Contexts/TRootContext.cs +++ b/ZeroLevel/Services/DOM/DSL/Contexts/TRootContext.cs @@ -14,7 +14,7 @@ namespace DOM.DSL.Contexts public TRootContext() { - ParentContext = null; + ParentContext = null!; _tokens = new List(); } @@ -109,7 +109,7 @@ namespace DOM.DSL.Contexts _tokens.Add(blockContext.Complete()); } else if (ParentContext != null && ParentContext is TBlockContext && - name.Equals("end" + (ParentContext as TBlockContext).Name, StringComparison.OrdinalIgnoreCase)) + name.Equals("end" + (ParentContext as TBlockContext)!.Name, StringComparison.OrdinalIgnoreCase)) { reader.Move(name.Length); flushTextToken(); diff --git a/ZeroLevel/Services/DOM/DSL/Model/TContentElement.cs b/ZeroLevel/Services/DOM/DSL/Model/TContentElement.cs index 382d846..d179efd 100644 --- a/ZeroLevel/Services/DOM/DSL/Model/TContentElement.cs +++ b/ZeroLevel/Services/DOM/DSL/Model/TContentElement.cs @@ -26,7 +26,7 @@ namespace DOM.DSL.Model // Containers case ContentElementType.Section: var section = (element as Section); - foreach (var item in section.Parts) + foreach (var item in section!.Parts) { TraversElement(item, type, handler); } @@ -34,7 +34,7 @@ namespace DOM.DSL.Model case ContentElementType.Paragraph: var paragraph = (element as Paragraph); - foreach (var item in paragraph.Parts) + foreach (var item in paragraph!.Parts) { TraversElement(item, type, handler); } @@ -42,7 +42,7 @@ namespace DOM.DSL.Model case ContentElementType.List: var list = (element as List); - foreach (var item in list.Items) + foreach (var item in list!.Items) { TraversElement(item, type, handler); } @@ -50,7 +50,7 @@ namespace DOM.DSL.Model case ContentElementType.Gallery: var gallery = (element as Gallery); - foreach (var item in gallery.Images) + foreach (var item in gallery!.Images) { TraversElement(item, type, handler); } @@ -58,7 +58,7 @@ namespace DOM.DSL.Model case ContentElementType.Audioplayer: var audioplayer = (element as Audioplayer); - foreach (var item in audioplayer.Tracks) + foreach (var item in audioplayer!.Tracks) { TraversElement(item, type, handler); } @@ -66,7 +66,7 @@ namespace DOM.DSL.Model case ContentElementType.Videoplayer: var videoplayer = (element as Videoplayer); - foreach (var item in videoplayer.Playlist) + foreach (var item in videoplayer!.Playlist) { TraversElement(item, type, handler); } @@ -74,7 +74,7 @@ namespace DOM.DSL.Model case ContentElementType.Table: var table = (element as Table); - foreach (var column in table.Columns) + foreach (var column in table!.Columns) { TraversElement(column, type, handler); } diff --git a/ZeroLevel/Services/DOM/DSL/Model/TEnvironment.cs b/ZeroLevel/Services/DOM/DSL/Model/TEnvironment.cs index 1b41ca1..3b2d692 100644 --- a/ZeroLevel/Services/DOM/DSL/Model/TEnvironment.cs +++ b/ZeroLevel/Services/DOM/DSL/Model/TEnvironment.cs @@ -7,10 +7,10 @@ namespace DOM.DSL.Model public sealed class TEnvironment { public int Delay { get; set; } = 0; - public string FileName { get; set; } = null; - public Encoding Encoding { get; set; } = null; - public string ContractName { get; set; } = null; - public string SubscriptionName { get; set; } = null; + public string FileName { get; set; } = null!; + public Encoding Encoding { get; set; } = null!; + public string ContractName { get; set; } = null!; + public string SubscriptionName { get; set; } = null!; public Guid SubscriptionId { get; set; } = Guid.Empty; public IDictionary CustomVariables { get; } diff --git a/ZeroLevel/Services/DOM/DSL/Model/TFlowRules.cs b/ZeroLevel/Services/DOM/DSL/Model/TFlowRules.cs index 9b87b7e..648d361 100644 --- a/ZeroLevel/Services/DOM/DSL/Model/TFlowRules.cs +++ b/ZeroLevel/Services/DOM/DSL/Model/TFlowRules.cs @@ -353,7 +353,7 @@ namespace DOM.DSL.Model break; case "special": // Using a hardcoded table conversion - //TablePrefix = TablePostfix = null; + //TablePrefix = TablePostfix = null!; ColumnsPrefix = ColumnsPostfix = null!; ColumnPrefix = ColumnTemplate = ColumnPostfix = null!; RowPrefix = RowPostfix = null!; @@ -361,7 +361,7 @@ namespace DOM.DSL.Model // Args: (style, paddings l-t-r-b, maxcellwidth, maxtablewidth) UseSpecialTableBuilder = true; SpecialTableBuilder = SpecialTableBuilderFactory.CreateSpecialTableBuilder(special); - if (SpecialTableBuilder == null) UseSpecialTableBuilder = false; + if (SpecialTableBuilder == null!) UseSpecialTableBuilder = false; break; } break; diff --git a/ZeroLevel/Services/DOM/DSL/Services/PlainTextTableBuilder.cs b/ZeroLevel/Services/DOM/DSL/Services/PlainTextTableBuilder.cs index 09a4bfe..b53f8d7 100644 --- a/ZeroLevel/Services/DOM/DSL/Services/PlainTextTableBuilder.cs +++ b/ZeroLevel/Services/DOM/DSL/Services/PlainTextTableBuilder.cs @@ -19,10 +19,10 @@ namespace DOM.DSL.Services public void FlushRow() { - if (RowCells != null) + if (RowCells != null!) { Data.AppendRow(RowCells); - RowCells = null; + RowCells = null!; } } diff --git a/ZeroLevel/Services/DOM/DSL/Services/TContainer.cs b/ZeroLevel/Services/DOM/DSL/Services/TContainer.cs index e07f151..c17d73b 100644 --- a/ZeroLevel/Services/DOM/DSL/Services/TContainer.cs +++ b/ZeroLevel/Services/DOM/DSL/Services/TContainer.cs @@ -30,7 +30,7 @@ namespace DOM.DSL.Services public void Append(object _item) { - if (_item == null) return; + if (_item == null!) return; object item; if (_item is TContainer) { @@ -40,7 +40,7 @@ namespace DOM.DSL.Services { item = _item; } - if (_list == null) + if (_list == null!) { _elementType = item.GetType(); _list = (IList)Activator.CreateInstance(typeof(List<>).MakeGenericType(_elementType)); @@ -159,7 +159,7 @@ namespace DOM.DSL.Services public void MoveToProperty(string propertyName, string propertyIndex) { if (propertyName.Equals("order", StringComparison.OrdinalIgnoreCase)) { Reset(Index); return; } - if (_current == null) return; + if (_current == null!) return; var buff_val = _current; var buff_index = Index; @@ -211,7 +211,7 @@ namespace DOM.DSL.Services { var buff_val = _current; var buff_index = Index; - TContainer[] args = null; + TContainer[] args = null!; try { switch (GetFunctionType(functionName)) @@ -242,7 +242,7 @@ namespace DOM.DSL.Services _current = buff_val; Index = buff_index; } - if (args != null) + if (args != null!) { foreach (var a in args) _factory.Release(a); @@ -253,7 +253,7 @@ namespace DOM.DSL.Services public T As() { - if (_current == null) return default(T); + if (_current == null!) return default(T)!; if (_current is T) return (T)_current; var type = typeof(T); if (_current is string) @@ -267,13 +267,13 @@ namespace DOM.DSL.Services catch (Exception ex) { Log.SystemWarning($"[DOM.TContainer] Fault cast current value from type '{_current?.GetType()?.FullName ?? string.Empty}' to type '{type.FullName}'. {ex.ToString()}"); - return default(T); + return default(T)!; } } public object As(Type type) { - if (_current == null) return TypeHelpers.CreateDefaultState(type); + if (_current == null!) return TypeHelpers.CreateDefaultState(type); if (_current.GetType().IsAssignableFrom(type)) return _current; if (_current is string) { @@ -927,7 +927,7 @@ namespace DOM.DSL.Services break; } - if (enumerable != null) + if (enumerable != null!) { int index; if (int.TryParse(propertyIndex, out index)) @@ -1336,7 +1336,7 @@ namespace DOM.DSL.Services } else { - Reset(null); + Reset(null!); } } @@ -1388,7 +1388,7 @@ namespace DOM.DSL.Services private void ApplyStringFunction(string function, TContainer[] args) { - if (_current == null) + if (_current == null!) { args = null!; return; @@ -1774,7 +1774,7 @@ namespace DOM.DSL.Services private void ApplyExtractionFunction(string function, Func args_getter, out TContainer[] args) { - if (_current == null) + if (_current == null!) { if (function.Equals("append", StringComparison.OrdinalIgnoreCase)) { @@ -1806,7 +1806,7 @@ namespace DOM.DSL.Services } if (function.Equals("where", StringComparison.OrdinalIgnoreCase)) { - if (args_getter != null) + if (args_getter != null!) { if (IsEnumerable) { @@ -1814,10 +1814,10 @@ namespace DOM.DSL.Services int index = 0; foreach (var i in ((IEnumerable)_current)) { - if (i == null) continue; + if (i == null!) continue; var container = _factory.Get(i, index); var conditions = args_getter(container); - if (conditions != null) + if (conditions != null!) { bool success = conditions.Any(); foreach (var c in conditions) @@ -1836,7 +1836,7 @@ namespace DOM.DSL.Services Reset(list.Complete()); } } - args = null; + args = null!; return; } else @@ -1856,7 +1856,7 @@ namespace DOM.DSL.Services { _render.BufferDictionary[key] = this._current; } - Reset(null); + Reset(null!); } break; @@ -1967,7 +1967,7 @@ namespace DOM.DSL.Services var list = new TDList(); foreach (var i in ((IEnumerable)_current)) { - if (i == null) continue; + if (i == null!) continue; var container = _factory.Get(i); container.MoveToProperty(property, property_index!); list.Append(container.Current); @@ -1998,7 +1998,7 @@ namespace DOM.DSL.Services var list = new TDList(); foreach (var i in ((IEnumerable)_current)) { - if (i == null) continue; + if (i == null!) continue; var container = _factory.Get(i); switch (functionType) { @@ -2062,7 +2062,7 @@ namespace DOM.DSL.Services case "tonum": case "tonumber": - if (_current != null) + if (_current != null!) { var buf = _current.ToString(); int num; @@ -2081,7 +2081,7 @@ namespace DOM.DSL.Services if (_current is List) { var list = _current as List; - if (list == null) + if (list == null!) { _current = new List(); list = _current as List; @@ -2455,7 +2455,7 @@ namespace DOM.DSL.Services private void ChangeDateTime(TContainer value, ChangeDateTimeType type) { - if (_current == null) return; + if (_current == null!) return; if (_current is DateTime) { var dt = (DateTime)_current; @@ -2498,7 +2498,7 @@ namespace DOM.DSL.Services public bool Any(TContainer[] set = null!, bool ignoreCase = true) { - if (_current == null) return false; + if (_current == null!) return false; if (set?.Any() ?? false) { if (_current is IEnumerable && false == (_current is string)) @@ -2525,7 +2525,7 @@ namespace DOM.DSL.Services public bool Contains(TContainer[] set, bool ignoreCase) { - if (_current == null) return false; + if (_current == null!) return false; if (set == null || set?.Length == 0) return false; if (_current is IEnumerable && false == (_current is string)) { @@ -2564,8 +2564,8 @@ namespace DOM.DSL.Services public bool NoContains(TContainer[] test, bool ignoreCase) { - if (_current == null) return false; - if (_current == null) return false; + if (_current == null!) return false; + if (_current == null!) return false; if (_current is IEnumerable && false == (_current is string)) { foreach (var c in (IEnumerable)_current) @@ -2588,43 +2588,43 @@ namespace DOM.DSL.Services public bool IsEmpty() { - if (_current == null) return true; + if (_current == null!) return true; return String.IsNullOrWhiteSpace(_current.ToString()); } public bool Is(TContainer test, bool ignoreCase) { - if (_current == null) return test.Current == null; + if (_current == null!) return test.Current == null!; return CompareWith(test, ignoreCase) == 0; } public bool IsNot(TContainer test, bool ignoreCase) { - if (_current == null) return test.Current != null; + if (_current == null!) return test.Current != null!; return CompareWith(test, ignoreCase) != 0; } public bool LessThan(TContainer test, bool ignoreCase) { - if (_current == null) return false; + if (_current == null!) return false; return CompareWith(test, ignoreCase) < 0; } public bool MoreThan(TContainer test, bool ignoreCase) { - if (_current == null) return false; + if (_current == null!) return false; return CompareWith(test, ignoreCase) > 0; } public bool LessOrEq(TContainer test, bool ignoreCase) { - if (_current == null) return false; + if (_current == null!) return false; return CompareWith(test, ignoreCase) <= 0; } public bool MoreOrEq(TContainer test, bool ignoreCase) { - if (_current == null) return false; + if (_current == null!) return false; return CompareWith(test, ignoreCase) >= 0; } @@ -2734,7 +2734,7 @@ namespace DOM.DSL.Services private static string FormattedDateTime(DateTime dt, string format = null!, string culture = null!) { CultureInfo ci; - if (culture != null) + if (culture != null!) { try { @@ -2764,7 +2764,7 @@ namespace DOM.DSL.Services public override string ToString() { - if (_current == null) return string.Empty; + if (_current == null!) return string.Empty; if (_current is string) return (string)_current; else if (_current is DateTime) return FormattedDateTime((DateTime)_current); diff --git a/ZeroLevel/Services/DOM/DSL/Services/TContainerFactory.cs b/ZeroLevel/Services/DOM/DSL/Services/TContainerFactory.cs index 193468a..ab5701c 100644 --- a/ZeroLevel/Services/DOM/DSL/Services/TContainerFactory.cs +++ b/ZeroLevel/Services/DOM/DSL/Services/TContainerFactory.cs @@ -37,7 +37,7 @@ namespace DOM.DSL.Services internal void Release(TContainer container) { - if (container != null) + if (container != null!) { Interlocked.Increment(ref _release_count); _pool.Return(container); diff --git a/ZeroLevel/Services/DOM/DSL/Services/TContentToStringConverter.cs b/ZeroLevel/Services/DOM/DSL/Services/TContentToStringConverter.cs index 7ea6f3d..8082310 100644 --- a/ZeroLevel/Services/DOM/DSL/Services/TContentToStringConverter.cs +++ b/ZeroLevel/Services/DOM/DSL/Services/TContentToStringConverter.cs @@ -22,7 +22,7 @@ namespace DOM.DSL.Services _render = render; _transformRules = rules; _specialTableBuilder = rules.SpecialTableBuilder; - _useSpecialTableBuilder = rules.UseSpecialTableBuilder && rules.SpecialTableBuilder != null; + _useSpecialTableBuilder = rules.UseSpecialTableBuilder && rules.SpecialTableBuilder != null!; _builder = new StringBuilder(); } @@ -58,15 +58,15 @@ namespace DOM.DSL.Services public void ReadAudio(Audio audio, int order) { _render.Counter.IncAudioId(); - if (_transformRules.AudioPrefix != null) + if (_transformRules.AudioPrefix != null!) { WriteText(Resolve(_transformRules.AudioPrefix, audio, order)); } - if (_transformRules.AudioTemplate != null) + if (_transformRules.AudioTemplate != null!) { WriteText(Resolve(_transformRules.AudioTemplate, audio, order)); } - if (_transformRules.AudioPostfix != null) + if (_transformRules.AudioPostfix != null!) { WriteText(Resolve(_transformRules.AudioPostfix, audio, order)); } @@ -75,15 +75,15 @@ namespace DOM.DSL.Services public void ReadColumn(Table table, Column column, int order) { _render.Counter.IncColumnId(); - if (_transformRules.ColumnPrefix != null) + if (_transformRules.ColumnPrefix != null!) { WriteText(Resolve(_transformRules.ColumnPrefix, column, order)); } - if (_transformRules.ColumnTemplate != null) + if (_transformRules.ColumnTemplate != null!) { WriteText(Resolve(_transformRules.ColumnTemplate, column, order)); } - if (_transformRules.ColumnPostfix != null) + if (_transformRules.ColumnPostfix != null!) { WriteText(Resolve(_transformRules.ColumnPostfix, column, order)); } @@ -92,15 +92,15 @@ namespace DOM.DSL.Services public void ReadForm(FormContent form) { _render.Counter.IncFormId(); - if (_transformRules.FormPrefix != null) + if (_transformRules.FormPrefix != null!) { WriteText(Resolve(_transformRules.FormPrefix, form, 0)); } - if (_transformRules.FormTemplate != null) + if (_transformRules.FormTemplate != null!) { WriteText(Resolve(_transformRules.FormTemplate, form, 0)); } - if (_transformRules.FormPostfix != null) + if (_transformRules.FormPostfix != null!) { WriteText(Resolve(_transformRules.FormPostfix, form, 0)); } @@ -109,15 +109,15 @@ namespace DOM.DSL.Services public void ReadImage(Image image, int order) { _render.Counter.IncImageId(); - if (_transformRules.ImagePrefix != null) + if (_transformRules.ImagePrefix != null!) { WriteText(Resolve(_transformRules.ImagePrefix, image, order)); } - if (_transformRules.ImageTemplate != null) + if (_transformRules.ImageTemplate != null!) { WriteText(Resolve(_transformRules.ImageTemplate, image, order)); } - if (_transformRules.ImagePostfix != null) + if (_transformRules.ImagePostfix != null!) { WriteText(Resolve(_transformRules.ImagePostfix, image, order)); } @@ -126,15 +126,15 @@ namespace DOM.DSL.Services public void ReadLink(Link link, int order) { _render.Counter.IncLinkId(); - if (_transformRules.LinkPrefix != null) + if (_transformRules.LinkPrefix != null!) { WriteText(Resolve(_transformRules.LinkPrefix, link, order)); } - if (_transformRules.LinkTemplate != null) + if (_transformRules.LinkTemplate != null!) { WriteText(Resolve(_transformRules.LinkTemplate, link, order)); } - if (_transformRules.LinkPostfix != null) + if (_transformRules.LinkPostfix != null!) { WriteText(Resolve(_transformRules.LinkPostfix, link, order)); } @@ -143,15 +143,15 @@ namespace DOM.DSL.Services public void ReadQuote(Quote quote) { _render.Counter.IncQuoteId(); - if (_transformRules.QuotePrefix != null) + if (_transformRules.QuotePrefix != null!) { WriteText(Resolve(_transformRules.QuotePrefix, quote, 0)); } - if (_transformRules.QuoteTemplate != null) + if (_transformRules.QuoteTemplate != null!) { WriteText(Resolve(_transformRules.QuoteTemplate, quote, 0)); } - if (_transformRules.QuotePostfix != null) + if (_transformRules.QuotePostfix != null!) { WriteText(Resolve(_transformRules.QuotePostfix, quote, 0)); } @@ -160,15 +160,15 @@ namespace DOM.DSL.Services public void ReadText(Text text) { _render.Counter.IncTextId(); - if (_transformRules.TextPrefix != null) + if (_transformRules.TextPrefix != null!) { WriteText(Resolve(_transformRules.TextPrefix, text, 0)); } - if (_transformRules.TextTemplate != null) + if (_transformRules.TextTemplate != null!) { WriteText(Resolve(_transformRules.TextTemplate, text, 0)); } - if (_transformRules.TextPostfix != null) + if (_transformRules.TextPostfix != null!) { WriteText(Resolve(_transformRules.TextPostfix, text, 0)); } @@ -177,15 +177,15 @@ namespace DOM.DSL.Services public void ReadVideo(Video video, int order) { _render.Counter.IncVideoId(); - if (_transformRules.VideoPrefix != null) + if (_transformRules.VideoPrefix != null!) { WriteText(Resolve(_transformRules.VideoPrefix, video, order)); } - if (_transformRules.VideoTemplate != null) + if (_transformRules.VideoTemplate != null!) { WriteText(Resolve(_transformRules.VideoTemplate, video, order)); } - if (_transformRules.VideoPostfix != null) + if (_transformRules.VideoPostfix != null!) { WriteText(Resolve(_transformRules.VideoPostfix, video, order)); } @@ -198,7 +198,7 @@ namespace DOM.DSL.Services public void EnterParagraph(Paragraph paragraph) { _render.Counter.IncParagraphId(); - if (_transformRules.ParagraphPrefix != null) + if (_transformRules.ParagraphPrefix != null!) { WriteText(Resolve(_transformRules.ParagraphPrefix, paragraph, _render.Counter.ParagraphId)); } @@ -206,7 +206,7 @@ namespace DOM.DSL.Services public void LeaveParagraph(Paragraph paragraph) { - if (_transformRules.ParagraphPostfix != null) + if (_transformRules.ParagraphPostfix != null!) { WriteText(Resolve(_transformRules.ParagraphPostfix, paragraph, _render.Counter.ParagraphId)); } @@ -215,7 +215,7 @@ namespace DOM.DSL.Services public void EnterSection(Section section) { _render.Counter.IncSectionId(); - if (_transformRules.SectionPrefix != null) + if (_transformRules.SectionPrefix != null!) { WriteText(Resolve(_transformRules.SectionPrefix, section, _render.Counter.SectionId)); } @@ -223,7 +223,7 @@ namespace DOM.DSL.Services public void LeaveSection(Section section) { - if (_transformRules.SectionPostfix != null) + if (_transformRules.SectionPostfix != null!) { WriteText(Resolve(_transformRules.SectionPostfix, section, _render.Counter.SectionId)); } @@ -236,7 +236,7 @@ namespace DOM.DSL.Services public void EnterTable(Table table) { _render.Counter.IncTableId(); - if (_transformRules.TablePrefix != null) + if (_transformRules.TablePrefix != null!) { _builder.Append(Resolve(_transformRules.TablePrefix, table, _render.Counter.TableId)); } @@ -249,7 +249,7 @@ namespace DOM.DSL.Services public void EnterColumns(Table table) { - if (_useSpecialTableBuilder == false && _transformRules.ColumnsPrefix != null) + if (_useSpecialTableBuilder == false && _transformRules.ColumnsPrefix != null!) { _builder.Append(Resolve(_transformRules.ColumnsPrefix, table.Columns, 0)); } @@ -262,7 +262,7 @@ namespace DOM.DSL.Services { _specialTableBuilder.EnterRow(row.Cells.Count); } - else if (_transformRules.RowPrefix != null) + else if (_transformRules.RowPrefix != null!) { _builder.Append(Resolve(_transformRules.RowPrefix, row, order)); } @@ -277,11 +277,11 @@ namespace DOM.DSL.Services } else { - if (order == 0 && _transformRules.FirstRowCellPrefix != null) + if (order == 0 && _transformRules.FirstRowCellPrefix != null!) { _builder.Append(Resolve(_transformRules.FirstRowCellPrefix, cell, order)); } - else if (_transformRules.CellPrefix != null) + else if (_transformRules.CellPrefix != null!) { _builder.Append(Resolve(_transformRules.CellPrefix, cell, order)); } @@ -290,7 +290,7 @@ namespace DOM.DSL.Services public void LeaveColumns(Table table) { - if (_useSpecialTableBuilder == false && _transformRules.ColumnsPostfix != null) + if (_useSpecialTableBuilder == false && _transformRules.ColumnsPostfix != null!) { _builder.Append(Resolve(_transformRules.ColumnsPostfix, table.Columns, 0)); } @@ -302,7 +302,7 @@ namespace DOM.DSL.Services { _specialTableBuilder.LeaveRow(); } - else if (_transformRules.RowPostfix != null) + else if (_transformRules.RowPostfix != null!) { _builder.Append(Resolve(_transformRules.RowPostfix, row, order)); } @@ -316,11 +316,11 @@ namespace DOM.DSL.Services } else { - if (order == 0 && _transformRules.FirstRowCellPostfix != null) + if (order == 0 && _transformRules.FirstRowCellPostfix != null!) { _builder.Append(Resolve(_transformRules.FirstRowCellPostfix, cell, order)); } - else if (_transformRules.CellPostfix != null) + else if (_transformRules.CellPostfix != null!) { _builder.Append(Resolve(_transformRules.CellPostfix, cell, order)); } @@ -333,7 +333,7 @@ namespace DOM.DSL.Services { _specialTableBuilder.FlushTable(_builder); } - if (_transformRules.TablePostfix != null) + if (_transformRules.TablePostfix != null!) { _builder.Append(Resolve(_transformRules.TablePostfix, table, _render.Counter.TableId)); } @@ -346,7 +346,7 @@ namespace DOM.DSL.Services public void EnterList(List list) { _render.Counter.IncListId(); - if (_transformRules.ListPrefix != null) + if (_transformRules.ListPrefix != null!) { WriteText(Resolve(_transformRules.ListPrefix, list, 0)); } @@ -355,7 +355,7 @@ namespace DOM.DSL.Services public void EnterListItem(List list, IContentElement item, int order) { _render.Counter.IncListItemId(); - if (_transformRules.ListItemPrefix != null) + if (_transformRules.ListItemPrefix != null!) { WriteText(Resolve(_transformRules.ListItemPrefix, item, order)); } @@ -363,7 +363,7 @@ namespace DOM.DSL.Services public void LeaveList(List list) { - if (_transformRules.ListPostfix != null) + if (_transformRules.ListPostfix != null!) { WriteText(Resolve(_transformRules.ListPostfix, list, 0)); } @@ -371,7 +371,7 @@ namespace DOM.DSL.Services public void LeaveListItem(List list, IContentElement item, int order) { - if (_transformRules.ListItemPostfix != null) + if (_transformRules.ListItemPostfix != null!) { WriteText(Resolve(_transformRules.ListItemPostfix, item, order)); } @@ -384,7 +384,7 @@ namespace DOM.DSL.Services public void EnterAudioplayer(Audioplayer player) { _render.Counter.IncAudioplayerId(); - if (_transformRules.AudioplayerPrefix != null) + if (_transformRules.AudioplayerPrefix != null!) { WriteText(Resolve(_transformRules.AudioplayerPrefix, player, 0)); } @@ -393,7 +393,7 @@ namespace DOM.DSL.Services public void EnterGallery(Gallery gallery) { _render.Counter.IncGalleryId(); - if (_transformRules.GalleryPrefix != null) + if (_transformRules.GalleryPrefix != null!) { WriteText(Resolve(_transformRules.GalleryPrefix, gallery, 0)); } @@ -402,7 +402,7 @@ namespace DOM.DSL.Services public void EnterVideoplayer(Videoplayer player) { _render.Counter.IncVideoplayerId(); - if (_transformRules.VideoplayerPrefix != null) + if (_transformRules.VideoplayerPrefix != null!) { WriteText(Resolve(_transformRules.VideoplayerPrefix, player, 0)); } @@ -410,7 +410,7 @@ namespace DOM.DSL.Services public void LeaveAudioplayer(Audioplayer player) { - if (_transformRules.AudioplayerPostfix != null) + if (_transformRules.AudioplayerPostfix != null!) { WriteText(Resolve(_transformRules.AudioplayerPostfix, player, 0)); } @@ -418,7 +418,7 @@ namespace DOM.DSL.Services public void LeaveGallery(Gallery gallery) { - if (_transformRules.GalleryPostfix != null) + if (_transformRules.GalleryPostfix != null!) { WriteText(Resolve(_transformRules.GalleryPostfix, gallery, 0)); } @@ -426,7 +426,7 @@ namespace DOM.DSL.Services public void LeaveVideoplayer(Videoplayer player) { - if (_transformRules.VideoplayerPostfix != null) + if (_transformRules.VideoplayerPostfix != null!) { WriteText(Resolve(_transformRules.VideoplayerPostfix, player, 0)); } diff --git a/ZeroLevel/Services/DOM/DSL/Services/TRender.cs b/ZeroLevel/Services/DOM/DSL/Services/TRender.cs index 1b69212..580e4d9 100644 --- a/ZeroLevel/Services/DOM/DSL/Services/TRender.cs +++ b/ZeroLevel/Services/DOM/DSL/Services/TRender.cs @@ -21,7 +21,7 @@ namespace DOM.DSL.Services _blocks.Add(name, tokens); else { - _blocks[name] = null; + _blocks[name] = null!; _blocks[name] = tokens; } } @@ -157,7 +157,7 @@ namespace DOM.DSL.Services { var block = new TBlockToken(_blocks.Get(token.NextToken.AsPropertyToken().PropertyName)); var result = ResolveBlockToken(block, self); - container = Factory.Get(result.Where(c => c.Current != null).Select(c => c.Current).ToList()); + container = Factory.Get(result.Where(c => c.Current != null!).Select(c => c.Current).ToList()); foreach (var c in result) Factory.Release(c); } @@ -165,7 +165,7 @@ namespace DOM.DSL.Services } } - if (container == null) container = Factory.Get(null!); + if (container == null!) container = Factory.Get(null!); if (token.NextToken is TPropertyToken) { @@ -255,7 +255,7 @@ namespace DOM.DSL.Services { var ls = self_parent == null ? null : Factory.Get(self_parent.Current, self_parent.Index); result = ResolveSimpleBlockToken(blockToken, ls!); - Factory.Release(ls); + Factory.Release(ls!); } else { @@ -268,7 +268,7 @@ namespace DOM.DSL.Services var list = new List(); TContainer self_container = null!; Resolve(blockToken.Condition, c => self_container = c, false, self_parent); - if (self_container != null) + if (self_container != null!) { if (self_container.IsEnumerable) { @@ -319,7 +319,7 @@ namespace DOM.DSL.Services { var function = token.AsElementToken()?.NextToken?.AsFunctionToken(); var elementName = token.AsElementToken()?.ElementName; - if (elementName != null) + if (elementName != null!) { var functionName = function?.FunctionName ?? string.Empty; var rule_token = function?.FunctionArgs == null ? diff --git a/ZeroLevel/Services/DOM/DSL/TEngine.cs b/ZeroLevel/Services/DOM/DSL/TEngine.cs index 353f6c8..122369f 100644 --- a/ZeroLevel/Services/DOM/DSL/TEngine.cs +++ b/ZeroLevel/Services/DOM/DSL/TEngine.cs @@ -36,11 +36,11 @@ namespace DOM.DSL public static string Apply(Document document, IEnumerable tokens, TEnvironment environment, bool ignore_fault = true) { - if (document == null) + if (document == null!) { throw new ArgumentNullException(nameof(document)); } - if (tokens == null) + if (tokens == null!) { throw new ArgumentNullException(nameof(tokens)); } diff --git a/ZeroLevel/Services/DOM/DSL/Tokens/TElementToken.cs b/ZeroLevel/Services/DOM/DSL/Tokens/TElementToken.cs index 84cec01..232f177 100644 --- a/ZeroLevel/Services/DOM/DSL/Tokens/TElementToken.cs +++ b/ZeroLevel/Services/DOM/DSL/Tokens/TElementToken.cs @@ -21,7 +21,7 @@ return new TElementToken { ElementName = this.ElementName, - NextToken = this.NextToken?.Clone() + NextToken = this.NextToken?.Clone()! }; } @@ -30,7 +30,7 @@ return new TElementToken { ElementName = this.ElementName, - NextToken = null + NextToken = null! }; } } diff --git a/ZeroLevel/Services/DOM/DSL/Tokens/TFunctionToken.cs b/ZeroLevel/Services/DOM/DSL/Tokens/TFunctionToken.cs index bee991c..87e1f2d 100644 --- a/ZeroLevel/Services/DOM/DSL/Tokens/TFunctionToken.cs +++ b/ZeroLevel/Services/DOM/DSL/Tokens/TFunctionToken.cs @@ -16,7 +16,7 @@ namespace DOM.DSL.Tokens { FunctionArgs = FunctionArgs.Select(a => a.Clone()).ToArray(), FunctionName = this.FunctionName, - NextToken = this.NextToken?.Clone() + NextToken = this.NextToken?.Clone()! }; } @@ -26,7 +26,7 @@ namespace DOM.DSL.Tokens { FunctionArgs = FunctionArgs.Select(a => a.Clone()).ToArray(), FunctionName = this.FunctionName, - NextToken = null + NextToken = null! }; } } diff --git a/ZeroLevel/Services/DOM/DSL/Tokens/TPropertyToken.cs b/ZeroLevel/Services/DOM/DSL/Tokens/TPropertyToken.cs index 6913661..e40cc63 100644 --- a/ZeroLevel/Services/DOM/DSL/Tokens/TPropertyToken.cs +++ b/ZeroLevel/Services/DOM/DSL/Tokens/TPropertyToken.cs @@ -13,7 +13,7 @@ { PropertyIndex = this.PropertyIndex, PropertyName = this.PropertyName, - NextToken = this.NextToken?.Clone() + NextToken = this.NextToken?.Clone()! }; } @@ -23,7 +23,7 @@ { PropertyIndex = this.PropertyIndex, PropertyName = this.PropertyName, - NextToken = null + NextToken = null! }; } } diff --git a/ZeroLevel/Services/DOM/DSL/Tokens/TSystemToken.cs b/ZeroLevel/Services/DOM/DSL/Tokens/TSystemToken.cs index b45b377..f8f4237 100644 --- a/ZeroLevel/Services/DOM/DSL/Tokens/TSystemToken.cs +++ b/ZeroLevel/Services/DOM/DSL/Tokens/TSystemToken.cs @@ -11,7 +11,7 @@ return new TSystemToken { Command = this.Command, - Arg = this.Arg?.Clone() + Arg = this.Arg?.Clone()! }; } diff --git a/ZeroLevel/Services/DOM/DSL/Tokens/TToken.cs b/ZeroLevel/Services/DOM/DSL/Tokens/TToken.cs index 37ec4ea..481031d 100644 --- a/ZeroLevel/Services/DOM/DSL/Tokens/TToken.cs +++ b/ZeroLevel/Services/DOM/DSL/Tokens/TToken.cs @@ -15,16 +15,16 @@ namespace DOM.DSL.Tokens /// public abstract TToken CloneLocal(); - public TElementToken AsElementToken() => this as TElementToken; + public TElementToken AsElementToken() => (this as TElementToken)!; - public TFunctionToken AsFunctionToken() => this as TFunctionToken; + public TFunctionToken AsFunctionToken() => (this as TFunctionToken)!; - public TTextToken AsTextToken() => this as TTextToken; + public TTextToken AsTextToken() => (this as TTextToken)!; - public TBlockToken AsBlockToken() => this as TBlockToken; + public TBlockToken AsBlockToken() => (this as TBlockToken)!; - public TPropertyToken AsPropertyToken() => this as TPropertyToken; + public TPropertyToken AsPropertyToken() => (this as TPropertyToken)!; - public TSystemToken AsSystemToken() => this as TSystemToken; + public TSystemToken AsSystemToken() => (this as TSystemToken)!; } } \ No newline at end of file diff --git a/ZeroLevel/Services/DOM/Model/AttachContent.cs b/ZeroLevel/Services/DOM/Model/AttachContent.cs index 7e79d5b..f9ed05c 100644 --- a/ZeroLevel/Services/DOM/Model/AttachContent.cs +++ b/ZeroLevel/Services/DOM/Model/AttachContent.cs @@ -57,7 +57,7 @@ namespace ZeroLevel.DocumentObjectModel public T Read() { - if (this.Payload == null || this.Payload.Length == 0) return default(T); + if (this.Payload == null || this.Payload.Length == 0) return default(T)!; return MessageSerializer.DeserializeCompatible(this.Payload); } diff --git a/ZeroLevel/Services/DOM/Model/Category.cs b/ZeroLevel/Services/DOM/Model/Category.cs index 843553c..e138303 100644 --- a/ZeroLevel/Services/DOM/Model/Category.cs +++ b/ZeroLevel/Services/DOM/Model/Category.cs @@ -14,7 +14,7 @@ namespace ZeroLevel.DocumentObjectModel { } - public Category(string title, string code, string direction_code, string description = null, + public Category(string title, string code, string direction_code, string description = null!, bool is_system = false) { this.Title = title; @@ -104,7 +104,7 @@ namespace ZeroLevel.DocumentObjectModel public bool Equals(Category other) { - if (other == null) return false; + if (other == null!) return false; if (string.Compare(this.Title, other.Title, StringComparison.Ordinal) != 0) return false; if (string.Compare(this.Code, other.Code, StringComparison.Ordinal) != 0) return false; if (string.Compare(this.Description, other.Description, StringComparison.Ordinal) != 0) return false; @@ -119,7 +119,7 @@ namespace ZeroLevel.DocumentObjectModel public override bool Equals(object obj) { - return this.Equals(obj as Category); + return this.Equals((obj as Category)!); } public override int GetHashCode() diff --git a/ZeroLevel/Services/DOM/Model/Header.cs b/ZeroLevel/Services/DOM/Model/Header.cs index 3a28c7d..6e7b95a 100644 --- a/ZeroLevel/Services/DOM/Model/Header.cs +++ b/ZeroLevel/Services/DOM/Model/Header.cs @@ -77,7 +77,7 @@ namespace ZeroLevel.DocumentObjectModel public bool Equals(Header other) { - if (other == null) return false; + if (other == null!) return false; if (string.Compare(this.Name, other.Name, StringComparison.Ordinal) != 0) return false; if (string.Compare(this.Value, other.Value, StringComparison.Ordinal) != 0) return false; if (string.Compare(this.Type, other.Type, StringComparison.Ordinal) != 0) return false; @@ -91,7 +91,7 @@ namespace ZeroLevel.DocumentObjectModel public override bool Equals(object obj) { - return this.Equals(obj as Header); + return this.Equals((obj as Header)!); } public override int GetHashCode() diff --git a/ZeroLevel/Services/DOM/Services/ContentBuilder.cs b/ZeroLevel/Services/DOM/Services/ContentBuilder.cs index f708fc3..6deeccb 100644 --- a/ZeroLevel/Services/DOM/Services/ContentBuilder.cs +++ b/ZeroLevel/Services/DOM/Services/ContentBuilder.cs @@ -16,7 +16,7 @@ namespace DOM.Services public ContentBuilder(Document document) { - if (document == null) + if (document == null!) { throw new ArgumentNullException(nameof(document)); } @@ -318,7 +318,7 @@ namespace DOM.Services { RaiseIncorrectTypeException(section.Type, ContentElementType.Section); } - _content.Sections.Add(section as Section); + _content.Sections.Add((section as Section)!); } public void EnterParagraph() @@ -482,7 +482,7 @@ namespace DOM.Services public void WriteColumn(Column column) { - if (column == null) + if (column == null!) { throw new ArgumentNullException(nameof(column)); } @@ -491,7 +491,7 @@ namespace DOM.Services public void WriteText(Text text) { - if (text == null) + if (text == null!) { throw new ArgumentNullException(nameof(text)); } @@ -515,7 +515,7 @@ namespace DOM.Services public void WriteQuote(Quote quote) { - if (quote == null) + if (quote == null!) { throw new ArgumentNullException(nameof(quote)); } @@ -529,7 +529,7 @@ namespace DOM.Services public void WriteLink(Link link) { - if (link == null) + if (link == null!) { throw new ArgumentNullException(nameof(link)); } @@ -543,7 +543,7 @@ namespace DOM.Services public void WriteForm(FormContent form) { - if (form == null) + if (form == null!) { throw new ArgumentNullException(nameof(form)); } @@ -552,7 +552,7 @@ namespace DOM.Services public void WriteImage(Image image) { - if (image == null) + if (image == null!) { throw new ArgumentNullException(nameof(image)); } @@ -561,7 +561,7 @@ namespace DOM.Services public void WriteAudio(Audio audio) { - if (audio == null) + if (audio == null!) { throw new ArgumentNullException(nameof(audio)); } @@ -570,7 +570,7 @@ namespace DOM.Services public void WriteVideo(Video video) { - if (video == null) + if (video == null!) { throw new ArgumentNullException(nameof(video)); } diff --git a/ZeroLevel/Services/DOM/Services/DocumentContentReader.cs b/ZeroLevel/Services/DOM/Services/DocumentContentReader.cs index f6bbcd7..9cb2353 100644 --- a/ZeroLevel/Services/DOM/Services/DocumentContentReader.cs +++ b/ZeroLevel/Services/DOM/Services/DocumentContentReader.cs @@ -52,7 +52,7 @@ namespace DOM.Services case ContentElementType.Content: { var content = (element as FlowContent); - if (content != null) + if (content != null!) { for (int i = 0; i < content.Sections.Count; i++) { @@ -64,7 +64,7 @@ namespace DOM.Services case ContentElementType.Section: var section = (element as Section); - if (section != null) + if (section != null!) { reader.EnterSection(section); for (int i = 0; i < section.Parts.Count; i++) @@ -77,7 +77,7 @@ namespace DOM.Services case ContentElementType.Paragraph: var paragraph = (element as Paragraph); - if (paragraph != null) + if (paragraph != null!) { reader.EnterParagraph(paragraph); for (int i = 0; i < paragraph.Parts.Count; i++) @@ -90,7 +90,7 @@ namespace DOM.Services case ContentElementType.List: var list = (element as List); - if (list != null) + if (list != null!) { reader.EnterList(list); for (int i = 0; i < list.Items.Count; i++) @@ -105,7 +105,7 @@ namespace DOM.Services case ContentElementType.Gallery: var gallery = (element as Gallery); - if (gallery != null) + if (gallery != null!) { reader.EnterGallery(gallery); for (int i = 0; i < gallery.Images.Count; i++) @@ -118,7 +118,7 @@ namespace DOM.Services case ContentElementType.Audioplayer: var audioplayer = (element as Audioplayer); - if (audioplayer != null) + if (audioplayer != null!) { reader.EnterAudioplayer(audioplayer); for (int i = 0; i < audioplayer.Tracks.Count; i++) @@ -131,7 +131,7 @@ namespace DOM.Services case ContentElementType.Videoplayer: var videoplayer = (element as Videoplayer); - if (videoplayer != null) + if (videoplayer != null!) { reader.EnterVideoplayer(videoplayer); for (int i = 0; i < videoplayer.Playlist.Count; i++) @@ -144,7 +144,7 @@ namespace DOM.Services case ContentElementType.Table: var table = (element as Table); - if (table != null) + if (table != null!) { reader.EnterTable(table); reader.EnterColumns(table); diff --git a/ZeroLevel/Services/DependencyInjection/Container.cs b/ZeroLevel/Services/DependencyInjection/Container.cs index 61176f6..a49034d 100644 --- a/ZeroLevel/Services/DependencyInjection/Container.cs +++ b/ZeroLevel/Services/DependencyInjection/Container.cs @@ -15,7 +15,7 @@ namespace ZeroLevel.DependencyInjection private static object Activate(Type type, object[] args) { - if (type == null) return null!; + if (type == null!) return null!; var flags = BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public; CultureInfo culture = null!; // use InvariantCulture or other if you prefer return Activator.CreateInstance(type, flags, null, args, culture); @@ -157,7 +157,7 @@ namespace ZeroLevel.DependencyInjection Type instanceType = resolveType.GenericCachee[genericType]; if (resolveType.IsShared) { - if (resolveType.GenericInstanceCachee == null) + if (resolveType.GenericInstanceCachee == null!) { resolveType.GenericInstanceCachee = new Dictionary(); } @@ -188,7 +188,7 @@ namespace ZeroLevel.DependencyInjection private static IEnumerable CollectResolvingProperties(Type type) { return type.GetProperties(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.FlattenHierarchy). - Where(p => p.GetCustomAttribute() != null); + Where(p => p.GetCustomAttribute() != null!); } /// @@ -199,7 +199,7 @@ namespace ZeroLevel.DependencyInjection private static IEnumerable CollectResolvingFields(Type type) { return type.GetFields(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.FlattenHierarchy). - Where(p => p.GetCustomAttribute() != null); + Where(p => p.GetCustomAttribute() != null!); } /// @@ -212,7 +212,7 @@ namespace ZeroLevel.DependencyInjection private ResolveTypeInfo FindResolving(Type type, string resolveName, Type contractType) { HashSet contract_candidates = new HashSet(); - if (contractType != null) + if (contractType != null!) { if (contractType.IsInterface) contract_candidates.Add(contractType); @@ -321,8 +321,8 @@ namespace ZeroLevel.DependencyInjection /// Instance private object MakeInstance(Type type, object[] args) { - ConstructorInfo constructor = null; - object[] parameters = null; + ConstructorInfo constructor = null!; + object[] parameters = null!; foreach (var ctor in GetConstructors(type)) { if (ctor.IsMatch(args, out parameters)) @@ -339,7 +339,7 @@ namespace ZeroLevel.DependencyInjection { return constructor.Invoke(parameters); /*var flags = BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public; - CultureInfo culture = null; // use InvariantCulture or other if you prefer + CultureInfo culture = null!; // use InvariantCulture or other if you prefer return Activator.CreateInstance(type, flags, null, args, culture);*/ } } @@ -430,7 +430,7 @@ namespace ZeroLevel.DependencyInjection ImplementationType = typeof(TImplementation), IsDefault = string.IsNullOrWhiteSpace(resolveName), IsShared = false, - ResolveKey = resolveName?.Trim() + ResolveKey = resolveName?.Trim()! }; Register(typeof(TContract), resolveType); } @@ -442,7 +442,7 @@ namespace ZeroLevel.DependencyInjection ImplementationType = typeof(TImplementation), IsDefault = string.IsNullOrWhiteSpace(resolveName), IsShared = shared, - ResolveKey = resolveName?.Trim() + ResolveKey = resolveName?.Trim()! }; Register(typeof(TContract), resolveType); } @@ -466,7 +466,7 @@ namespace ZeroLevel.DependencyInjection ImplementationType = implementationType, IsDefault = string.IsNullOrWhiteSpace(resolveName), IsShared = false, - ResolveKey = resolveName?.Trim() + ResolveKey = resolveName?.Trim()! }; Register(contractType, resolveType); } @@ -490,7 +490,7 @@ namespace ZeroLevel.DependencyInjection ImplementationType = implementationType, IsDefault = string.IsNullOrWhiteSpace(resolveName), IsShared = shared, - ResolveKey = resolveName?.Trim() + ResolveKey = resolveName?.Trim()! }; Register(contractType, resolveType); } @@ -519,7 +519,7 @@ namespace ZeroLevel.DependencyInjection ImplementationType = typeof(TImplementation), IsDefault = string.IsNullOrWhiteSpace(resolveName), IsShared = false, - ResolveKey = resolveName?.Trim(), + ResolveKey = resolveName?.Trim()!, ConstructorParameters = constructorParameters }; Register(typeof(TContract), resolveType); @@ -545,7 +545,7 @@ namespace ZeroLevel.DependencyInjection ImplementationType = typeof(TImplementation), IsDefault = string.IsNullOrWhiteSpace(resolveName), IsShared = shared, - ResolveKey = resolveName?.Trim(), + ResolveKey = resolveName?.Trim()!, ConstructorParameters = constructorParameters }; Register(typeof(TContract), resolveType); @@ -571,7 +571,7 @@ namespace ZeroLevel.DependencyInjection ImplementationType = implementationType, IsDefault = string.IsNullOrWhiteSpace(resolveName), IsShared = false, - ResolveKey = resolveName?.Trim(), + ResolveKey = resolveName?.Trim()!, ConstructorParameters = constructorParameters }; Register(contractType, resolveType); @@ -597,7 +597,7 @@ namespace ZeroLevel.DependencyInjection ImplementationType = implementationType, IsDefault = string.IsNullOrWhiteSpace(resolveName), IsShared = shared, - ResolveKey = resolveName?.Trim(), + ResolveKey = resolveName?.Trim()!, ConstructorParameters = constructorParameters }; Register(contractType, resolveType); @@ -614,6 +614,7 @@ namespace ZeroLevel.DependencyInjection /// Instance public void Register(TContract implementation) { + if(implementation == null) throw new ArgumentNullException(nameof(implementation)); var resolveType = new ResolveTypeInfo { ImplementationType = implementation.GetType(), @@ -627,6 +628,7 @@ namespace ZeroLevel.DependencyInjection public void Register(Type contractType, object implementation) { + if (implementation == null) throw new ArgumentNullException(nameof(implementation)); var resolveType = new ResolveTypeInfo { ImplementationType = implementation.GetType(), @@ -640,6 +642,7 @@ namespace ZeroLevel.DependencyInjection public void Register(TContract implementation, string resolveName) { + if (implementation == null) throw new ArgumentNullException(nameof(implementation)); var resolveType = new ResolveTypeInfo { ImplementationType = implementation.GetType(), @@ -653,6 +656,7 @@ namespace ZeroLevel.DependencyInjection public void Register(Type contractType, string resolveName, object implementation) { + if (implementation == null) throw new ArgumentNullException(nameof(implementation)); var resolveType = new ResolveTypeInfo { ImplementationType = implementation.GetType(), @@ -952,7 +956,7 @@ namespace ZeroLevel.DependencyInjection public bool IsResolvingExists(Type type, string resolveName) { - return GetResolvedType(type, resolveName)?.Item1 != null; + return GetResolvedType(type, resolveName)?.Item1 != null!; } private Tuple GetResolvedType(Type type, string resolveName) @@ -1110,12 +1114,12 @@ namespace ZeroLevel.DependencyInjection /// private void FillParametrizedFieldsAndProperties(object instance) { - if (instance != null) + if (instance != null!) { foreach (var property in instance.GetType().GetProperties(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.FlattenHierarchy)) { var attr = property.GetCustomAttribute(); - if (attr != null) + if (attr != null!) { var parameterType = attr.Type ?? property.PropertyType; var parameterName = attr.Name ?? property.Name; @@ -1125,7 +1129,7 @@ namespace ZeroLevel.DependencyInjection foreach (var field in instance.GetType().GetFields(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.FlattenHierarchy)) { var attr = field.GetCustomAttribute(); - if (attr != null) + if (attr != null!) { var parameterType = attr.Type ?? field.FieldType; var parameterName = string.IsNullOrWhiteSpace(attr.Name) ? field.Name : attr.Name; @@ -1137,7 +1141,7 @@ namespace ZeroLevel.DependencyInjection private void ComposeParts(object instance) { - if (instance != null) + if (instance != null!) { var resolve_properties = CollectResolvingProperties(instance.GetType()); var resolve_fields = CollectResolvingFields(instance.GetType()); @@ -1153,13 +1157,13 @@ namespace ZeroLevel.DependencyInjection f.GetCustomAttribute()); f.SetValue(instance, resolve_instance); } + FillParametrizedFieldsAndProperties(instance); } - FillParametrizedFieldsAndProperties(instance); } private void RecursiveCompose(object instance, HashSet set) { - if (instance != null) + if (instance != null!) { foreach (var f in instance.GetType().GetFields(BindingFlags.Public | @@ -1178,8 +1182,8 @@ namespace ZeroLevel.DependencyInjection } } } + ComposeParts(instance); } - ComposeParts(instance); } public void Compose(object instance, bool recursive = true) @@ -1229,7 +1233,7 @@ namespace ZeroLevel.DependencyInjection { Log.SystemError(ex, $"[Container] Singletone dispose error. Instance: '{item?.GetType()?.FullName ?? string.Empty}'"); } - if (item!.GenericInstanceCachee != null) + if (item!.GenericInstanceCachee != null!) { foreach (var gitem in item.GenericInstanceCachee.Values) { @@ -1307,7 +1311,7 @@ namespace ZeroLevel.DependencyInjection { if (_everything.Value.ContainsKey(key)) return _everything.Value.Get(key); - return default(T); + return default(T)!; } public T GetOrDefault(string key, T defaultValue) diff --git a/ZeroLevel/Services/DependencyInjection/ContainerFactory.cs b/ZeroLevel/Services/DependencyInjection/ContainerFactory.cs index 733ae4d..9e7d986 100644 --- a/ZeroLevel/Services/DependencyInjection/ContainerFactory.cs +++ b/ZeroLevel/Services/DependencyInjection/ContainerFactory.cs @@ -89,7 +89,7 @@ namespace ZeroLevel.DependencyInjection { return exists; } - return null; + return null!; } public bool Remove(string containerName) diff --git a/ZeroLevel/Services/DependencyInjection/Contracts/IContainerRegister.cs b/ZeroLevel/Services/DependencyInjection/Contracts/IContainerRegister.cs index d5a271a..10b0e82 100644 --- a/ZeroLevel/Services/DependencyInjection/Contracts/IContainerRegister.cs +++ b/ZeroLevel/Services/DependencyInjection/Contracts/IContainerRegister.cs @@ -161,7 +161,7 @@ namespace ZeroLevel.DependencyInjection /// Dependency resolution /// Error handler /// true - registration successfully completed - bool TryRegister(Action fallback = null); + bool TryRegister(Action fallback = null!); /// /// Safe dependency resolution registration @@ -171,7 +171,7 @@ namespace ZeroLevel.DependencyInjection /// Dependency name /// Error handler /// true - registration successfully completed - bool TryRegister(string resolveName, Action fallback = null); + bool TryRegister(string resolveName, Action fallback = null!); /// /// Safe dependency resolution registration @@ -181,7 +181,7 @@ namespace ZeroLevel.DependencyInjection /// true - for singletone /// Error handler /// true - registration successfully completed - bool TryRegister(bool shared, Action fallback = null); + bool TryRegister(bool shared, Action fallback = null!); /// /// Safe dependency resolution registration @@ -192,7 +192,7 @@ namespace ZeroLevel.DependencyInjection /// true - for singletone /// Error handler /// true - registration successfully completed - bool TryRegister(string resolveName, bool shared, Action fallback = null); + bool TryRegister(string resolveName, bool shared, Action fallback = null!); /// /// Safe dependency resolution registration @@ -201,7 +201,7 @@ namespace ZeroLevel.DependencyInjection /// Dependency resolution /// Error handler /// true - registration successfully completed - bool TryRegister(Type contractType, Type implementationType, Action fallback = null); + bool TryRegister(Type contractType, Type implementationType, Action fallback = null!); /// /// Safe dependency resolution registration @@ -211,7 +211,7 @@ namespace ZeroLevel.DependencyInjection /// Dependency name /// Error handler /// true - registration successfully completed - bool TryRegister(Type contractType, Type implementationType, string resolveName, Action fallback = null); + bool TryRegister(Type contractType, Type implementationType, string resolveName, Action fallback = null!); /// /// Safe dependency resolution registration @@ -221,7 +221,7 @@ namespace ZeroLevel.DependencyInjection /// true - for singletone /// Error handler /// true - registration successfully completed - bool TryRegister(Type contractType, Type implementationType, bool shared, Action fallback = null); + bool TryRegister(Type contractType, Type implementationType, bool shared, Action fallback = null!); /// /// Safe dependency resolution registration @@ -232,7 +232,7 @@ namespace ZeroLevel.DependencyInjection /// true - for singletone /// Error handler /// true - registration successfully completed - bool TryRegister(Type contractType, Type implementationType, string resolveName, bool shared, Action fallback = null); + bool TryRegister(Type contractType, Type implementationType, string resolveName, bool shared, Action fallback = null!); #endregion Safe register @@ -246,7 +246,7 @@ namespace ZeroLevel.DependencyInjection /// Ctor args /// Error handler /// true - registration successfully completed - bool TryParameterizedRegister(object[] constructorParameters, Action fallback = null); + bool TryParameterizedRegister(object[] constructorParameters, Action fallback = null!); /// /// Safe dependency resolution registration with constructor parameters @@ -257,7 +257,7 @@ namespace ZeroLevel.DependencyInjection /// Ctor args /// Error handler /// true - registration successfully completed - bool TryParameterizedRegister(string resolveName, object[] constructorParameters, Action fallback = null); + bool TryParameterizedRegister(string resolveName, object[] constructorParameters, Action fallback = null!); /// /// Safe dependency resolution registration with constructor parameters @@ -268,7 +268,7 @@ namespace ZeroLevel.DependencyInjection /// Ctor args /// Error handler /// true - registration successfully completed - bool TryParameterizedRegister(bool shared, object[] constructorParameters, Action fallback = null); + bool TryParameterizedRegister(bool shared, object[] constructorParameters, Action fallback = null!); /// /// Safe dependency resolution registration with constructor parameters @@ -280,7 +280,7 @@ namespace ZeroLevel.DependencyInjection /// Ctor args /// Error handler /// true - registration successfully completed - bool TryParameterizedRegister(string resolveName, bool shared, object[] constructorParameters, Action fallback = null); + bool TryParameterizedRegister(string resolveName, bool shared, object[] constructorParameters, Action fallback = null!); /// /// Safe dependency resolution registration with constructor parameters @@ -290,7 +290,7 @@ namespace ZeroLevel.DependencyInjection /// Ctor args /// Error handler /// true - registration successfully completed - bool TryParameterizedRegister(Type contractType, Type implementationType, object[] constructorParameters, Action fallback = null); + bool TryParameterizedRegister(Type contractType, Type implementationType, object[] constructorParameters, Action fallback = null!); /// /// Safe dependency resolution registration with constructor parameters @@ -301,7 +301,7 @@ namespace ZeroLevel.DependencyInjection /// Ctor args /// Error handler /// true - registration successfully completed - bool TryParameterizedRegister(Type contractType, Type implementationType, string resolveName, object[] constructorParameters, Action fallback = null); + bool TryParameterizedRegister(Type contractType, Type implementationType, string resolveName, object[] constructorParameters, Action fallback = null!); /// /// Safe dependency resolution registration with constructor parameters @@ -312,7 +312,7 @@ namespace ZeroLevel.DependencyInjection /// Ctor args /// Error handler /// true - registration successfully completed - bool TryParameterizedRegister(Type contractType, Type implementationType, bool shared, object[] constructorParameters, Action fallback = null); + bool TryParameterizedRegister(Type contractType, Type implementationType, bool shared, object[] constructorParameters, Action fallback = null!); /// /// Safe dependency resolution registration with constructor parameters @@ -324,7 +324,7 @@ namespace ZeroLevel.DependencyInjection /// Ctor args /// Error handler /// true - registration successfully completed - bool TryParameterizedRegister(Type contractType, Type implementationType, string resolveName, bool shared, object[] constructorParameters, Action fallback = null); + bool TryParameterizedRegister(Type contractType, Type implementationType, string resolveName, bool shared, object[] constructorParameters, Action fallback = null!); #endregion Safe register with parameters } diff --git a/ZeroLevel/Services/DependencyInjection/Internal/ConstructorMetadata.cs b/ZeroLevel/Services/DependencyInjection/Internal/ConstructorMetadata.cs index 74e7a48..834e77b 100644 --- a/ZeroLevel/Services/DependencyInjection/Internal/ConstructorMetadata.cs +++ b/ZeroLevel/Services/DependencyInjection/Internal/ConstructorMetadata.cs @@ -25,17 +25,17 @@ namespace ZeroLevel.DependencyInjection var parameterAttribute = p.GetCustomAttribute(); var resolveAttribute = p.GetCustomAttribute(); - var kind = (parameterAttribute != null) ? ConstructorParameterKind.Parameter : - (resolveAttribute != null) ? ConstructorParameterKind.Dependency : ConstructorParameterKind.None; + var kind = (parameterAttribute != null!) ? ConstructorParameterKind.Parameter : + (resolveAttribute != null!) ? ConstructorParameterKind.Dependency : ConstructorParameterKind.None; return new ConstructorParameter { Type = p.ParameterType, ParameterKind = kind, - ParameterResolveName = (kind == ConstructorParameterKind.Parameter) ? parameterAttribute?.Name ?? p.Name : - (kind == ConstructorParameterKind.Dependency) ? resolveAttribute?.ResolveName : null, + ParameterResolveName = ((kind == ConstructorParameterKind.Parameter) ? parameterAttribute?.Name ?? p.Name : + (kind == ConstructorParameterKind.Dependency) ? resolveAttribute?.ResolveName : null)!, ParameterResolveType = (kind == ConstructorParameterKind.Parameter) ? parameterAttribute?.Type ?? p.ParameterType : - (kind == ConstructorParameterKind.Dependency) ? resolveAttribute?.ContractType ?? p.ParameterType : null, + (kind == ConstructorParameterKind.Dependency) ? resolveAttribute?.ContractType ?? p.ParameterType : null!, IsNullable = IsNullable(p.ParameterType) }; }).ToList(); @@ -44,7 +44,7 @@ namespace ZeroLevel.DependencyInjection private static bool IsNullable(Type type) { if (!type.IsValueType) return true; // ref-type - if (Nullable.GetUnderlyingType(type) != null) return true; // Nullable + if (Nullable.GetUnderlyingType(type) != null!) return true; // Nullable return false; // value-type } @@ -56,7 +56,7 @@ namespace ZeroLevel.DependencyInjection /// true - if the constructor can be called with the arguments passed public bool IsMatch(object[] args, out object[] parameters) { - parameters = null; + parameters = null!; int arg_index = 0; if (Parameters.Count > 0) { diff --git a/ZeroLevel/Services/DependencyInjection/ParameterAttribute.cs b/ZeroLevel/Services/DependencyInjection/ParameterAttribute.cs index d7e1657..f10d526 100644 --- a/ZeroLevel/Services/DependencyInjection/ParameterAttribute.cs +++ b/ZeroLevel/Services/DependencyInjection/ParameterAttribute.cs @@ -9,7 +9,7 @@ namespace ZeroLevel.DependencyInjection public ParameterAttribute() { - this.Type = null; + this.Type = null!; this.Name = string.Empty; } @@ -21,7 +21,7 @@ namespace ZeroLevel.DependencyInjection public ParameterAttribute(string parameterName) { - this.Type = null; + this.Type = null!; this.Name = parameterName; } diff --git a/ZeroLevel/Services/DependencyInjection/ResolveAttribute.cs b/ZeroLevel/Services/DependencyInjection/ResolveAttribute.cs index 8acb737..759b4e1 100644 --- a/ZeroLevel/Services/DependencyInjection/ResolveAttribute.cs +++ b/ZeroLevel/Services/DependencyInjection/ResolveAttribute.cs @@ -9,12 +9,12 @@ namespace ZeroLevel.DependencyInjection public ResolveAttribute() { - ResolveName = string.Empty; ContractType = null; + ResolveName = string.Empty; ContractType = null!; } public ResolveAttribute(string resolveName) { - ResolveName = resolveName; ContractType = null; + ResolveName = resolveName; ContractType = null!; } public ResolveAttribute(Type contractType) diff --git a/ZeroLevel/Services/Encryption/AesEncryptor.cs b/ZeroLevel/Services/Encryption/AesEncryptor.cs index 37995be..52d62c0 100644 --- a/ZeroLevel/Services/Encryption/AesEncryptor.cs +++ b/ZeroLevel/Services/Encryption/AesEncryptor.cs @@ -17,7 +17,7 @@ namespace ZeroLevel.Services.Encryption #endregion Crypt fields - public AesEncryptor(Stream stream, string password, byte[] salt = null) + public AesEncryptor(Stream stream, string password, byte[] salt = null!) { _aes = Aes.Create(); using (var pdb = new Rfc2898DeriveBytes(password, SALT)) @@ -54,7 +54,7 @@ namespace ZeroLevel.Services.Encryption output.Flush(); } - public static byte[] Encrypt(byte[] plain, string password, byte[] salt = null) + public static byte[] Encrypt(byte[] plain, string password, byte[] salt = null!) { using (var aes = Aes.Create()) { @@ -75,7 +75,7 @@ namespace ZeroLevel.Services.Encryption } } - public static byte[] Encrypt(Stream stream, string password, byte[] salt = null) + public static byte[] Encrypt(Stream stream, string password, byte[] salt = null!) { using (var aes = Aes.Create()) { @@ -96,7 +96,7 @@ namespace ZeroLevel.Services.Encryption } } - public static void Encrypt(Stream inputStream, Stream outputStream, string password, byte[] salt = null) + public static void Encrypt(Stream inputStream, Stream outputStream, string password, byte[] salt = null!) { using (var aes = Aes.Create()) { @@ -113,7 +113,7 @@ namespace ZeroLevel.Services.Encryption } } - public static byte[] Decrypt(byte[] cipher, string password, byte[] salt = null) + public static byte[] Decrypt(byte[] cipher, string password, byte[] salt = null!) { using (var aes = Aes.Create()) { @@ -134,7 +134,7 @@ namespace ZeroLevel.Services.Encryption } } - public static byte[] Decrypt(Stream stream, string password, byte[] salt = null) + public static byte[] Decrypt(Stream stream, string password, byte[] salt = null!) { using (var aes = Aes.Create()) { @@ -155,7 +155,7 @@ namespace ZeroLevel.Services.Encryption } } - public static void Decrypt(Stream inputStream, Stream outputStream, string password, byte[] salt = null) + public static void Decrypt(Stream inputStream, Stream outputStream, string password, byte[] salt = null!) { using (var aes = Aes.Create()) { diff --git a/ZeroLevel/Services/Extensions/ArrayExtensions.cs b/ZeroLevel/Services/Extensions/ArrayExtensions.cs index f8413a5..7df0dfb 100644 --- a/ZeroLevel/Services/Extensions/ArrayExtensions.cs +++ b/ZeroLevel/Services/Extensions/ArrayExtensions.cs @@ -50,12 +50,12 @@ namespace ZeroLevel for (int a = 0; a < array.Length; a++) { - if (array[a].Equals(candidate[0])) + if (array[a]!.Equals(candidate[0])) { int i = 1; for (; i < candidate.Length && (a + i) < array.Length; i++) { - if (false == array[a + i].Equals(candidate[i])) + if (false == array[a + i]!.Equals(candidate[i])) break; } if (i == candidate.Length) diff --git a/ZeroLevel/Services/Extensions/BitArrayExtensions.cs b/ZeroLevel/Services/Extensions/BitArrayExtensions.cs index 55f0c62..667be24 100644 --- a/ZeroLevel/Services/Extensions/BitArrayExtensions.cs +++ b/ZeroLevel/Services/Extensions/BitArrayExtensions.cs @@ -12,7 +12,7 @@ namespace ZeroLevel.Extensions // The bit array converted to an array of bytes. internal static byte[] ToBytes(this FastBitArray bits) { - if (bits == null) return null; + if (bits == null!) return null!; var numBytes = bits.Count / 8; if (bits.Count % 8 != 0) numBytes++; var bytes = new byte[numBytes]; diff --git a/ZeroLevel/Services/Extensions/CollectionComparsionExtensions.cs b/ZeroLevel/Services/Extensions/CollectionComparsionExtensions.cs index a106213..2295aa6 100644 --- a/ZeroLevel/Services/Extensions/CollectionComparsionExtensions.cs +++ b/ZeroLevel/Services/Extensions/CollectionComparsionExtensions.cs @@ -27,7 +27,7 @@ namespace ZeroLevel public int GetHashCode(T obj) { - return obj.GetHashCode(); + return obj?.GetHashCode() ?? 0; } } @@ -36,8 +36,8 @@ namespace ZeroLevel /// public static bool StringEnumerableEquals(this IEnumerable A, IEnumerable B) { - if (A == null && B == null) return true; - if (A == null || B == null) return false; + if (A == null && B == null!) return true; + if (A == null || B == null!) return false; return A.Count() == B.Count() && A.Intersect(B).Count() == B.Count(); } @@ -46,15 +46,15 @@ namespace ZeroLevel /// public static bool NoOrderingEquals(this IEnumerable A, IEnumerable B) { - if (A == null && B == null) return true; - if (A == null || B == null) return false; + if (A == null && B == null!) return true; + if (A == null || B == null!) return false; return A.Count() == B.Count() && A.Intersect(B, new SimpleComparer()).Count() == B.Count(); } public static bool NoOrderingEquals(this IEnumerable A, IEnumerable B, Func comparer) { - if (A == null && B == null) return true; - if (A == null || B == null) return false; + if (A == null && B == null!) return true; + if (A == null || B == null!) return false; return A.Count() == B.Count() && A.Intersect(B, new SimpleComparer(comparer)).Count() == B.Count(); } @@ -63,15 +63,15 @@ namespace ZeroLevel /// public static bool OrderingEquals(this IEnumerable A, IEnumerable B) { - if (A == null && B == null) return true; - if (A == null || B == null) return false; + if (A == null && B == null!) return true; + if (A == null || B == null!) return false; if (A.Count() != B.Count()) return false; var enumA = A.GetEnumerator(); var enumB = B.GetEnumerator(); while (enumA.MoveNext() && enumB.MoveNext()) { - if (enumA.Current == null && enumB.Current == null) continue; - if (enumA.Current == null || enumB.Current == null) return false; + if (enumA.Current == null && enumB.Current == null!) continue; + if (enumA.Current == null || enumB.Current == null!) return false; if (enumA.Current.Equals(enumB.Current) == false) return false; } return true; @@ -79,15 +79,15 @@ namespace ZeroLevel public static bool OrderingEquals(this IEnumerable A, IEnumerable B, Func comparer) { - if (A == null && B == null) return true; - if (A == null || B == null) return false; + if (A == null && B == null!) return true; + if (A == null || B == null!) return false; if (A.Count() != B.Count()) return false; var enumA = A.GetEnumerator(); var enumB = B.GetEnumerator(); while (enumA.MoveNext() && enumB.MoveNext()) { - if (enumA.Current == null && enumB.Current == null) continue; - if (enumA.Current == null || enumB.Current == null) return false; + if (enumA.Current == null && enumB.Current == null!) continue; + if (enumA.Current == null || enumB.Current == null!) return false; if (comparer(enumA.Current, enumB.Current) == false) return false; } return true; @@ -99,10 +99,10 @@ namespace ZeroLevel public static int GetEnumHashCode(this IEnumerable A) { int hc = 0; - if (A != null) + if (A != null!) { foreach (var p in A) - hc ^= p.GetHashCode(); + hc ^= p?.GetHashCode() ?? 0; } return hc; } diff --git a/ZeroLevel/Services/Extensions/EncodingEx.cs b/ZeroLevel/Services/Extensions/EncodingEx.cs index 3c88bf5..8d46529 100644 --- a/ZeroLevel/Services/Extensions/EncodingEx.cs +++ b/ZeroLevel/Services/Extensions/EncodingEx.cs @@ -25,7 +25,7 @@ namespace ZeroLevel.Services.Extensions public EncodingEx(Encoding baseEncoding) : base(baseEncoding.CodePage) { - if (baseEncoding == null) throw new ArgumentNullException("baseEncoding"); + if (baseEncoding == null!) throw new ArgumentNullException("baseEncoding"); _baseEncoding = baseEncoding; } diff --git a/ZeroLevel/Services/Extensions/EndpointExtensions.cs b/ZeroLevel/Services/Extensions/EndpointExtensions.cs index 918f4c1..0384d29 100644 --- a/ZeroLevel/Services/Extensions/EndpointExtensions.cs +++ b/ZeroLevel/Services/Extensions/EndpointExtensions.cs @@ -7,23 +7,23 @@ namespace ZeroLevel.Extensions public const string HTTP_SCHEMA = "http"; public const string HTTPS_SCHEMA = "https"; - public static string ToHttpUrl(this EndPoint endPoint, string schema, string rawUrl = null) + public static string ToHttpUrl(this EndPoint endPoint, string schema, string rawUrl = null!) { if (endPoint is IPEndPoint) { var ipEndPoint = endPoint as IPEndPoint; - return CreateHttpUrl(schema, ipEndPoint.Address.ToString(), ipEndPoint.Port, + return CreateHttpUrl(schema, ipEndPoint?.Address?.ToString() ?? string.Empty, ipEndPoint?.Port ?? 0, rawUrl != null ? rawUrl.TrimStart('/') : string.Empty); } if (endPoint is DnsEndPoint) { var dnsEndpoint = endPoint as DnsEndPoint; - return CreateHttpUrl(schema, dnsEndpoint.Host, dnsEndpoint.Port, + return CreateHttpUrl(schema, dnsEndpoint?.Host ?? string.Empty, dnsEndpoint?.Port ?? 0, rawUrl != null ? rawUrl.TrimStart('/') : string.Empty); } - return null; + return null!; } public static string ToHttpUrl(this EndPoint endPoint, string schema, string formatString, @@ -32,18 +32,18 @@ namespace ZeroLevel.Extensions if (endPoint is IPEndPoint) { var ipEndPoint = endPoint as IPEndPoint; - return CreateHttpUrl(schema, ipEndPoint.Address.ToString(), ipEndPoint.Port, + return CreateHttpUrl(schema, ipEndPoint?.Address?.ToString() ?? string.Empty, ipEndPoint?.Port ?? 0, string.Format(formatString.TrimStart('/'), args)); } if (endPoint is DnsEndPoint) { var dnsEndpoint = endPoint as DnsEndPoint; - return CreateHttpUrl(schema, dnsEndpoint.Host, dnsEndpoint.Port, + return CreateHttpUrl(schema, dnsEndpoint?.Host ?? string.Empty, dnsEndpoint?.Port ?? 0, string.Format(formatString.TrimStart('/'), args)); } - return null; + return null!; } private static string CreateHttpUrl(string schema, string host, int port, string path) diff --git a/ZeroLevel/Services/Extensions/EnumExtensions.cs b/ZeroLevel/Services/Extensions/EnumExtensions.cs index 1176f5d..e5c1830 100644 --- a/ZeroLevel/Services/Extensions/EnumExtensions.cs +++ b/ZeroLevel/Services/Extensions/EnumExtensions.cs @@ -18,13 +18,13 @@ namespace ZeroLevel var type = enumVal.GetType(); var memInfo = type.GetMember(enumVal.ToString()); var attributes = memInfo[0].GetCustomAttributes(typeof(T), false); - return (attributes.Length > 0) ? (T)attributes[0] : null; + return ((attributes.Length > 0) ? (T)attributes[0] : null)!; } public static string Description(this Enum enumVal) { var attr = enumVal.GetAttributeOfType(); - return attr?.Description; + return attr?.Description!; } public static T GetValueFromDescription(string description) @@ -35,7 +35,7 @@ namespace ZeroLevel { var attribute = Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute)) as DescriptionAttribute; - if (attribute != null) + if (attribute != null!) { if (attribute.Description == description) return (T)field.GetValue(null); @@ -47,7 +47,7 @@ namespace ZeroLevel } } throw new ArgumentException("Not found.", nameof(description)); - // or return default(T); + // or return default(T)!; } } } \ No newline at end of file diff --git a/ZeroLevel/Services/Extensions/EnumerableExtensions.cs b/ZeroLevel/Services/Extensions/EnumerableExtensions.cs index 4acd2fc..b5286ab 100644 --- a/ZeroLevel/Services/Extensions/EnumerableExtensions.cs +++ b/ZeroLevel/Services/Extensions/EnumerableExtensions.cs @@ -19,10 +19,10 @@ namespace ZeroLevel public static bool IsEmpty(this IEnumerable collection) { - if (collection == null) + if (collection == null!) return true; var coll = collection as ICollection; - if (coll != null) + if (coll != null!) return coll.Count == 0; return !collection.Any(); } diff --git a/ZeroLevel/Services/Extensions/FPCommon.cs b/ZeroLevel/Services/Extensions/FPCommon.cs index 421f7d4..e8ded4e 100644 --- a/ZeroLevel/Services/Extensions/FPCommon.cs +++ b/ZeroLevel/Services/Extensions/FPCommon.cs @@ -82,12 +82,12 @@ namespace ZeroLevel.Services.Extensions /// public T Match(Func ofLeft, Func ofRight) { - if (ofLeft == null) + if (ofLeft == null!) { throw new ArgumentNullException(nameof(ofLeft)); } - if (ofRight == null) + if (ofRight == null!) { throw new ArgumentNullException(nameof(ofRight)); } @@ -104,12 +104,12 @@ namespace ZeroLevel.Services.Extensions /// public void Match(Action ofLeft, Action ofRight) { - if (ofLeft == null) + if (ofLeft == null!) { throw new ArgumentNullException(nameof(ofLeft)); } - if (ofRight == null) + if (ofRight == null!) { throw new ArgumentNullException(nameof(ofRight)); } @@ -124,9 +124,9 @@ namespace ZeroLevel.Services.Extensions } } - public TL LeftOrDefault() => Match(l => l, r => default(TL)); + public TL LeftOrDefault() => Match(l => l, r => default(TL))!; - public TR RightOrDefault() => Match(l => default(TR), r => r); + public TR RightOrDefault() => Match(l => default(TR), r => r)!; public Either Swap() => Match(Right, Left); diff --git a/ZeroLevel/Services/Extensions/LinqExtension.cs b/ZeroLevel/Services/Extensions/LinqExtension.cs index d32445f..6401488 100644 --- a/ZeroLevel/Services/Extensions/LinqExtension.cs +++ b/ZeroLevel/Services/Extensions/LinqExtension.cs @@ -4,7 +4,7 @@ namespace System.Linq { public static class LinqExtension { - public static void ThrowIfNull(this T val, string message = null) + public static void ThrowIfNull(this T val, string message = null!) { if (null == val) throw new ArgumentNullException(message); @@ -35,11 +35,11 @@ namespace System.Linq } else if (hasLeft) { - yield return new T[] { leftEnumerator.Current, default(T) }; + yield return new T[] { leftEnumerator.Current, default(T)! }; } else if (hasRight) { - yield return new T[] { default(T), rightEnumerator.Current }; + yield return new T[] { default(T)!, rightEnumerator.Current }; } hasLeft = leftEnumerator.MoveNext(); @@ -50,7 +50,7 @@ namespace System.Linq public static IEnumerable DistinctBy (this IEnumerable source, Func keySelector) { - if (source != null) + if (source != null!) { var seenKeys = new HashSet(); foreach (TSource element in source) @@ -78,7 +78,7 @@ namespace System.Linq } public static IEnumerable> Chunkify(this IEnumerable source, int size) { - if (source == null) + if (source == null!) { yield break; } diff --git a/ZeroLevel/Services/Extensions/Monades.cs b/ZeroLevel/Services/Extensions/Monades.cs index 6e32997..98a0801 100644 --- a/ZeroLevel/Services/Extensions/Monades.cs +++ b/ZeroLevel/Services/Extensions/Monades.cs @@ -9,7 +9,7 @@ namespace ZeroLevel public static TResult With(this TInput o, Func evaluator) { if (null != o) return evaluator(o); - return default(TResult); + return default(TResult)!; } #endregion With @@ -25,7 +25,7 @@ namespace ZeroLevel public static TResult Return(this TInput o, Func evaluator) { if (null != o) return evaluator(o); - return default(TResult); + return default(TResult)!; } #endregion Return @@ -44,8 +44,8 @@ namespace ZeroLevel public static TInput If(this TInput o, Predicate evaluator) { - if (null != o) return evaluator(o) ? o : default(TInput); - return default(TInput); + if (null != o) return evaluator(o) ? o : default(TInput)!; + return default(TInput)!; } public static TOutput Either(this TInput o, Func condition, @@ -54,7 +54,7 @@ namespace ZeroLevel public static TOutput Either(this TInput o, Func ifTrue, Func ifFalse) - => o.Either(x => x != null, ifTrue, ifFalse); + => o.Either(x => x != null!, ifTrue, ifFalse); #endregion If diff --git a/ZeroLevel/Services/Extensions/TaskExtension.cs b/ZeroLevel/Services/Extensions/TaskExtension.cs index 1349f51..f529818 100644 --- a/ZeroLevel/Services/Extensions/TaskExtension.cs +++ b/ZeroLevel/Services/Extensions/TaskExtension.cs @@ -7,28 +7,28 @@ namespace ZeroLevel.Services.Extensions { public static T WaitResult(this Task task) { - if (task == null) + if (task == null!) { throw new ArgumentNullException(nameof(task)); } task.Wait(); if (task.IsFaulted) { - if (task.Exception != null) throw task.Exception; + if (task.Exception != null!) throw task.Exception; } return task.Result; } public static void WaitWithoutResult(this Task task) { - if (task == null) + if (task == null!) { throw new ArgumentNullException(nameof(task)); } task.Wait(); if (task.IsFaulted) { - if (task.Exception != null) throw task.Exception; + if (task.Exception != null!) throw task.Exception; } } } diff --git a/ZeroLevel/Services/Extensions/TypeExtensions.cs b/ZeroLevel/Services/Extensions/TypeExtensions.cs index 0e5050b..783ae50 100644 --- a/ZeroLevel/Services/Extensions/TypeExtensions.cs +++ b/ZeroLevel/Services/Extensions/TypeExtensions.cs @@ -20,7 +20,7 @@ namespace ZeroLevel // The value returned contains the StateMachineType property. // Null is returned if the attribute isn't present for the method. var attrib = (AsyncStateMachineAttribute)method.GetCustomAttribute(attType); - return (attrib != null); + return (attrib != null!); } public static object GetDefault(this Type type) @@ -29,12 +29,12 @@ namespace ZeroLevel { return Activator.CreateInstance(type); } - return null; + return null!; } public static object GetPropValue(this object src, string propName) { - return src?.GetType()?.GetProperty(propName)?.GetValue(src, null); + return (src?.GetType()?.GetProperty(propName)?.GetValue(src, null))!; } public static bool IsAssignableToGenericType(this Type givenType, Type genericType) @@ -51,7 +51,7 @@ namespace ZeroLevel return true; Type baseType = givenType.BaseType; - if (baseType == null) return false; + if (baseType == null!) return false; return IsAssignableToGenericType(baseType, genericType); } diff --git a/ZeroLevel/Services/Fiber.cs b/ZeroLevel/Services/Fiber.cs index fa29ff8..ab95b46 100644 --- a/ZeroLevel/Services/Fiber.cs +++ b/ZeroLevel/Services/Fiber.cs @@ -12,8 +12,8 @@ namespace ZeroLevel.Services public Step _next; } - Step _head = null; - Step _tail = null; + Step _head = null!; + Step _tail = null!; public Fiber() { @@ -21,13 +21,13 @@ namespace ZeroLevel.Services public Fiber Add(Func action) { - if (_head == null) + if (_head == null!) { - _head = _tail = new Step { _handler = action, _next = null }; + _head = _tail = new Step { _handler = action, _next = null! }; } else { - var s = new Step { _handler = action, _next = null }; + var s = new Step { _handler = action, _next = null! }; _tail._next = s; _tail = s; } @@ -36,16 +36,16 @@ namespace ZeroLevel.Services public IEnumerable> Iterate() { - if (_head == null) yield break; + if (_head == null!) yield break; var current = _head; - while (current != null) + while (current != null!) { yield return current._handler; current = current._next; } } - public IEverythingStorage Run(IEverythingStorage buffer = null) + public IEverythingStorage Run(IEverythingStorage buffer = null!) { var storage = buffer; foreach (var a in Iterate()) diff --git a/ZeroLevel/Services/FileSystem/BigFileParser.cs b/ZeroLevel/Services/FileSystem/BigFileParser.cs index 3512a81..7f2e883 100644 --- a/ZeroLevel/Services/FileSystem/BigFileParser.cs +++ b/ZeroLevel/Services/FileSystem/BigFileParser.cs @@ -16,7 +16,7 @@ namespace ZeroLevel.Services.FileSystem { throw new ArgumentNullException(nameof(filePath)); } - if (parser == null) + if (parser == null!) { throw new ArgumentNullException(nameof(parser)); } @@ -42,10 +42,10 @@ namespace ZeroLevel.Services.FileSystem { string line; buffer = new T[batchSize]; - while ((line = sr.ReadLine()) != null) + while ((line = sr.ReadLine()) != null!) { var value = _parser.Invoke(line); - if (skipNull && value == null) continue; + if (skipNull && value == null!) continue; buffer[buffer_index] = value; buffer_index++; if (buffer_index >= batchSize) @@ -77,7 +77,7 @@ namespace ZeroLevel.Services.FileSystem using (StreamReader sr = new StreamReader(bs)) { string line; - while ((line = sr.ReadLine()) != null) + while ((line = sr.ReadLine()) != null!) { yield return _parser.Invoke(line); } diff --git a/ZeroLevel/Services/FileSystem/FSUtils.cs b/ZeroLevel/Services/FileSystem/FSUtils.cs index 844a656..aa0d148 100644 --- a/ZeroLevel/Services/FileSystem/FSUtils.cs +++ b/ZeroLevel/Services/FileSystem/FSUtils.cs @@ -42,7 +42,7 @@ namespace ZeroLevel.Services.FileSystem return folderName; } - public static string GetAppLocalDbDirectory(string dbFolderName = null) + public static string GetAppLocalDbDirectory(string dbFolderName = null!) { dbFolderName = Path.Combine(Configuration.BaseDirectory, dbFolderName ?? "db"); if (false == Directory.Exists(dbFolderName)) @@ -153,7 +153,7 @@ namespace ZeroLevel.Services.FileSystem /// public static string PathCorrection(string path) { - if (path == null) return string.Empty; + if (path == null!) return string.Empty; var result = new char[path.Length]; var index = 0; foreach (char c in path) @@ -173,7 +173,7 @@ namespace ZeroLevel.Services.FileSystem /// public static string FileNameCorrection(string name, bool isRootPath = false) { - if (name == null) return string.Empty; + if (name == null!) return string.Empty; // The reserved filenames if (StartWithInvalidWindowsPrefix(name)) { @@ -207,7 +207,7 @@ namespace ZeroLevel.Services.FileSystem /// public static string FileNameCorrection(string name, char replacedSymbol, bool isRootPath = false) { - if (name == null) return string.Empty; + if (name == null!) return string.Empty; if (_invalid_filename_characters.IndexOf(replacedSymbol) >= 0) { throw new ArgumentException($"The sybmol '{replacedSymbol}' is invalid for windows filenames"); @@ -250,7 +250,7 @@ namespace ZeroLevel.Services.FileSystem /// public static string FileNameCorrection(string path, char replaceChar) { - if (path == null) return string.Empty; + if (path == null!) return string.Empty; var result = new char[path.Length]; var index = 0; foreach (char c in path) @@ -286,7 +286,7 @@ namespace ZeroLevel.Services.FileSystem } finally { - if (fileStream != null) + if (fileStream != null!) { fileStream.Close(); fileStream.Dispose(); @@ -309,7 +309,7 @@ namespace ZeroLevel.Services.FileSystem } finally { - if (fileStream != null) + if (fileStream != null!) { fileStream.Close(); fileStream.Dispose(); @@ -319,14 +319,14 @@ namespace ZeroLevel.Services.FileSystem return false; } - public static void PackFolder(string sourceFolder, string zipPath, Func selector = null) + public static void PackFolder(string sourceFolder, string zipPath, Func selector = null!) { var tmp = FSUtils.GetAppLocalTemporaryDirectory(); var tmpDir = Directory.CreateDirectory(tmp); var files = new DirectoryInfo(sourceFolder) .GetFiles("*.*", SearchOption.AllDirectories) .AsEnumerable(); - if (selector != null) + if (selector != null!) { files = files.Where(selector); } diff --git a/ZeroLevel/Services/FileSystem/FileArchive.cs b/ZeroLevel/Services/FileSystem/FileArchive.cs index 323149e..2310e6f 100644 --- a/ZeroLevel/Services/FileSystem/FileArchive.cs +++ b/ZeroLevel/Services/FileSystem/FileArchive.cs @@ -237,7 +237,7 @@ namespace ZeroLevel.Services.FileSystem /// Text /// Archive file name (HH_mm_ss_fff_counter.{ext} by default) /// - public void StoreText(string text, string subfolder_name = null, string file_name = null) + public void StoreText(string text, string subfolder_name = null!, string file_name = null!) { Apply(new StoreText(text, CreateArchiveFilePath(subfolder_name, file_name))); } @@ -248,12 +248,12 @@ namespace ZeroLevel.Services.FileSystem /// File path /// Archive file name (original file name by default) /// - public void Store(string file_path, string subfolder_name = null, string file_name = null) + public void Store(string file_path, string subfolder_name = null!, string file_name = null!) { Apply(new StoreFile(file_path, CreateArchiveFilePath(subfolder_name, file_name))); } - public void Store(string file_path, bool immediate, string subfolder_name = null, string file_name = null) + public void Store(string file_path, bool immediate, string subfolder_name = null!, string file_name = null!) { if (immediate) { @@ -271,7 +271,7 @@ namespace ZeroLevel.Services.FileSystem /// Data stream for reading /// Archive file name (HH_mm_ss_fff_counter.{ext} by default) /// - public void Store(Stream stream, string subfolder_name = null, string file_name = null) + public void Store(Stream stream, string subfolder_name = null!, string file_name = null!) { Apply(new StoreStream(stream, CreateArchiveFilePath(subfolder_name, file_name))); } @@ -282,7 +282,7 @@ namespace ZeroLevel.Services.FileSystem /// Data /// Archive file name (HH_mm_ss_fff_counter.{ext} by default) /// - public void StoreData(byte[] data, string subfolder_name = null, string file_name = null) + public void StoreData(byte[] data, string subfolder_name = null!, string file_name = null!) { Apply(new StoreData(data, CreateArchiveFilePath(subfolder_name, file_name))); } @@ -410,7 +410,7 @@ namespace ZeroLevel.Services.FileSystem /// Text /// Archive file name (HH_mm_ss_fff_counter.{ext} by default) /// - public void StoreText(string text, string name = null) + public void StoreText(string text, string name = null!) { Apply(new StoreText(text, CreateArchiveFilePath(name))); } @@ -421,7 +421,7 @@ namespace ZeroLevel.Services.FileSystem /// File path /// Archive file name (original file name by default) /// - public void Store(string file_path, string name = null) + public void Store(string file_path, string name = null!) { Apply(new StoreFile(file_path, CreateArchiveFilePath(name))); } @@ -432,7 +432,7 @@ namespace ZeroLevel.Services.FileSystem /// File path /// Archive file name (original file name by default) /// - public void Store(string file_path, bool immediate, string name = null) + public void Store(string file_path, bool immediate, string name = null!) { if (immediate) { @@ -450,7 +450,7 @@ namespace ZeroLevel.Services.FileSystem /// Data stream for reading /// Archive file name (HH_mm_ss_fff_counter.{ext} by default) /// - public void Store(Stream stream, string name = null) + public void Store(Stream stream, string name = null!) { Apply(new StoreStream(stream, CreateArchiveFilePath(name))); } @@ -461,7 +461,7 @@ namespace ZeroLevel.Services.FileSystem /// Data /// Archive file name (HH_mm_ss_fff_counter.{ext} by default) /// - public void StoreData(byte[] data, string name = null) + public void StoreData(byte[] data, string name = null!) { Apply(new StoreData(data, CreateArchiveFilePath(name))); } diff --git a/ZeroLevel/Services/FileSystem/PeriodicFileSystemWatcher.cs b/ZeroLevel/Services/FileSystem/PeriodicFileSystemWatcher.cs index a0f4926..56ed2e2 100644 --- a/ZeroLevel/Services/FileSystem/PeriodicFileSystemWatcher.cs +++ b/ZeroLevel/Services/FileSystem/PeriodicFileSystemWatcher.cs @@ -24,7 +24,7 @@ namespace ZeroLevel.Services.FileSystem private readonly bool _useSubdirectories = false; public PeriodicFileSystemWatcher(TimeSpan period, string watch_folder, string temp_folder, Action callback - , IEnumerable extensions = null + , IEnumerable extensions = null! , bool removeTempFileAfterCallback = false , bool useSubdirectories = false) { @@ -32,7 +32,7 @@ namespace ZeroLevel.Services.FileSystem { throw new ArgumentNullException(nameof(watch_folder)); } - if (callback == null) + if (callback == null!) { throw new ArgumentNullException(nameof(callback)); } @@ -141,7 +141,7 @@ namespace ZeroLevel.Services.FileSystem /// private string MoveToTemporary(string from) { - if (from == null) + if (from == null!) { throw new ArgumentException("from"); } @@ -156,7 +156,7 @@ namespace ZeroLevel.Services.FileSystem File.Delete(from); return tempFile; } - return null; + return null!; } /// @@ -164,14 +164,14 @@ namespace ZeroLevel.Services.FileSystem /// private static string TrySolveCollision(string file) { - if (file == null) + if (file == null!) { throw new ArgumentNullException("file"); } string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(file); string extension = Path.GetExtension(file); string directoryName = Path.GetDirectoryName(file); - if (directoryName != null) + if (directoryName != null!) { int num = 0; do @@ -200,17 +200,17 @@ namespace ZeroLevel.Services.FileSystem { files = Directory.GetFiles(_sourceFolder, "*.*", _useSubdirectories ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly) ?.Where(f => _extensions.Contains(Path.GetExtension(f).ToLowerInvariant())) - ?.ToArray(); + ?.ToArray()!; } else { files = Directory.GetFiles(_sourceFolder, "*.*", _useSubdirectories ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly); } - if (files != null) + if (files != null!) { Array.Sort(files, FileNameSortCompare); } - return files; + return files!; } /// diff --git a/ZeroLevel/Services/HashFunctions/StringHash.cs b/ZeroLevel/Services/HashFunctions/StringHash.cs index 9fddb0a..0764bbc 100644 --- a/ZeroLevel/Services/HashFunctions/StringHash.cs +++ b/ZeroLevel/Services/HashFunctions/StringHash.cs @@ -12,7 +12,7 @@ { int hash1 = (5381 << 16) + 5381; int hash2 = hash1; - if (str != null) + if (str != null!) { for (int i = 0; i < str.Length; i += 2) { diff --git a/ZeroLevel/Services/IL.cs b/ZeroLevel/Services/IL.cs index 2a62ba6..7721ceb 100644 --- a/ZeroLevel/Services/IL.cs +++ b/ZeroLevel/Services/IL.cs @@ -48,7 +48,7 @@ namespace ZeroLevel.Services // Поле для хранения метода обратного вызова _callbackField = _typeBuilder.DefineField("_callbackHandler", CreateDecorateMethodCallHandlerDelegate(_moduleBuilder), FieldAttributes.Private); _interfaces = interfaces; - _parentType = parentType; + _parentType = parentType!; } /// /// Собирает конечный тип @@ -105,7 +105,7 @@ namespace ZeroLevel.Services list.AddRange(_interfaces); list.AddRange(GetInterfaces(_interfaces)); } - if (_parentType != null) + if (_parentType != null!) { list.AddRange(GetInterfaces(new Type[] { _parentType })); } @@ -152,7 +152,7 @@ namespace ZeroLevel.Services /// private void ProceedParentAbstractMethods() { - if (_parentType != null) + if (_parentType != null!) { foreach (var method in _parentType.GetMethods()) { diff --git a/ZeroLevel/Services/Invokation/InvokeWrapper.cs b/ZeroLevel/Services/Invokation/InvokeWrapper.cs index 6cb11ab..0bdd4f4 100644 --- a/ZeroLevel/Services/Invokation/InvokeWrapper.cs +++ b/ZeroLevel/Services/Invokation/InvokeWrapper.cs @@ -109,6 +109,7 @@ namespace ZeroLevel.Services.Invokation BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy)?.Select(CreateCompiledExpression); + if (result == null) return Enumerable.Empty(); Configure(result); return result.Select(r => r.Item1).ToList(); } @@ -121,6 +122,7 @@ namespace ZeroLevel.Services.Invokation BindingFlags.NonPublic | BindingFlags.FlattenHierarchy)?.Where(m => m.Name.Equals(methodName)) ?.Select(CreateCompiledExpression); + if (result == null) return Enumerable.Empty(); Configure(result); return result.Select(r => r.Item1).ToList(); } @@ -133,6 +135,7 @@ namespace ZeroLevel.Services.Invokation BindingFlags.NonPublic | BindingFlags.FlattenHierarchy)?.Where(m => m.Name.Equals(methodName)) ?.Select(method => method.MakeGenericMethod(typeof(T))).Select(CreateCompiledExpression); + if (result == null) return Enumerable.Empty(); Configure(result); return result.Select(r => r.Item1).ToList(); } @@ -145,6 +148,7 @@ namespace ZeroLevel.Services.Invokation BindingFlags.NonPublic | BindingFlags.FlattenHierarchy)?.Where(m => m.Name.Equals(methodName)) ?.Select(method => method.MakeGenericMethod(genericType)).Select(CreateCompiledExpression); + if (result == null) return Enumerable.Empty(); Configure(result); return result.Select(r => r.Item1).ToList(); } @@ -157,12 +161,9 @@ namespace ZeroLevel.Services.Invokation BindingFlags.NonPublic | BindingFlags.FlattenHierarchy)?.Where(filter) ?.Select(method => method.MakeGenericMethod(typeof(T))).Select(CreateCompiledExpression); - if (result != null) - { - Configure(result); - return result.Select(r => r.Item1).ToList(); - } - return Enumerable.Empty(); + if (result == null) return Enumerable.Empty(); + Configure(result); + return result.Select(r => r.Item1).ToList(); } public IEnumerable ConfigureGeneric(Type instanceType, Type genericType, Func filter) @@ -173,12 +174,9 @@ namespace ZeroLevel.Services.Invokation BindingFlags.NonPublic | BindingFlags.FlattenHierarchy)?.Where(filter) ?.Select(method => method.MakeGenericMethod(genericType)).Select(CreateCompiledExpression); - if (result != null) - { - Configure(result); - return result.Select(r => r.Item1).ToList(); - } - return Enumerable.Empty(); + if (result == null) return Enumerable.Empty(); + Configure(result); + return result.Select(r => r.Item1).ToList(); } public IEnumerable Configure(Type instanceType, Func filter) @@ -189,12 +187,9 @@ namespace ZeroLevel.Services.Invokation BindingFlags.NonPublic | BindingFlags.FlattenHierarchy)?.Where(filter) ?.Select(CreateCompiledExpression); - if (result != null) - { - Configure(result); - return result.Select(r => r.Item1).ToList(); - } - return Enumerable.Empty(); + if (result == null) return Enumerable.Empty(); + Configure(result); + return result.Select(r => r.Item1).ToList(); } #endregion Configure by Type @@ -274,7 +269,7 @@ namespace ZeroLevel.Services.Invokation { if (_invokeCachee.ContainsKey(identity)) { - return _invokeCachee[identity](null, args); + return _invokeCachee[identity](null!, args); } throw new KeyNotFoundException(String.Format("Not found method with identity '{0}'", identity)); @@ -301,7 +296,7 @@ namespace ZeroLevel.Services.Invokation { if (_invokeCachee.ContainsKey(identity)) { - return _invokeCachee[identity](target, null); + return _invokeCachee[identity](target, null!); } throw new KeyNotFoundException($"Not found method with identity '{identity}'"); @@ -345,7 +340,7 @@ namespace ZeroLevel.Services.Invokation return _invokeCachee[identity]; } - return null; + return null!; } /// diff --git a/ZeroLevel/Services/Logging/Implementation/EncryptedFileLog.cs b/ZeroLevel/Services/Logging/Implementation/EncryptedFileLog.cs index 6efb184..1be406b 100644 --- a/ZeroLevel/Services/Logging/Implementation/EncryptedFileLog.cs +++ b/ZeroLevel/Services/Logging/Implementation/EncryptedFileLog.cs @@ -10,7 +10,7 @@ namespace ZeroLevel.Logging { public EncryptedFileLogOptions() { - Folder = null; + Folder = null!; LimitFileSize = 0; } @@ -77,7 +77,7 @@ namespace ZeroLevel.Logging public EncryptedFileLog(EncryptedFileLogOptions options) { - if (options == null) + if (options == null!) throw new ArgumentNullException(nameof(options)); if (string.IsNullOrEmpty(options.Key)) throw new ArgumentNullException("options.Key"); @@ -120,7 +120,7 @@ namespace ZeroLevel.Logging } catch { - if (stream != null) + if (stream != null!) { stream.Dispose(); } @@ -134,10 +134,10 @@ namespace ZeroLevel.Logging /// private void CloseCurrentWriter() { - if (_writer != null) + if (_writer != null!) { _writer.Dispose(); - _writer = null; + _writer = null!; } } diff --git a/ZeroLevel/Services/Logging/Implementation/TextFileLogger.cs b/ZeroLevel/Services/Logging/Implementation/TextFileLogger.cs index 35127c7..864aadf 100644 --- a/ZeroLevel/Services/Logging/Implementation/TextFileLogger.cs +++ b/ZeroLevel/Services/Logging/Implementation/TextFileLogger.cs @@ -13,7 +13,7 @@ namespace ZeroLevel.Logging { public TextFileLoggerOptions() { - Folder = null; + Folder = null!; LimitFileSize = 0; TextEncoding = DEFAULT_ENCODING; RemoveOlderThen = TimeSpan.MinValue; @@ -211,7 +211,7 @@ namespace ZeroLevel.Logging file.Delete(); } }); - dir = null; + dir = null!; } catch { } } @@ -221,12 +221,12 @@ namespace ZeroLevel.Logging /// private void CloseCurrentWriter() { - if (_writer != null) + if (_writer != null!) { _writer.Flush(); _writer.Close(); _writer.Dispose(); - _writer = null; + _writer = null!; } } @@ -266,7 +266,7 @@ namespace ZeroLevel.Logging { RecreateLogFile(); } - fi = null; + fi = null!; } /// @@ -278,18 +278,18 @@ namespace ZeroLevel.Logging { var nextFileName = GetNextFileName(); CloseCurrentWriter(); - Stream stream = null; + Stream stream = null!; PackOldLogFile(_currentLogFile); try { _currentLogFile = nextFileName; stream = new FileStream(_currentLogFile, FileMode.Append, FileAccess.Write, FileShare.Read); _writer = new StreamWriter(stream, _options.TextEncoding); - stream = null; + stream = null!; } catch { - if (stream != null) + if (stream != null!) { stream.Dispose(); } @@ -316,7 +316,7 @@ namespace ZeroLevel.Logging } reader.Close(); } - buffer = null; + buffer = null!; } stream.Close(); } @@ -419,27 +419,27 @@ namespace ZeroLevel.Logging /// private void CloseCurrentWriter() { - if (_writer != null) + if (_writer != null!) { _writer.Flush(); _writer.Close(); _writer.Dispose(); - _writer = null; + _writer = null!; } } private void CreateLogFile(string path) { - Stream stream = null; + Stream stream = null!; try { stream = new FileStream(path, FileMode.Append, FileAccess.Write, FileShare.Read); _writer = new StreamWriter(stream, DEFAULT_ENCODING); - stream = null; + stream = null!; } catch { - if (stream != null) + if (stream != null!) { stream.Dispose(); } diff --git a/ZeroLevel/Services/Logging/Log.cs b/ZeroLevel/Services/Logging/Log.cs index d14a351..64c4b4d 100644 --- a/ZeroLevel/Services/Logging/Log.cs +++ b/ZeroLevel/Services/Logging/Log.cs @@ -206,7 +206,7 @@ namespace ZeroLevel { return; } - string logPath = null; + string logPath = null!; if (config.Contains("log")) { logPath = config.First("log"); @@ -218,7 +218,7 @@ namespace ZeroLevel if (false == string.IsNullOrWhiteSpace(logPath)) { var options = TextFileLoggerOptions.CreateOptionsBy(config, logPath, log_section ? string.Empty : "log."); - if (options != null) + if (options != null!) { AddTextFileLogger(options); } diff --git a/ZeroLevel/Services/Logging/LogRouterr.cs b/ZeroLevel/Services/Logging/LogRouterr.cs index 8e508dc..8e42f6c 100644 --- a/ZeroLevel/Services/Logging/LogRouterr.cs +++ b/ZeroLevel/Services/Logging/LogRouterr.cs @@ -53,7 +53,7 @@ namespace ZeroLevel.Logging _messageQueue.Push(t.Item1, t.Item2); } currentQueue.Dispose(); - currentQueue = null; + currentQueue = null!; GC.Collect(); GC.WaitForFullGCComplete(); } @@ -64,7 +64,7 @@ namespace ZeroLevel.Logging while (false == _stopped || _messageQueue.Count > 0) { var message = _messageQueue.Take(); - if (message != null) + if (message != null!) { lock (LogsCacheeLocker) { @@ -79,7 +79,7 @@ namespace ZeroLevel.Logging } } } - message = null; + message = null!; } } } diff --git a/ZeroLevel/Services/Mathemathics/Histogram.cs b/ZeroLevel/Services/Mathemathics/Histogram.cs index 1c975b0..ba031ce 100644 --- a/ZeroLevel/Services/Mathemathics/Histogram.cs +++ b/ZeroLevel/Services/Mathemathics/Histogram.cs @@ -74,7 +74,7 @@ namespace ZeroLevel.Mathemathics { if ((Values?.Length ?? 0) <= 2) return 0; int i = 0; - while (Values[i] <= float.Epsilon) { i++; continue; } + while (Values![i] <= float.Epsilon) { i++; continue; } if ((Values.Length - i) <= 2) return 0; var delta = Values[i + 1] - Values[i]; @@ -112,7 +112,7 @@ namespace ZeroLevel.Mathemathics if ((Values?.Length ?? 0) <= 2) return list; int i = 0; - while (Values[i] <= float.Epsilon) { i++; continue; } + while (Values![i] <= float.Epsilon) { i++; continue; } if ((Values.Length - i) <= 2) return list; var delta = Values[i + 1] - Values[i]; @@ -144,15 +144,15 @@ namespace ZeroLevel.Mathemathics public int GetMaximum() { - if ((Values?.Length ?? 0) <= 1) return Values[0]; + if ((Values?.Length ?? 0) <= 1) return Values![0]!; int maxi = 0; int max = 0; - for (int i = 0; i < Values.Length; i++) + for (int i = 0; i < (Values?.Length ?? 0); i++) { - if (Values[i] > max) + if (Values![i] > max) { max = Values[i]; - maxi = i; + maxi = i; } } return maxi; diff --git a/ZeroLevel/Services/Memory/MMFViewAccessor.cs b/ZeroLevel/Services/Memory/MMFViewAccessor.cs index bd17fe9..2acaa54 100644 --- a/ZeroLevel/Services/Memory/MMFViewAccessor.cs +++ b/ZeroLevel/Services/Memory/MMFViewAccessor.cs @@ -34,7 +34,7 @@ namespace ZeroLevel.Services.Memory public async Task ReadBuffer(int count) { - if (count == 0) return null; + if (count == 0) return null!; var buffer = new byte[count]; var readedCount = await _accessor.ReadAsync(buffer, 0, count); if (count != readedCount) diff --git a/ZeroLevel/Services/Memory/StreamVewAccessor.cs b/ZeroLevel/Services/Memory/StreamVewAccessor.cs index ade51cf..d9c470a 100644 --- a/ZeroLevel/Services/Memory/StreamVewAccessor.cs +++ b/ZeroLevel/Services/Memory/StreamVewAccessor.cs @@ -25,7 +25,7 @@ namespace ZeroLevel.Services.Memory public async Task ReadBuffer(int count) { - if (count == 0) return null; + if (count == 0) return null!; var buffer = new byte[count]; var readedCount = await _stream.ReadAsync(buffer, 0, count); if (count != readedCount) diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Aggregate.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Aggregate.cs index e3d680c..0958719 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Aggregate.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Aggregate.cs @@ -6,12 +6,12 @@ namespace MemoryPools.Collections.Linq { public static TSource Aggregate(this IPoolingEnumerable source, Func func) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } - if (func == null) + if (func == null!) { throw new ArgumentNullException(nameof(func)); } @@ -34,12 +34,12 @@ namespace MemoryPools.Collections.Linq public static TAccumulate Aggregate(this IPoolingEnumerable source, TAccumulate seed, Func func) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } - if (func == null) + if (func == null!) { throw new ArgumentNullException(nameof(func)); } @@ -55,17 +55,17 @@ namespace MemoryPools.Collections.Linq public static TResult Aggregate(this IPoolingEnumerable source, TAccumulate seed, Func func, Func resultSelector) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } - if (func == null) + if (func == null!) { throw new ArgumentNullException(nameof(func)); } - if (resultSelector == null) + if (resultSelector == null!) { throw new ArgumentNullException(nameof(resultSelector)); } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Append.Enumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Append.Enumerable.cs index dc74331..b07ac1f 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Append.Enumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Append.Enumerable.cs @@ -27,8 +27,8 @@ _count--; if (_count == 0) { - _src = default; - _element = default; + _src = default!; + _element = default!; Pool>.Return(this); } } @@ -72,16 +72,16 @@ _src.Reset(); } - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public T Current => _overcount == 1 ? _element : (T) _src.Current; public void Dispose() { _parent?.Dispose(); - _parent = null; + _parent = null!; _src?.Dispose(); - _src = default; + _src = default!; Pool.Return(this); } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Average.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Average.cs index 6228c5d..9d2116b 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Average.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Average.cs @@ -9,7 +9,7 @@ namespace MemoryPools.Collections.Linq /// public static double Average(this IPoolingEnumerable source) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } @@ -41,7 +41,7 @@ namespace MemoryPools.Collections.Linq /// public static double? Average(this IPoolingEnumerable source) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } @@ -73,7 +73,7 @@ namespace MemoryPools.Collections.Linq } } - return null; + return null!; } /// @@ -81,7 +81,7 @@ namespace MemoryPools.Collections.Linq /// public static double Average(this IPoolingEnumerable source) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } @@ -113,7 +113,7 @@ namespace MemoryPools.Collections.Linq /// public static double? Average(this IPoolingEnumerable source) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } @@ -145,7 +145,7 @@ namespace MemoryPools.Collections.Linq } } - return null; + return null!; } /// @@ -153,7 +153,7 @@ namespace MemoryPools.Collections.Linq /// public static float Average(this IPoolingEnumerable source) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } @@ -182,7 +182,7 @@ namespace MemoryPools.Collections.Linq /// public static float? Average(this IPoolingEnumerable source) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } @@ -214,7 +214,7 @@ namespace MemoryPools.Collections.Linq } } - return null; + return null!; } /// @@ -222,7 +222,7 @@ namespace MemoryPools.Collections.Linq /// public static double Average(this IPoolingEnumerable source) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } @@ -254,7 +254,7 @@ namespace MemoryPools.Collections.Linq /// public static double? Average(this IPoolingEnumerable source) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } @@ -286,7 +286,7 @@ namespace MemoryPools.Collections.Linq } } - return null; + return null!; } /// @@ -294,7 +294,7 @@ namespace MemoryPools.Collections.Linq /// public static decimal Average(this IPoolingEnumerable source) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } @@ -323,7 +323,7 @@ namespace MemoryPools.Collections.Linq /// public static decimal? Average(this IPoolingEnumerable source) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } @@ -352,7 +352,7 @@ namespace MemoryPools.Collections.Linq } } - return null; + return null!; } /// @@ -360,12 +360,12 @@ namespace MemoryPools.Collections.Linq /// public static double Average(this IPoolingEnumerable source, Func selector) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } - if (selector == null) + if (selector == null!) { throw new ArgumentNullException(nameof(selector)); } @@ -397,12 +397,12 @@ namespace MemoryPools.Collections.Linq /// public static double? Average(this IPoolingEnumerable source, Func selector) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } - if (selector == null) + if (selector == null!) { throw new ArgumentNullException(nameof(selector)); } @@ -434,7 +434,7 @@ namespace MemoryPools.Collections.Linq } } - return null; + return null!; } /// @@ -442,12 +442,12 @@ namespace MemoryPools.Collections.Linq /// public static double Average(this IPoolingEnumerable source, Func selector) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } - if (selector == null) + if (selector == null!) { throw new ArgumentNullException(nameof(selector)); } @@ -479,12 +479,12 @@ namespace MemoryPools.Collections.Linq /// public static double? Average(this IPoolingEnumerable source, Func selector) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } - if (selector == null) + if (selector == null!) { throw new ArgumentNullException(nameof(selector)); } @@ -516,7 +516,7 @@ namespace MemoryPools.Collections.Linq } } - return null; + return null!; } /// @@ -524,12 +524,12 @@ namespace MemoryPools.Collections.Linq /// public static float Average(this IPoolingEnumerable source, Func selector) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } - if (selector == null) + if (selector == null!) { throw new ArgumentNullException(nameof(selector)); } @@ -558,12 +558,12 @@ namespace MemoryPools.Collections.Linq /// public static float? Average(this IPoolingEnumerable source, Func selector) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } - if (selector == null) + if (selector == null!) { throw new ArgumentNullException(nameof(selector)); } @@ -595,7 +595,7 @@ namespace MemoryPools.Collections.Linq } } - return null; + return null!; } /// @@ -603,12 +603,12 @@ namespace MemoryPools.Collections.Linq /// public static double Average(this IPoolingEnumerable source, Func selector) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } - if (selector == null) + if (selector == null!) { throw new ArgumentNullException(nameof(selector)); } @@ -640,12 +640,12 @@ namespace MemoryPools.Collections.Linq /// public static double? Average(this IPoolingEnumerable source, Func selector) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } - if (selector == null) + if (selector == null!) { throw new ArgumentNullException(nameof(selector)); } @@ -677,7 +677,7 @@ namespace MemoryPools.Collections.Linq } } - return null; + return null!; } /// @@ -685,12 +685,12 @@ namespace MemoryPools.Collections.Linq /// public static decimal Average(this IPoolingEnumerable source, Func selector) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } - if (selector == null) + if (selector == null!) { throw new ArgumentNullException(nameof(selector)); } @@ -719,12 +719,12 @@ namespace MemoryPools.Collections.Linq /// public static decimal? Average(this IPoolingEnumerable source, Func selector) { - if (source == null) + if (source == null!) { throw new ArgumentNullException(nameof(source)); } - if (selector == null) + if (selector == null!) { throw new ArgumentNullException(nameof(selector)); } @@ -753,7 +753,7 @@ namespace MemoryPools.Collections.Linq } } - return null; + return null!; } } } \ No newline at end of file diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Cast.Enumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Cast.Enumerable.cs index 5c60674..8df3b06 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Cast.Enumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Cast.Enumerable.cs @@ -25,7 +25,7 @@ _count--; if (_count == 0) { - _src = default; + _src = default!; Pool>.Return(this); } } @@ -52,16 +52,16 @@ _src.Reset(); } - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public T Current => (T)_src.Current; public void Dispose() { _parent?.Dispose(); - _parent = null; + _parent = null!; _src?.Dispose(); - _src = default; + _src = default!; Pool.Return(this); } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Concat.Enumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Concat.Enumerable.cs index d1c5358..7a8f759 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Concat.Enumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Concat.Enumerable.cs @@ -25,8 +25,8 @@ _count--; if (_count == 0) { - _src = default; - _second = default; + _src = default!; + _second = default!; Pool>.Return(this); } } @@ -69,18 +69,18 @@ _second.Reset(); } - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public T Current => _first ? _src.Current : _second.Current; public void Dispose() { _parent?.Dispose(); - _parent = default; + _parent = default!; _src?.Dispose(); - _src = default; + _src = default!; _second?.Dispose(); - _second = default; + _second = default!; Pool.Return(this); } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Distinct.Enumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Distinct.Enumerable.cs index 649eaff..2342c12 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Distinct.Enumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Distinct.Enumerable.cs @@ -11,7 +11,7 @@ namespace MemoryPools.Collections.Linq private IEqualityComparer _comparer; private Func _selector; - public DistinctExprEnumerable Init(IPoolingEnumerator parent, Func selector, IEqualityComparer comparer = default) + public DistinctExprEnumerable Init(IPoolingEnumerator parent, Func selector, IEqualityComparer comparer = default!) { _parent = parent; _selector = selector; @@ -33,8 +33,8 @@ namespace MemoryPools.Collections.Linq if (_count == 0) { _parent?.Dispose(); - _parent = default; - _selector = default; + _parent = default!; + _selector = default!; Pool>.Return(this); } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Except.Enumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Except.Enumerable.cs index 79f841b..975e5cc 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Except.Enumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Except.Enumerable.cs @@ -10,7 +10,7 @@ namespace MemoryPools.Collections.Linq private IEqualityComparer _comparer; private PoolingDictionary _except; - public ExceptExprEnumerable Init(IPoolingEnumerable src, PoolingDictionary except, IEqualityComparer comparer = default) + public ExceptExprEnumerable Init(IPoolingEnumerable src, PoolingDictionary except, IEqualityComparer comparer = default!) { _src = src; _except = except; @@ -31,11 +31,11 @@ namespace MemoryPools.Collections.Linq _count--; if (_count == 0) { - _src = default; + _src = default!; _except?.Dispose(); - Pool>.Return(_except); - _except = default; - Pool>.Return(this); + Pool>.Return(_except!); + _except = default!; + Pool>.Return(this!); } } internal class ExceptExprEnumerator : IPoolingEnumerator @@ -63,17 +63,17 @@ namespace MemoryPools.Collections.Linq public void Reset() => _src.Reset(); - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public T Current => _src.Current; public void Dispose() { _src?.Dispose(); - _src = null; + _src = null!; _parent?.Dispose(); - _parent = default; + _parent = default!; Pool.Return(this); } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/FirstFirstOrDefault.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/FirstFirstOrDefault.cs index fe888ae..f66e68a 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/FirstFirstOrDefault.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/FirstFirstOrDefault.cs @@ -19,7 +19,7 @@ namespace MemoryPools.Collections.Linq enumerator.Dispose(); return element; } - + /// /// Gets first element from sequence by given . Complexity = O(1) - O(N) /// @@ -38,7 +38,7 @@ namespace MemoryPools.Collections.Linq enumerator.Dispose(); throw new InvalidOperationException("Sequence is empty"); } - + /// /// Gets first element from sequence by given . Complexity = O(1) - O(N) /// @@ -48,7 +48,7 @@ namespace MemoryPools.Collections.Linq while (enumerator.MoveNext()) { if (!condition(context, enumerator.Current)) continue; - + var item = enumerator.Current; enumerator.Dispose(); return item; @@ -56,7 +56,7 @@ namespace MemoryPools.Collections.Linq enumerator.Dispose(); throw new InvalidOperationException("Sequence is empty"); } - + /// /// Gets first element from sequence. Complexity = O(1) /// @@ -65,12 +65,12 @@ namespace MemoryPools.Collections.Linq var enumerator = source.GetEnumerator(); var hasItem = enumerator.MoveNext(); - var item= hasItem ? enumerator.Current : default; + var item = hasItem ? enumerator.Current : default; enumerator.Dispose(); - return item; + return item!; } - + /// /// Gets first element from sequence by given . Complexity = O(1) - O(N) /// @@ -80,15 +80,15 @@ namespace MemoryPools.Collections.Linq while (enumerator.MoveNext()) { if (!condition(enumerator.Current)) continue; - + var elem = enumerator.Current; enumerator.Dispose(); return elem; } enumerator.Dispose(); - return default; + return default!; } - + /// /// Gets first element from sequence by given . Complexity = O(1) - O(N) /// @@ -98,13 +98,13 @@ namespace MemoryPools.Collections.Linq while (enumerator.MoveNext()) { if (!condition(context, enumerator.Current)) continue; - + var elem = enumerator.Current; enumerator.Dispose(); return elem; } enumerator.Dispose(); - return default; + return default!; } } } \ No newline at end of file diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/GenericEnumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/GenericEnumerable.cs index e455503..6858650 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/GenericEnumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/GenericEnumerable.cs @@ -16,7 +16,7 @@ namespace MemoryPools.Collections.Linq public IPoolingEnumerator GetEnumerator() { var enumerator = _enumerable.GetEnumerator(); - _enumerable = default; + _enumerable = default!; Pool>.Return(this); return Pool>.Get().Init(enumerator); } @@ -39,7 +39,7 @@ namespace MemoryPools.Collections.Linq public IEnumerator GetEnumerator() { var enumerator = _enumerable.GetEnumerator(); - _enumerable = default; + _enumerable = default!; Pool>.Return(this); return Pool>.Get().Init(enumerator); } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/GenericPoolingEnumerator.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/GenericPoolingEnumerator.cs index 20f0d4b..c1ed556 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/GenericPoolingEnumerator.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/GenericPoolingEnumerator.cs @@ -17,14 +17,14 @@ namespace MemoryPools.Collections.Linq public void Reset() => _source.Reset(); - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public T Current => _source.Current; public void Dispose() { _source.Dispose(); - _source = default; + _source = default!; Pool>.Return(this); } } @@ -43,14 +43,14 @@ namespace MemoryPools.Collections.Linq public void Reset() => _source.Reset(); - object IEnumerator.Current => Current; + object IEnumerator.Current => Current!; public T Current => _source.Current; public void Dispose() { _source.Dispose(); - _source = default; + _source = default!; Pool>.Return(this); } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/GroupBy.Enumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/GroupBy.Enumerable.cs index 776a59c..8e674c1 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/GroupBy.Enumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/GroupBy.Enumerable.cs @@ -53,9 +53,9 @@ namespace MemoryPools.Collections.Linq if (_count == 0) { - _comparer = default; - _elementSelector = default; - _keySelector = default; + _comparer = default!; + _elementSelector = default!; + _keySelector = default!; Pool>.Return(this); } } @@ -89,16 +89,16 @@ namespace MemoryPools.Collections.Linq // cleanup collection _src?.Dispose(); - Pool>.Return(_src); - _src = default; + Pool>.Return(_src!); + _src = default!; _enumerator?.Dispose(); - _enumerator = default; + _enumerator = default!; _parent?.Dispose(); - _parent = default; + _parent = default!; - Pool.Return(this); + Pool.Return(this!); } public bool MoveNext() => _enumerator.MoveNext(); @@ -107,7 +107,7 @@ namespace MemoryPools.Collections.Linq public IPoolingGrouping Current => _enumerator.Current.Value; - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; } internal class PoolingGrouping : IPoolingGrouping, IDisposable @@ -132,10 +132,10 @@ namespace MemoryPools.Collections.Linq public void Dispose() { _elements?.Dispose(); - Pool>.Return(_elements); - _elements = null; + Pool>.Return(_elements!); + _elements = null!; - Key = default; + Key = default!; } } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/GroupBy.ResultEnumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/GroupBy.ResultEnumerable.cs index 300f9a6..80e29b8 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/GroupBy.ResultEnumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/GroupBy.ResultEnumerable.cs @@ -53,9 +53,9 @@ namespace MemoryPools.Collections.Linq if (_count == 0) { - _comparer = default; - _resultSelector = default; - _keySelector = default; + _comparer = default!; + _resultSelector = default!; + _keySelector = default!; Pool>.Return(this); } } @@ -89,14 +89,14 @@ namespace MemoryPools.Collections.Linq // cleanup collection _src?.Dispose(); - Pool>.Return(_src); - _src = default; + Pool>.Return(_src!); + _src = default!; _enumerator?.Dispose(); - _enumerator = default; + _enumerator = default!; _parent?.Dispose(); - _parent = default; + _parent = default!; Pool.Return(this); } @@ -107,7 +107,7 @@ namespace MemoryPools.Collections.Linq public TResult Current => _parent._resultSelector(_enumerator.Current.Key, _enumerator.Current.Value.InternalList); - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; } internal class PoolingGrouping : IPoolingGrouping, IDisposable @@ -132,10 +132,10 @@ namespace MemoryPools.Collections.Linq public void Dispose() { _elements?.Dispose(); - Pool>.Return(_elements); - _elements = null; + Pool>.Return(_elements!); + _elements = null!; - Key = default; + Key = default!; } } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/GroupBy.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/GroupBy.cs index e340855..c8c9439 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/GroupBy.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/GroupBy.cs @@ -6,19 +6,19 @@ namespace MemoryPools.Collections.Linq public static partial class PoolingEnumerable { public static IPoolingEnumerable> GroupBy(this IPoolingEnumerable source, Func keySelector) => - Pool>.Get().Init(source, keySelector, x => x, null); + Pool>.Get().Init(source, keySelector, x => x, null!); public static IPoolingEnumerable> GroupBy(this IPoolingEnumerable source, Func keySelector, IEqualityComparer comparer) => Pool>.Get().Init(source, keySelector, x => x, comparer); public static IPoolingEnumerable> GroupBy(this IPoolingEnumerable source, Func keySelector, Func elementSelector) => - Pool>.Get().Init(source, keySelector, elementSelector, null); + Pool>.Get().Init(source, keySelector, elementSelector, null!); public static IPoolingEnumerable> GroupBy(this IPoolingEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer comparer) => Pool>.Get().Init(source, keySelector, elementSelector, comparer); public static IPoolingEnumerable GroupBy(this IPoolingEnumerable source, Func keySelector, Func, TResult> resultSelector) => - Pool>.Get().Init(source, keySelector, resultSelector, null); + Pool>.Get().Init(source, keySelector, resultSelector, null!); // public static IPoolingEnumerable GroupBy(this IEnumerable source, Func keySelector, Func elementSelector, Func, TResult> resultSelector) => // new GroupedResultEnumerable(source, keySelector, elementSelector, resultSelector, null); diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Intersect.Enumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Intersect.Enumerable.cs index 0bdaad9..84ee1a1 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Intersect.Enumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Intersect.Enumerable.cs @@ -13,7 +13,7 @@ namespace MemoryPools.Collections.Linq public IntersectExprEnumerable Init( IPoolingEnumerable src, PoolingDictionary second, - IEqualityComparer comparer = default) + IEqualityComparer comparer = default!) { _src = src; _count = 0; @@ -34,11 +34,11 @@ namespace MemoryPools.Collections.Linq _count--; if (_count == 0) { - _src = default; + _src = default!; _second?.Dispose(); - Pool>.Return(_second); + Pool>.Return(_second!); - _second = default; + _second = default!; Pool>.Return(this); } } @@ -74,23 +74,23 @@ namespace MemoryPools.Collections.Linq public void Reset() => _src.Reset(); - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public T Current => _src.Current; public void Dispose() { _src?.Dispose(); - _src = null; + _src = null!; _alreadyDoneItems?.Dispose(); - Pool>.Return(_alreadyDoneItems); - _alreadyDoneItems = default; + Pool>.Return(_alreadyDoneItems!); + _alreadyDoneItems = default!; _parent?.Dispose(); - _parent = default; + _parent = default!; - Pool.Return(this); + Pool.Return(this!); } } IPoolingEnumerator IPoolingEnumerable.GetEnumerator() => GetEnumerator(); diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Join.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Join.cs index 3cda8d1..3e1435c 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Join.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Join.cs @@ -9,27 +9,27 @@ // Func innerKeySelector, // Func resultSelector) // { - // if (outer == null) + // if (outer == null!) // { // throw new ArgumentNullException(nameof(outer)); // } // - // if (inner == null) + // if (inner == null!) // { // throw new ArgumentNullException(nameof(inner)); // } // - // if (outerKeySelector == null) + // if (outerKeySelector == null!) // { // throw new ArgumentNullException(nameof(outerKeySelector)); // } // - // if (innerKeySelector == null) + // if (innerKeySelector == null!) // { // throw new ArgumentNullException(nameof(innerKeySelector)); // } // - // if (resultSelector == null) + // if (resultSelector == null!) // { // throw new ArgumentNullException(nameof(resultSelector)); // } @@ -45,27 +45,27 @@ // Func resultSelector, // IEqualityComparer comparer) // { - // if (outer == null) + // if (outer == null!) // { // throw new ArgumentNullException(nameof(outer)); // } // - // if (inner == null) + // if (inner == null!) // { // throw new ArgumentNullException(nameof(inner)); // } // - // if (outerKeySelector == null) + // if (outerKeySelector == null!) // { // throw new ArgumentNullException(nameof(outerKeySelector)); // } // - // if (innerKeySelector == null) + // if (innerKeySelector == null!) // { // throw new ArgumentNullException(nameof(innerKeySelector)); // } // - // if (resultSelector == null) + // if (resultSelector == null!) // { // throw new ArgumentNullException(nameof(resultSelector)); // } @@ -93,7 +93,7 @@ // { // TOuter item = e.Current; // Grouping g = lookup.GetGrouping(outerKeySelector(item), create: false); - // if (g != null) + // if (g != null!) // { // int count = g._count; // TInner[] elements = g._elements; diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/LastLastOrDefault.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/LastLastOrDefault.cs index b145d18..bdab87e 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/LastLastOrDefault.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/LastLastOrDefault.cs @@ -7,7 +7,7 @@ namespace MemoryPools.Collections.Linq public static T Last(this IPoolingEnumerable source) { var enumerator = source.GetEnumerator(); - T element = default; + T element = default!; var hasItems = false; while (enumerator.MoveNext()) { @@ -21,7 +21,7 @@ namespace MemoryPools.Collections.Linq public static T Last(this IPoolingEnumerable source, Func condition) { var enumerator = source.GetEnumerator(); - T element = default; + T element = default!; var hasItems = false; while (enumerator.MoveNext()) { @@ -37,7 +37,7 @@ namespace MemoryPools.Collections.Linq public static T Last(this IPoolingEnumerable source, TContext context, Func condition) { var enumerator = source.GetEnumerator(); - T element = default; + T element = default!; var hasItems = false; while (enumerator.MoveNext()) { @@ -53,7 +53,7 @@ namespace MemoryPools.Collections.Linq public static T LastOrDefault(this IPoolingEnumerable source) { var enumerator = source.GetEnumerator(); - T element = default; + T element = default!; var hasItems = false; while (enumerator.MoveNext()) { @@ -61,13 +61,13 @@ namespace MemoryPools.Collections.Linq hasItems = true; } enumerator.Dispose(); - return hasItems ? element : default; + return hasItems ? element : default!; } public static T LastOrDefault(this IPoolingEnumerable source, Func condition) { var enumerator = source.GetEnumerator(); - T element = default; + T element = default!; var hasItems = false; while (enumerator.MoveNext()) { @@ -77,13 +77,13 @@ namespace MemoryPools.Collections.Linq hasItems = true; } enumerator.Dispose(); - return hasItems ? element : default; + return (hasItems ? element : default)!; } public static T LastOrDefault(this IPoolingEnumerable source, TContext context, Func condition) { var enumerator = source.GetEnumerator(); - T element = default; + T element = default!; var hasItems = false; while (enumerator.MoveNext()) { @@ -93,7 +93,7 @@ namespace MemoryPools.Collections.Linq hasItems = true; } enumerator.Dispose(); - return hasItems ? element : default; + return (hasItems ? element : default)!; } } } \ No newline at end of file diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/MinMax.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/MinMax.cs index 9d46d3a..5f86a3a 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/MinMax.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/MinMax.cs @@ -7,7 +7,7 @@ namespace MemoryPools.Collections.Linq { public static int Min(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); int value = 0; bool hasValue = false; foreach (int x in source) { @@ -24,8 +24,8 @@ namespace MemoryPools.Collections.Linq } public static int? Min(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); - int? value = null; + if (source == null!) throw new ArgumentNullException(nameof(source)); + int? value = null!; foreach (int? x in source) { if (value == null || x < value) value = x; @@ -34,7 +34,7 @@ namespace MemoryPools.Collections.Linq } public static long Min(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); long value = 0; bool hasValue = false; foreach (long x in source) { @@ -51,8 +51,8 @@ namespace MemoryPools.Collections.Linq } public static long? Min(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); - long? value = null; + if (source == null!) throw new ArgumentNullException(nameof(source)); + long? value = null!; foreach (long? x in source) { if (value == null || x < value) value = x; } @@ -60,7 +60,7 @@ namespace MemoryPools.Collections.Linq } public static float Min(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); float value = 0; bool hasValue = false; foreach (float x in source) { @@ -83,17 +83,17 @@ namespace MemoryPools.Collections.Linq } public static float? Min(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); - float? value = null; + if (source == null!) throw new ArgumentNullException(nameof(source)); + float? value = null!; foreach (float? x in source) { - if (x == null) continue; + if (x == null!) continue; if (value == null || x < value || System.Single.IsNaN((float)x)) value = x; } return value; } public static double Min(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); double value = 0; bool hasValue = false; foreach (double x in source) { @@ -110,17 +110,17 @@ namespace MemoryPools.Collections.Linq } public static double? Min(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); - double? value = null; + if (source == null!) throw new ArgumentNullException(nameof(source)); + double? value = null!; foreach (double? x in source) { - if (x == null) continue; + if (x == null!) continue; if (value == null || x < value || Double.IsNaN((double)x)) value = x; } return value; } public static decimal Min(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); decimal value = 0; bool hasValue = false; foreach (decimal x in source) { @@ -137,8 +137,8 @@ namespace MemoryPools.Collections.Linq } public static decimal? Min(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); - decimal? value = null; + if (source == null!) throw new ArgumentNullException(nameof(source)); + decimal? value = null!; foreach (decimal? x in source) { if (value == null || x < value) value = x; } @@ -146,15 +146,15 @@ namespace MemoryPools.Collections.Linq } public static TSource Min(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); var comparer = Comparer.Default; var value = default(TSource); - if (value == null) { + if (value == null!) { foreach (var x in source) { if (x != null && (value == null || comparer.Compare(x, value) < 0)) value = x; } - return value; + return value!; } bool hasValue = false; @@ -217,7 +217,7 @@ namespace MemoryPools.Collections.Linq } public static int Max(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); int value = 0; bool hasValue = false; foreach (int x in source) { @@ -234,8 +234,8 @@ namespace MemoryPools.Collections.Linq } public static int? Max(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); - int? value = null; + if (source == null!) throw new ArgumentNullException(nameof(source)); + int? value = null!; foreach (int? x in source) { if (value == null || x > value) value = x; } @@ -243,7 +243,7 @@ namespace MemoryPools.Collections.Linq } public static long Max(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); long value = 0; bool hasValue = false; foreach (long x in source) { @@ -260,8 +260,8 @@ namespace MemoryPools.Collections.Linq } public static long? Max(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); - long? value = null; + if (source == null!) throw new ArgumentNullException(nameof(source)); + long? value = null!; foreach (long? x in source) { if (value == null || x > value) value = x; } @@ -269,7 +269,7 @@ namespace MemoryPools.Collections.Linq } public static double Max(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); double value = 0; bool hasValue = false; foreach (double x in source) { @@ -286,17 +286,17 @@ namespace MemoryPools.Collections.Linq } public static double? Max(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); - double? value = null; + if (source == null!) throw new ArgumentNullException(nameof(source)); + double? value = null!; foreach (double? x in source) { - if (x == null) continue; + if (x == null!) continue; if (value == null || x > value || Double.IsNaN((double)value)) value = x; } return value; } public static float Max(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); float value = 0; bool hasValue = false; foreach (float x in source) { @@ -313,17 +313,17 @@ namespace MemoryPools.Collections.Linq } public static float? Max(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); - float? value = null; + if (source == null!) throw new ArgumentNullException(nameof(source)); + float? value = null!; foreach (float? x in source) { - if (x == null) continue; + if (x == null!) continue; if (value == null || x > value || System.Single.IsNaN((float)value)) value = x; } return value; } public static decimal Max(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); decimal value = 0; bool hasValue = false; foreach (decimal x in source) { @@ -340,8 +340,8 @@ namespace MemoryPools.Collections.Linq } public static decimal? Max(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); - decimal? value = null; + if (source == null!) throw new ArgumentNullException(nameof(source)); + decimal? value = null!; foreach (decimal? x in source) { if (value == null || x > value) value = x; } @@ -349,10 +349,10 @@ namespace MemoryPools.Collections.Linq } public static TSource Max(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); Comparer comparer = Comparer.Default; - TSource value = default; - if (value == null) { + TSource value = default!; + if (value == null!) { foreach (TSource x in source) { if (x != null && (value == null || comparer.Compare(x, value) > 0)) value = x; diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/OfType.Enumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/OfType.Enumerable.cs index e9d7b47..d19a056 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/OfType.Enumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/OfType.Enumerable.cs @@ -25,7 +25,7 @@ _count--; if (_count == 0) { - _src = default; + _src = default!; Pool>.Return(this); } } @@ -58,16 +58,16 @@ _src.Reset(); } - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public T Current => (T)_src.Current; public void Dispose() { _parent?.Dispose(); - _parent = null; + _parent = null!; _src?.Dispose(); - _src = default; + _src = default!; Pool.Return(this); } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Prepend.Enumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Prepend.Enumerable.cs index ad530dd..497ae09 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Prepend.Enumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Prepend.Enumerable.cs @@ -27,8 +27,8 @@ _count--; if (_count == 0) { - _src = default; - _element = default; + _src = default!; + _element = default!; Pool>.Return(this); } } @@ -68,16 +68,16 @@ _src.Reset(); } - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public T Current => _shouldReturnElement ? _element : (T) _src.Current; public void Dispose() { _parent?.Dispose(); - _parent = null; + _parent = null!; _src?.Dispose(); - _src = default; + _src = default!; _first = _shouldReturnElement = false; Pool.Return(this); } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Reverse.Enumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Reverse.Enumerable.cs index 24bc0f1..aa7fd00 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Reverse.Enumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Reverse.Enumerable.cs @@ -27,9 +27,9 @@ namespace MemoryPools.Collections.Linq if (_count == 0) { _src?.Dispose(); - Pool>.Return(_src); - _src = default; - Pool>.Return(this); + Pool>.Return(_src!); + _src = default!; + Pool>.Return(this!); } } @@ -56,16 +56,16 @@ namespace MemoryPools.Collections.Linq public void Reset() => _position = _src.Count; - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public T Current => _src[_position]; public void Dispose() { _parent?.Dispose(); - _parent = default; - _src = default; - _position = default; + _parent = default!; + _src = default!; + _position = default!; Pool.Return(this); } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Select.Enumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Select.Enumerable.cs index f6a3cba..12e2228 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Select.Enumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Select.Enumerable.cs @@ -28,9 +28,9 @@ namespace MemoryPools.Collections.Linq _count--; if (_count == 0) { - _src = default; + _src = default!; _count = 0; - _mutator = default; + _mutator = default!; Pool>.Return(this); } } @@ -53,16 +53,16 @@ namespace MemoryPools.Collections.Linq public void Reset() => _src.Reset(); - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public TR Current => _mutator( _src.Current); public void Dispose() { _parent?.Dispose(); - _parent = default; + _parent = default!; _src?.Dispose(); - _src = default; + _src = default!; Pool.Return(this); } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Select.WithContextEnumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Select.WithContextEnumerable.cs index 669b6f8..5a65b00 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Select.WithContextEnumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Select.WithContextEnumerable.cs @@ -32,9 +32,9 @@ namespace MemoryPools.Collections.Linq if (_count == 0) { - _src = default; - _context = default; - _condition = default; + _src = default!; + _context = default!; + _condition = default!; Pool>.Return(this); } } @@ -62,17 +62,17 @@ namespace MemoryPools.Collections.Linq public bool MoveNext() => _src.MoveNext(); public void Reset() => _src.Reset(); - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public TR Current => _condition(_context, _src.Current); public void Dispose() { _parent?.Dispose(); - _parent = default; + _parent = default!; _src?.Dispose(); - _src = default; - _context = default; + _src = default!; + _context = default!; Pool.Return(this); } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/SelectMany.ExprEnumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/SelectMany.ExprEnumerable.cs index 85401ac..0e6fc76 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/SelectMany.ExprEnumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/SelectMany.ExprEnumerable.cs @@ -28,9 +28,9 @@ namespace MemoryPools.Collections.Linq _count--; if (_count == 0) { - _src = default; + _src = default!; _count = 0; - _mutator = default; + _mutator = default!; Pool>.Return(this); } } @@ -52,7 +52,7 @@ namespace MemoryPools.Collections.Linq _finished = false; _parent = parent; _mutator = mutator; - _currentEnumerator = default; + _currentEnumerator = default!; return this; } @@ -86,24 +86,24 @@ namespace MemoryPools.Collections.Linq public void Reset() { _currentEnumerator?.Dispose(); - _currentEnumerator = default; + _currentEnumerator = default!; _src.Reset(); } - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public TR Current => _currentEnumerator.Current; public void Dispose() { _currentEnumerator?.Dispose(); - _currentEnumerator = default; + _currentEnumerator = default!; _parent?.Dispose(); - _parent = default; + _parent = default!; _src.Dispose(); - _src = default; + _src = default!; Pool.Return(this); } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/SelectMany.ExprWithContextEnumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/SelectMany.ExprWithContextEnumerable.cs index 74827cf..e491787 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/SelectMany.ExprWithContextEnumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/SelectMany.ExprWithContextEnumerable.cs @@ -33,10 +33,10 @@ namespace MemoryPools.Collections.Linq _count--; if (_count == 0) { - _src = default; + _src = default!; _count = 0; - _context = default; - _mutator = default; + _context = default!; + _mutator = default!; Pool>.Return(this); } } @@ -61,7 +61,7 @@ namespace MemoryPools.Collections.Linq _parent = parent; _mutator = mutator; _context = context; - _currentEnumerator = default; + _currentEnumerator = default!; return this; } @@ -95,24 +95,24 @@ namespace MemoryPools.Collections.Linq public void Reset() { _currentEnumerator?.Dispose(); - _currentEnumerator = default; + _currentEnumerator = default!; _src.Reset(); } - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public TR Current => _currentEnumerator.Current; public void Dispose() { _currentEnumerator?.Dispose(); - _currentEnumerator = default; + _currentEnumerator = default!; _parent?.Dispose(); - _parent = default; + _parent = default!; _src.Dispose(); - _src = default; + _src = default!; Pool.Return(this); } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/SimpleExpressions.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/SimpleExpressions.cs index 5f4fc8c..a52b31f 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/SimpleExpressions.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/SimpleExpressions.cs @@ -5,9 +5,9 @@ namespace MemoryPools.Collections.Linq { public static partial class PoolingEnumerable { - public static IPoolingEnumerable Empty() => Range(0,0).Select(x => (T)(object)x); + public static IPoolingEnumerable Empty() => Range(0, 0).Select(x => (T)(object)x); - public static IPoolingEnumerable Range(int startIndex, int count) + public static IPoolingEnumerable Range(int startIndex, int count) { return Pool.Get().Init(startIndex, count); } @@ -21,147 +21,147 @@ namespace MemoryPools.Collections.Linq public static bool Contains(this IPoolingEnumerable self, T element) { - foreach (var item in self) - { - if (item.Equals(element)) return true; - } + foreach (var item in self) + { + if (item?.Equals(element) ?? false) return true; + } - return false; + return false; } public static int Count(this IPoolingEnumerable self) { - var count = 0; - foreach (var _ in self) - { - count++; - } - return count; + var count = 0; + foreach (var _ in self) + { + count++; + } + return count; } public static long LongCount(this IPoolingEnumerable self) { - long count = 0; - foreach (var _ in self) - { - count++; - } - return count; + long count = 0; + foreach (var _ in self) + { + count++; + } + return count; } public static T ElementAt(this IPoolingEnumerable self, int position) { - var i = 0; - foreach (var item in self) - { - if (i == position) return item; - i++; - } - - throw new InvalidOperationException("Sequence is too small. Index not found"); + var i = 0; + foreach (var item in self) + { + if (i == position) return item; + i++; + } + + throw new InvalidOperationException("Sequence is too small. Index not found"); } public static bool SequenceEqual(this IPoolingEnumerable self, IPoolingEnumerable other) { - var comparer = EqualityComparer.Default; - using (var left = self.GetEnumerator()) - using (var right = other.GetEnumerator()) - { - bool equals, leftHas, rightHas; - - do - { - leftHas = left.MoveNext(); - rightHas = right.MoveNext(); - equals = comparer.Equals(left.Current, right.Current); - - if (leftHas != rightHas || !equals) return false; - } while (leftHas && rightHas); - - return !leftHas && !rightHas; - } + var comparer = EqualityComparer.Default; + using (var left = self.GetEnumerator()) + using (var right = other.GetEnumerator()) + { + bool equals, leftHas, rightHas; + + do + { + leftHas = left.MoveNext(); + rightHas = right.MoveNext(); + equals = comparer.Equals(left.Current, right.Current); + + if (leftHas != rightHas || !equals) return false; + } while (leftHas && rightHas); + + return !leftHas && !rightHas; + } } } internal class RangeExprEnumerable : IPoolingEnumerable - { - private int _start; - private int _workCount; - private int _count; - - public RangeExprEnumerable Init(int start, int count) + { + private int _start; + private int _workCount; + private int _count; + + public RangeExprEnumerable Init(int start, int count) + { + _start = start; + _workCount = count; + _count = 0; + return this; + } + + public IPoolingEnumerator GetEnumerator() + { + _count++; + return Pool.Get().Init(this, _start, _workCount); + } + + private void Dispose() + { + if (_count == 0) return; + _count--; + if (_count == 0) { - _start = start; - _workCount = count; - _count = 0; - return this; - } - - public IPoolingEnumerator GetEnumerator() - { - _count++; - return Pool.Get().Init(this, _start, _workCount); - } - - private void Dispose() - { - if (_count == 0) return; - _count--; - if (_count == 0) - { - _start = _workCount = 0; - _count = 0; - Pool.Return(this); - } - } - - internal class RangeExprEnumerator : IPoolingEnumerator + _start = _workCount = 0; + _count = 0; + Pool.Return(this); + } + } + + internal class RangeExprEnumerator : IPoolingEnumerator + { + private int _start; + private int _current; + private int _workCount; + private RangeExprEnumerable _parent; + + public RangeExprEnumerator Init(RangeExprEnumerable parent, int start, int workCount) { - private int _start; - private int _current; - private int _workCount; - private RangeExprEnumerable _parent; - - public RangeExprEnumerator Init(RangeExprEnumerable parent, int start, int workCount) - { - _current = -1; - _start = start; - _workCount = workCount; - _parent = parent; - return this; - } - - public bool MoveNext() + _current = -1; + _start = start; + _workCount = workCount; + _parent = parent; + return this; + } + + public bool MoveNext() + { + if (_current == 0) return false; + if (_current == -1) { - if (_current == 0) return false; - if (_current == -1) - { - _current = _workCount; - return _workCount != 0; - } - - _current--; - return _current != 0; + _current = _workCount; + return _workCount != 0; } - - public void Reset() => _current = _start; - - object IPoolingEnumerator.Current => _current; - - public int Current => _start + (_workCount - _current); - - public void Dispose() - { - _current = -1; - _parent?.Dispose(); - _parent = default; - Pool.Return(this); - } - } - - IPoolingEnumerator IPoolingEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } + + _current--; + return _current != 0; + } + + public void Reset() => _current = _start; + + object IPoolingEnumerator.Current => _current; + + public int Current => _start + (_workCount - _current); + + public void Dispose() + { + _current = -1; + _parent?.Dispose(); + _parent = default!; + Pool.Return(this); + } + } + + IPoolingEnumerator IPoolingEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } } \ No newline at end of file diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/SingleSingleOrDefault.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/SingleSingleOrDefault.cs index 4929a62..932ec61 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/SingleSingleOrDefault.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/SingleSingleOrDefault.cs @@ -21,7 +21,7 @@ namespace MemoryPools.Collections.Linq element = enumerator.Current; } enumerator.Dispose(); - return element; + return element!; } public static T Single(this IPoolingEnumerable source, Func condition) @@ -44,7 +44,7 @@ namespace MemoryPools.Collections.Linq } } enumerator.Dispose(); - return element; + return element!; } public static T Single(this IPoolingEnumerable source, TContext context, Func condition) @@ -67,7 +67,7 @@ namespace MemoryPools.Collections.Linq } } enumerator.Dispose(); - return element; + return element!; } public static T SingleOrDefault(this IPoolingEnumerable source) @@ -80,14 +80,14 @@ namespace MemoryPools.Collections.Linq if (wasFound) { enumerator.Dispose(); - return default; + return default!; } wasFound = true; element = enumerator.Current; } enumerator.Dispose(); - return element; + return element!; } public static T SingleOrDefault(this IPoolingEnumerable source, Func condition) @@ -102,7 +102,7 @@ namespace MemoryPools.Collections.Linq if (wasFound) { enumerator.Dispose(); - return default; + return default!; } wasFound = true; @@ -110,7 +110,7 @@ namespace MemoryPools.Collections.Linq } } enumerator.Dispose(); - return element; + return element!; } public static T SingleOrDefault(this IPoolingEnumerable source, TContext context, Func condition) @@ -125,7 +125,7 @@ namespace MemoryPools.Collections.Linq if (wasFound) { enumerator.Dispose(); - return default; + return default!; } wasFound = true; @@ -133,7 +133,7 @@ namespace MemoryPools.Collections.Linq } } enumerator.Dispose(); - return element; + return element!; } } } \ No newline at end of file diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/SkipTake.ExprPoolingEnumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/SkipTake.ExprPoolingEnumerable.cs index d3c9821..83dc010 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/SkipTake.ExprPoolingEnumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/SkipTake.ExprPoolingEnumerable.cs @@ -28,8 +28,8 @@ _count--; if (_count == 0) { - _source = null; - _take = default; + _source = null!; + _take = default!; Pool>.Return(this); } } @@ -80,17 +80,17 @@ _source.Reset(); } - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public T Current => _source.Current; public void Dispose() { _parent?.Dispose(); - _parent = default; + _parent = default!; _source?.Dispose(); - _source = default; + _source = default!; Pool.Return(this); } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Sum.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Sum.cs index 480ee6e..681fa6c 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Sum.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Sum.cs @@ -6,7 +6,7 @@ namespace MemoryPools.Collections.Linq { public static int Sum(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); int sum = 0; checked { foreach (var v in source) sum += v; @@ -15,18 +15,18 @@ namespace MemoryPools.Collections.Linq } public static int? Sum(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); int sum = 0; checked { foreach (var v in source) { - if (v != null) sum += v.GetValueOrDefault(); + if (v != null!) sum += v.GetValueOrDefault(); } } return sum; } public static long Sum(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); long sum = 0; checked { foreach (long v in source) sum += v; @@ -35,60 +35,60 @@ namespace MemoryPools.Collections.Linq } public static long? Sum(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); long sum = 0; checked { foreach (var v in source) { - if (v != null) sum += v.GetValueOrDefault(); + if (v != null!) sum += v.GetValueOrDefault(); } } return sum; } public static float Sum(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); double sum = 0; foreach (var v in source) sum += v; return (float)sum; } public static float? Sum(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); double sum = 0; foreach (var v in source) { - if (v != null) sum += v.GetValueOrDefault(); + if (v != null!) sum += v.GetValueOrDefault(); } return (float)sum; } public static double Sum(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); double sum = 0; foreach (var v in source) sum += v; return sum; } public static double? Sum(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); double sum = 0; foreach (var v in source) { - if (v != null) sum += v.GetValueOrDefault(); + if (v != null!) sum += v.GetValueOrDefault(); } return sum; } public static decimal Sum(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); decimal sum = 0; foreach (var v in source) sum += v; return sum; } public static decimal? Sum(this IPoolingEnumerable source) { - if (source == null) throw new ArgumentNullException(nameof(source)); + if (source == null!) throw new ArgumentNullException(nameof(source)); decimal sum = 0; foreach (var v in source) { - if (v != null) sum += v.GetValueOrDefault(); + if (v != null!) sum += v.GetValueOrDefault(); } return sum; } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Union.Enumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Union.Enumerable.cs index 5415115..18ea3e5 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Union.Enumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Union.Enumerable.cs @@ -28,10 +28,10 @@ namespace MemoryPools.Collections.Linq if (_count == 0) { _src?.Dispose(); - Pool>.Return(_src); - _src = default; + Pool>.Return(_src!); + _src = default!; - Pool>.Return(this); + Pool>.Return(this!); } } internal class UnionExprEnumerator : IPoolingEnumerator @@ -50,17 +50,17 @@ namespace MemoryPools.Collections.Linq public void Reset() => _src.Reset(); - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public T Current => _src.Current.Key; public void Dispose() { _src?.Dispose(); - _src = null; + _src = null!; _parent?.Dispose(); - _parent = default; + _parent = default!; Pool.Return(this); } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Where.Enumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Where.Enumerable.cs index 0a484e7..581d62a 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Where.Enumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Where.Enumerable.cs @@ -30,8 +30,8 @@ namespace MemoryPools.Collections.Linq if (_count == 0) { - _src = default; - _condition = default; + _src = default!; + _condition = default!; Pool>.Return(this); } } @@ -66,16 +66,16 @@ namespace MemoryPools.Collections.Linq _src.Reset(); } - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public T Current => _src.Current; public void Dispose() { _parent?.Dispose(); - _parent = default; + _parent = default!; _src?.Dispose(); - _src = default; + _src = default!; Pool.Return(this); } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Where.WithContextEnumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Where.WithContextEnumerable.cs index 313a460..2a21281 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Where.WithContextEnumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Where.WithContextEnumerable.cs @@ -30,7 +30,7 @@ namespace MemoryPools.Collections.Linq _count--; if (_count == 0) { - (_condition, _context, _src) = (default, default, default); + (_condition, _context, _src) = (default!, default!, default!); Pool>.Return(this); } } @@ -71,17 +71,17 @@ namespace MemoryPools.Collections.Linq _src.Reset(); } - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public T Current => _src.Current; public void Dispose() { _parent?.Dispose(); - _parent = null; + _parent = null!; _src?.Dispose(); - _src = default; - _context = default; + _src = default!; + _context = default!; Pool.Return(this); } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Linq/Zip.Enumerable.cs b/ZeroLevel/Services/MemoryPools/Collections/Linq/Zip.Enumerable.cs index 315a43e..e8d58f6 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Linq/Zip.Enumerable.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Linq/Zip.Enumerable.cs @@ -25,8 +25,8 @@ _count--; if (_count == 0) { - _src = default; - _second = default; + _src = default!; + _second = default!; Pool>.Return(this); } } @@ -59,18 +59,18 @@ _second.Reset(); } - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public (T, T) Current => _hasResult ? ( _src.Current, _second.Current) : default; public void Dispose() { _parent?.Dispose(); - _parent = default; + _parent = default!; _src?.Dispose(); - _src = default; + _src = default!; _second?.Dispose(); - _second = default; + _second = default!; Pool.Return(this); } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Specialized/AsSingleQueryList.EnumerableRef.cs b/ZeroLevel/Services/MemoryPools/Collections/Specialized/AsSingleQueryList.EnumerableRef.cs index e1a6924..a6752e0 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Specialized/AsSingleQueryList.EnumerableRef.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Specialized/AsSingleQueryList.EnumerableRef.cs @@ -29,7 +29,7 @@ if (_count == 0) { _src?.Dispose(); - _src = default; + _src = default!; Pool>.Return(this); } } @@ -52,15 +52,15 @@ public T Current => _enumerator.Current; - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public void Dispose() { _enumerator?.Dispose(); - _enumerator = default; + _enumerator = default!; _parent?.Dispose(); - _parent = default; + _parent = default!; Pool.Return(this); } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Specialized/AsSingleQueryList.EnumerableVal.cs b/ZeroLevel/Services/MemoryPools/Collections/Specialized/AsSingleQueryList.EnumerableVal.cs index 9b83589..38cda13 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Specialized/AsSingleQueryList.EnumerableVal.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Specialized/AsSingleQueryList.EnumerableVal.cs @@ -15,7 +15,7 @@ public IPoolingEnumerator GetEnumerator() { var src = _src; - _src = default; + _src = default!; Pool>.Return(this); return Pool.Get().Init(src); } @@ -44,15 +44,15 @@ public T Current => _enumerator.Current; - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public void Dispose() { _enumerator?.Dispose(); _src?.Dispose(); - Pool>.Return(_src); - Pool.Return(this); - _src = default; + Pool>.Return(_src!); + Pool.Return(this!); + _src = default!; } } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Specialized/IdealHashDictionary.cs b/ZeroLevel/Services/MemoryPools/Collections/Specialized/IdealHashDictionary.cs index 0b47681..415e349 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Specialized/IdealHashDictionary.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Specialized/IdealHashDictionary.cs @@ -37,7 +37,7 @@ namespace MemoryPools.Collections.Specialized { var index = key.IdealHashCode; _freeNodes.Enqueue(index); - _list[index] = default; + _list[index] = default!; return true; } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Specialized/LocalList.cs b/ZeroLevel/Services/MemoryPools/Collections/Specialized/LocalList.cs index 59283f6..c2c8b53 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Specialized/LocalList.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Specialized/LocalList.cs @@ -25,7 +25,7 @@ namespace MemoryPools.Collections.Specialized public IEnumerator GetEnumerator() { // empty - if (_other == null) yield break; + if (_other == null!) yield break; if (_other.Count <= LocalStoreCapacity) { yield return _items.Item1; @@ -42,7 +42,7 @@ namespace MemoryPools.Collections.Specialized public void Add(T item) { // empty - if (_other == null) + if (_other == null!) { _items.Item1 = item; _other = LengthIs1; @@ -60,10 +60,10 @@ namespace MemoryPools.Collections.Specialized { _other = new List(DefaultListCapacity); _other.Add(_items.Item1); - _items.Item1 = default; + _items.Item1 = default!; _other.Add(_items.Item2); - _items.Item2 = default; + _items.Item2 = default!; } _other.Add(item); @@ -72,9 +72,9 @@ namespace MemoryPools.Collections.Specialized public void Clear() { - _other = null; - _items.Item1 = default; - _items.Item2 = default; + _other = null!; + _items.Item1 = default!; + _items.Item2 = default!; } public bool Contains(T item) @@ -84,7 +84,7 @@ namespace MemoryPools.Collections.Specialized public void CopyTo(T[] array, int arrayIndex) { - if (_other == null) return; + if (_other == null!) return; if (_other.Count > LocalStoreCapacity) { @@ -102,7 +102,7 @@ namespace MemoryPools.Collections.Specialized /// public bool Remove(T item) { - if (_other == null) return false; + if (_other == null!) return false; if (_other.Count > LocalStoreCapacity) { @@ -119,8 +119,8 @@ namespace MemoryPools.Collections.Specialized if (ReferenceEquals(_other, LengthIs1) && ItemComparer.Equals(_items.Item1, item)) { - _items.Item1 = default; - _other = null; + _items.Item1 = default!; + _other = null!; return true; } @@ -128,7 +128,7 @@ namespace MemoryPools.Collections.Specialized { if (ItemComparer.Equals(_items.Item2, item)) { - _items.Item2 = default; + _items.Item2 = default!; _other = LengthIs1; return true; } @@ -150,7 +150,7 @@ namespace MemoryPools.Collections.Specialized public int IndexOf(T item) { - if (_other == null) + if (_other == null!) return -1; if (_other.Count > LocalStoreCapacity) return _other.IndexOf(item); @@ -171,7 +171,7 @@ namespace MemoryPools.Collections.Specialized } // Asked non-first when empty - if (_other == null) throw new IndexOutOfRangeException(); + if (_other == null!) throw new IndexOutOfRangeException(); // If list already created if (_other.Count > LocalStoreCapacity) _other.Insert(index, item); @@ -210,11 +210,11 @@ namespace MemoryPools.Collections.Specialized if (index == 0) { _items.Item1 = _items.Item2; - _other = ReferenceEquals(_other, LengthIs1) ? null : LengthIs1; + _other = ReferenceEquals(_other, LengthIs1) ? null! : LengthIs1; } else { - _items.Item2 = default; + _items.Item2 = default!; _other = LengthIs1; } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Specialized/LongLocalList.cs b/ZeroLevel/Services/MemoryPools/Collections/Specialized/LongLocalList.cs index 21f3e15..3640e26 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Specialized/LongLocalList.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Specialized/LongLocalList.cs @@ -25,7 +25,7 @@ namespace MemoryPools.Collections.Specialized public void Clear() { Count = 0; - _items = default; + _items = default!; } public bool Contains(T item) diff --git a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingDictionary.KeysCollection.cs b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingDictionary.KeysCollection.cs index 8907d35..542aaaf 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingDictionary.KeysCollection.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingDictionary.KeysCollection.cs @@ -70,11 +70,11 @@ namespace MemoryPools.Collections.Specialized public TKey Current => _src._entries[_pos].key; - object IEnumerator.Current => Current; + object IEnumerator.Current => Current!; public void Dispose() { - _src = default; + _src = default!; Pool.Return(this); } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingDictionary.ValuesCollection.cs b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingDictionary.ValuesCollection.cs index d71917f..d004aae 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingDictionary.ValuesCollection.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingDictionary.ValuesCollection.cs @@ -81,11 +81,11 @@ namespace MemoryPools.Collections.Specialized public TValue Current => _src._entries[_pos].value; - object IEnumerator.Current => Current; + object IEnumerator.Current => Current!; public void Dispose() { - _src = default; + _src = default!; Pool.Return(this); } } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingDictionary.cs b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingDictionary.cs index e1c34b3..27af7e2 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingDictionary.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingDictionary.cs @@ -14,14 +14,15 @@ namespace MemoryPools.Collections.Specialized /// These chunks are reusable btw all Pooling* collections. All operations have O(1) complexity. /// Primary rets IPoolingEnumerable. But you can cast to IEnumerable to work in common manner. /// - public partial class PoolingDictionary : - IDictionary, + public partial class PoolingDictionary : + IDictionary, IReadOnlyDictionary, IPoolingEnumerable>, IDisposable { [DebuggerDisplay("Key: {key}, Value: {value}")] - private struct Entry { + private struct Entry + { public int hashCode; // Lower 31 bits of hash code, -1 if unused public int next; // Index of next entry, -1 if last public TKey key; // Key of entry @@ -37,11 +38,11 @@ namespace MemoryPools.Collections.Specialized private int _count; private int _complexity; private bool _refType; - private const int EndOfChain = -1; + private const int EndOfChain = -1; public PoolingDictionary() => Init(); - public PoolingDictionary Init(int capacity = 0, IEqualityComparer comparer = default) + public PoolingDictionary Init(int capacity = 0, IEqualityComparer comparer = default!) { if (_buckets != default) { @@ -69,18 +70,19 @@ namespace MemoryPools.Collections.Specialized return true; } - value = default; + value = default!; return false; } - public TValue this[TKey key] + public TValue this[TKey key] { - get { - var i = FindEntry(key); - if (i >= 0) return _entries[i].value; - throw new KeyNotFoundException(); - } - set => Insert(key, value, false); + get + { + var i = FindEntry(key); + if (i >= 0) return _entries[i].value; + throw new KeyNotFoundException(); + } + set => Insert(key, value, false); } IEnumerable IReadOnlyDictionary.Keys => Keys; @@ -91,16 +93,16 @@ namespace MemoryPools.Collections.Specialized public ICollection Values => throw new NotImplementedException(); // _values ??= Pool.Get().Init(this); - private int FindEntry(TKey key) + private int FindEntry(TKey key) { - if(_refType && key == null) + if (_refType && key == null!) { throw new ArgumentNullException(nameof(key)); } - if (_buckets == null) return -1; - var hashCode = key.GetHashCode() & 0x7FFFFFFF; - for (var i = _buckets[hashCode % _buckets.Count]; i >= 0; i = _entries[i].next) + if (_buckets == null!) return -1; + var hashCode = (key?.GetHashCode() ?? 0) & 0x7FFFFFFF; + for (var i = _buckets[hashCode % _buckets.Count]; i >= 0; i = _entries[i].next) { if (_entries[i].hashCode == hashCode && _comparer.Equals(_entries[i].key, key)) return i; } @@ -110,7 +112,7 @@ namespace MemoryPools.Collections.Specialized public int Complexity => _complexity; public void Add(TKey key, TValue value) => Insert(key, value, true); - + public bool ContainsKey(TKey key) => FindEntry(key) >= 0; public bool Remove(TKey key) @@ -118,30 +120,32 @@ namespace MemoryPools.Collections.Specialized throw new NotImplementedException(); } - private void Insert(TKey key, TValue value, bool add) { - - if (_refType && key == null) + private void Insert(TKey key, TValue value, bool add) + { + + if (_refType && key == null!) { throw new ArgumentNullException(nameof(key)); } - - if (_buckets == null) Init(PoolsDefaults.DefaultPoolBucketSize); - var hashCode = key.GetHashCode() & 0x7FFFFFFF; - var targetBucket = hashCode % _buckets.Count; + + if (_buckets == null!) Init(PoolsDefaults.DefaultPoolBucketSize); + var hashCode = key!.GetHashCode() & 0x7FFFFFFF; + var targetBucket = hashCode % (_buckets?.Count ?? 0); var complexity = 0; - - for (var i = _buckets[targetBucket]; i >= 0; i = _entries[i].next) + + for (var i = _buckets![targetBucket]; i >= 0; i = _entries[i].next) { - if (_entries[i].hashCode == hashCode && _comparer.Equals(_entries[i].key, key)) + if (_entries[i].hashCode == hashCode && _comparer.Equals(_entries[i].key, key)) { - if (add) { + if (add) + { throw new ArgumentException("Duplicating key found in dictionary"); } var entrym = _entries[i]; entrym.value = value; _entries[i] = entrym; - + unchecked { _version++; @@ -152,9 +156,9 @@ namespace MemoryPools.Collections.Specialized complexity++; } - + int index; - if (_freeCount > 0) + if (_freeCount > 0) { index = _freeList; _freeList = _entries[index].next; @@ -178,7 +182,7 @@ namespace MemoryPools.Collections.Specialized entry.value = value; _entries[index] = entry; _buckets[targetBucket] = index; - + unchecked { _version++; @@ -186,18 +190,18 @@ namespace MemoryPools.Collections.Specialized _complexity = Math.Max(_complexity, complexity); } - + private void Resize() { Resize(HashHelpers.ExpandPrime(_count), false); } - + private void Resize(int newSize, bool forceNewHashCodes) { var newBuckets = Pool>.Get().Init(); - - while(newBuckets.Count < newSize) newBuckets.Add(EndOfChain); - while(_entries.Count < newSize) _entries.Add(new Entry {hashCode = EndOfChain, next = EndOfChain}); + + while (newBuckets.Count < newSize) newBuckets.Add(EndOfChain); + while (_entries.Count < newSize) _entries.Add(new Entry { hashCode = EndOfChain, next = EndOfChain }); if (forceNewHashCodes) @@ -207,14 +211,16 @@ namespace MemoryPools.Collections.Specialized if (_entries[i].hashCode != -1) { var entry = _entries[i]; - entry.hashCode = _entries[i].key.GetHashCode() & 0x7FFFFFFF; + entry.hashCode = (_entries[i].key?.GetHashCode() ?? 0) & 0x7FFFFFFF; _entries[i] = entry; } } } - for (int i = 0; i < newSize; i++) { - if (_entries[i].hashCode >= 0) { + for (int i = 0; i < newSize; i++) + { + if (_entries[i].hashCode >= 0) + { int bucket = _entries[i].hashCode % newSize; var entry = _entries[i]; entry.next = newBuckets[bucket]; @@ -233,20 +239,20 @@ namespace MemoryPools.Collections.Specialized { _version++; } - + _buckets?.Dispose(); - Pool>.Return(_buckets); + Pool>.Return(_buckets!); _entries?.Dispose(); - Pool>.Return(_entries); + Pool>.Return(_entries!); - _buckets = default; - _entries = default; - _comparer = default; - _complexity = _count = _version = _freeCount = _freeList = default; + _buckets = default!; + _entries = default!; + _comparer = default!; + _complexity = _count = _version = _freeCount = _freeList = default!; } - public void Add(KeyValuePair item) => + public void Add(KeyValuePair item) => Insert(item.Key, item.Value, true); public void Clear() @@ -255,7 +261,7 @@ namespace MemoryPools.Collections.Specialized _entries.Clear(); _complexity = 0; _count = _freeList = _freeCount = 0; - + unchecked { _version++; @@ -264,11 +270,11 @@ namespace MemoryPools.Collections.Specialized public bool Contains(KeyValuePair item) { - var keyHash = item.Key.GetHashCode() & 0x7FFFFFFF; + var keyHash = (item.Key?.GetHashCode() ?? 0) & 0x7FFFFFFF; for (var i = 0; i < _entries.Count; i++) { - if(_entries[i].hashCode == keyHash && _comparer.Equals(_entries[i].key, item.Key) && - _entries[i].value.Equals(item.Value)) + if (_entries[i].hashCode == keyHash && _comparer.Equals(_entries[i].key, item.Key) && + (_entries[i].value?.Equals(item.Value) ?? false)) { return true; } @@ -283,7 +289,7 @@ namespace MemoryPools.Collections.Specialized { throw new IndexOutOfRangeException("Dictionary size bigger than array"); } - + for (var i = 0; i < _entries.Count; i++) { array[arrayIndex + i] = new KeyValuePair(_entries[i].key, _entries[i].value); @@ -303,7 +309,7 @@ namespace MemoryPools.Collections.Specialized private PoolingDictionary _src; private int _pos; private int _ver; - + public Enumerator Init(PoolingDictionary src) { _pos = -1; @@ -311,7 +317,7 @@ namespace MemoryPools.Collections.Specialized _ver = _src._version; return this; } - + public bool MoveNext() { if (_pos >= _src.Count) return false; @@ -329,7 +335,7 @@ namespace MemoryPools.Collections.Specialized _pos = -1; } - object IPoolingEnumerator.Current => Current; + object IPoolingEnumerator.Current => Current!; public KeyValuePair Current { @@ -354,7 +360,7 @@ namespace MemoryPools.Collections.Specialized public IPoolingEnumerator> GetEnumerator() => Pool.Get().Init(this); - IEnumerator> IEnumerable>.GetEnumerator() => + IEnumerator> IEnumerable>.GetEnumerator() => (IEnumerator>)GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => (IEnumerator)GetEnumerator(); diff --git a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingListBase.cs b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingListBase.cs index ce65626..2a0af92 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingListBase.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingListBase.cs @@ -3,312 +3,312 @@ using System.Buffers; namespace MemoryPools.Collections.Specialized { - public abstract class PoolingListBase : IDisposable, IPoolingEnumerable - { - protected IMemoryOwner> _root; - protected int _count; - protected int _ver; - - public IPoolingEnumerator GetEnumerator() - { - return Pool.Get().Init(this); - } - - IPoolingEnumerator IPoolingEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - protected abstract IPoolingNode CreateNodeHolder(); - - public void Add(T item) - { - var bn = _count >> PoolsDefaults.DefaultPoolBucketDegree; - var bi = _count & PoolsDefaults.DefaultPoolBucketMask; - - _root.Memory.Span[bn] ??= CreateNodeHolder(); - - _root.Memory.Span[bn][bi] = item; - - _count++; - - unchecked - { - _ver++; - } - } - - public void Clear() - { - for (int i = 0, len = _root.Memory.Span.Length; i < len; i++) - { - if (_root.Memory.Span[i] == null) break; - _root.Memory.Span[i].Clear(); - _root.Memory.Span[i].Dispose(); - _root.Memory.Span[i] = default; - } - - _count = default; - - unchecked - { - _ver++; - } - } - - public bool Contains(T item) => IndexOf(item) != -1; - - public void CopyTo(T[] array, int arrayIndex) - { - var len = 0; - for (var i = 0; i <= PoolsDefaults.DefaultPoolBucketSize; i++) - for (var j = 0; j < PoolsDefaults.DefaultPoolBucketSize && len < _count; j++, len++) - { - array[len] = _root.Memory.Span[i][j]; - } - } - - public bool Remove(T item) - { - int i, j; - for (i = 0, j = 0; i < _count; i++) - { - var bfn = i >> PoolsDefaults.DefaultPoolBucketDegree; - var bfi = i & PoolsDefaults.DefaultPoolBucketMask; - var btn = j >> PoolsDefaults.DefaultPoolBucketDegree; - var bti = j & PoolsDefaults.DefaultPoolBucketMask; - - if (!_root.Memory.Span[bfn][bfi].Equals(item)) - { - _root.Memory.Span[btn][bti] = _root.Memory.Span[bfn][bfi]; - j++; - } - else - { - _count--; - } - } - - unchecked - { - _ver++; - } - - return i != j && i != 0; - } - - public int Count => _count; - - public bool IsReadOnly => false; - - public int IndexOf(T item) - { - var len = 0; - - for (var i = 0; i <= PoolsDefaults.DefaultPoolBucketSize; i++) - for (var j = 0; j < PoolsDefaults.DefaultPoolBucketSize && len < _count; j++, len++) - { - if (item.Equals(_root.Memory.Span[i][j])) return len; - } - - return -1; - } - - public void Insert(int index, T item) - { - if (index < _count) - { - throw new IndexOutOfRangeException(nameof(index)); - } - - for (var i = index; i <= _count; i++) - { - var j = i + 1; - - var bn = i >> PoolsDefaults.DefaultPoolBucketDegree; - var bi = i & PoolsDefaults.DefaultPoolBucketMask; - - var bjn = j >> PoolsDefaults.DefaultPoolBucketDegree; - var bji = j & PoolsDefaults.DefaultPoolBucketMask; - - var copy = _root.Memory.Span[bn][bi]; - _root.Memory.Span[bjn][bji] = item; - item = copy; - } - - _count++; - unchecked - { - _ver++; - } - } - - public void RemoveAt(int index) - { - if (index >= _count) - { - throw new IndexOutOfRangeException(nameof(index)); - } - - for (int i = index, j = i + 1; i <= _count; i++) - { - var bn = i >> PoolsDefaults.DefaultPoolBucketDegree; - var bi = i & PoolsDefaults.DefaultPoolBucketMask; - - var bjn = j >> PoolsDefaults.DefaultPoolBucketDegree; - var bji = j & PoolsDefaults.DefaultPoolBucketMask; - - _root.Memory.Span[bn][bi] = _root.Memory.Span[bjn][bji]; - } - - _count--; - unchecked - { - _ver++; - } - } - - public void Resize(int size) - { - if (size == _count) return; - if (size < _count) - { - var cbn = _count >> PoolsDefaults.DefaultPoolBucketDegree; - var sbn = size >> PoolsDefaults.DefaultPoolBucketDegree; - var sbi = size & PoolsDefaults.DefaultPoolBucketMask; - - for (var bn = sbn + 1; bn <= cbn; bn++) - { - _root.Memory.Span[bn].Dispose(); - _root.Memory.Span[bn] = default; - } - - var span = _root.Memory.Span[sbn]; - for (var i = sbi; i <= PoolsDefaults.DefaultPoolBucketSize; i++) - { - span[i] = default; - } - - _count = size; - } - else - { - var cbn = _count >> PoolsDefaults.DefaultPoolBucketDegree; - var sbn = size >> PoolsDefaults.DefaultPoolBucketDegree; - - for (var bn = cbn + 1; bn <= sbn; bn++) - { - _root.Memory.Span[bn] = CreateNodeHolder(); - } - - _count = size; - } - } - - public T this[int index] - { - get - { - if (index >= _count) - { - throw new IndexOutOfRangeException(nameof(index)); - } - - var bn = index >> PoolsDefaults.DefaultPoolBucketDegree; - var bi = index & PoolsDefaults.DefaultPoolBucketMask; - return _root.Memory.Span[bn][bi]; - } - set - { - if (index >= _count) - { - throw new IndexOutOfRangeException(nameof(index)); - } - - var bn = index >> PoolsDefaults.DefaultPoolBucketDegree; - var bi = index & PoolsDefaults.DefaultPoolBucketMask; - _root.Memory.Span[bn][bi] = value; - - unchecked - { - _ver++; - } - } - } - - public void Dispose() - { - Clear(); - _root?.Dispose(); - _root = default; - } - - private class Enumerator : IPoolingEnumerator - { - private PoolingListBase _src; - private int _bucket, _index, _ver; - - public Enumerator Init(PoolingListBase src) - { - _bucket = 0; - _index = -1; - _src = src; - _ver = _src._ver; - return this; - } - - public bool MoveNext() - { - if (_index >= _src.Count) return false; - if (_ver != _src._ver) - { - throw new InvalidOperationException("Collection was changed while enumeration"); - } - - _index++; - var tb = _src._count >> PoolsDefaults.DefaultPoolBucketDegree; - var ti = _src._count & PoolsDefaults.DefaultPoolBucketMask; - - if (_index == PoolsDefaults.DefaultPoolBucketSize) - { - _index = 0; - _bucket++; - } - - if ((_bucket < tb && _index < PoolsDefaults.DefaultPoolBucketSize) || - (_bucket == tb && _index < ti)) - { - return true; - } - - return false; - } - - public void Reset() - { - _index = -1; - _bucket = 0; - _ver = _src._ver; - } - - public T Current - { - get - { - if (_ver != _src._ver) - { - throw new InvalidOperationException("Collection was changed while enumeration"); - } - return _src._root.Memory.Span[_bucket][_index]; - } - } - - object IPoolingEnumerator.Current => Current; - - public void Dispose() - { - Pool.Return(this); - } - } - } + public abstract class PoolingListBase : IDisposable, IPoolingEnumerable + { + protected IMemoryOwner> _root; + protected int _count; + protected int _ver; + + public IPoolingEnumerator GetEnumerator() + { + return Pool.Get().Init(this); + } + + IPoolingEnumerator IPoolingEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + protected abstract IPoolingNode CreateNodeHolder(); + + public void Add(T item) + { + var bn = _count >> PoolsDefaults.DefaultPoolBucketDegree; + var bi = _count & PoolsDefaults.DefaultPoolBucketMask; + + _root.Memory.Span[bn] ??= CreateNodeHolder(); + + _root.Memory.Span[bn][bi] = item; + + _count++; + + unchecked + { + _ver++; + } + } + + public void Clear() + { + for (int i = 0, len = _root.Memory.Span.Length; i < len; i++) + { + if (_root.Memory.Span[i] == null!) break; + _root.Memory.Span[i].Clear(); + _root.Memory.Span[i].Dispose(); + _root.Memory.Span[i] = default!; + } + + _count = default!; + + unchecked + { + _ver++; + } + } + + public bool Contains(T item) => IndexOf(item) != -1; + + public void CopyTo(T[] array, int arrayIndex) + { + var len = 0; + for (var i = 0; i <= PoolsDefaults.DefaultPoolBucketSize; i++) + for (var j = 0; j < PoolsDefaults.DefaultPoolBucketSize && len < _count; j++, len++) + { + array[len] = _root.Memory.Span[i][j]; + } + } + + public bool Remove(T item) + { + int i, j; + for (i = 0, j = 0; i < _count; i++) + { + var bfn = i >> PoolsDefaults.DefaultPoolBucketDegree; + var bfi = i & PoolsDefaults.DefaultPoolBucketMask; + var btn = j >> PoolsDefaults.DefaultPoolBucketDegree; + var bti = j & PoolsDefaults.DefaultPoolBucketMask; + + if (!(_root.Memory.Span[bfn][bfi]?.Equals(item) ?? false)) + { + _root.Memory.Span[btn][bti] = _root.Memory.Span[bfn][bfi]; + j++; + } + else + { + _count--; + } + } + + unchecked + { + _ver++; + } + + return i != j && i != 0; + } + + public int Count => _count; + + public bool IsReadOnly => false; + + public int IndexOf(T item) + { + var len = 0; + + for (var i = 0; i <= PoolsDefaults.DefaultPoolBucketSize; i++) + for (var j = 0; j < PoolsDefaults.DefaultPoolBucketSize && len < _count; j++, len++) + { + if (item?.Equals(_root.Memory.Span[i][j]) ?? false) return len; + } + + return -1; + } + + public void Insert(int index, T item) + { + if (index < _count) + { + throw new IndexOutOfRangeException(nameof(index)); + } + + for (var i = index; i <= _count; i++) + { + var j = i + 1; + + var bn = i >> PoolsDefaults.DefaultPoolBucketDegree; + var bi = i & PoolsDefaults.DefaultPoolBucketMask; + + var bjn = j >> PoolsDefaults.DefaultPoolBucketDegree; + var bji = j & PoolsDefaults.DefaultPoolBucketMask; + + var copy = _root.Memory.Span[bn][bi]; + _root.Memory.Span[bjn][bji] = item; + item = copy; + } + + _count++; + unchecked + { + _ver++; + } + } + + public void RemoveAt(int index) + { + if (index >= _count) + { + throw new IndexOutOfRangeException(nameof(index)); + } + + for (int i = index, j = i + 1; i <= _count; i++) + { + var bn = i >> PoolsDefaults.DefaultPoolBucketDegree; + var bi = i & PoolsDefaults.DefaultPoolBucketMask; + + var bjn = j >> PoolsDefaults.DefaultPoolBucketDegree; + var bji = j & PoolsDefaults.DefaultPoolBucketMask; + + _root.Memory.Span[bn][bi] = _root.Memory.Span[bjn][bji]; + } + + _count--; + unchecked + { + _ver++; + } + } + + public void Resize(int size) + { + if (size == _count) return; + if (size < _count) + { + var cbn = _count >> PoolsDefaults.DefaultPoolBucketDegree; + var sbn = size >> PoolsDefaults.DefaultPoolBucketDegree; + var sbi = size & PoolsDefaults.DefaultPoolBucketMask; + + for (var bn = sbn + 1; bn <= cbn; bn++) + { + _root.Memory.Span[bn].Dispose(); + _root.Memory.Span[bn] = default!; + } + + var span = _root.Memory.Span[sbn]; + for (var i = sbi; i <= PoolsDefaults.DefaultPoolBucketSize; i++) + { + span[i] = default!; + } + + _count = size; + } + else + { + var cbn = _count >> PoolsDefaults.DefaultPoolBucketDegree; + var sbn = size >> PoolsDefaults.DefaultPoolBucketDegree; + + for (var bn = cbn + 1; bn <= sbn; bn++) + { + _root.Memory.Span[bn] = CreateNodeHolder(); + } + + _count = size; + } + } + + public T this[int index] + { + get + { + if (index >= _count) + { + throw new IndexOutOfRangeException(nameof(index)); + } + + var bn = index >> PoolsDefaults.DefaultPoolBucketDegree; + var bi = index & PoolsDefaults.DefaultPoolBucketMask; + return _root.Memory.Span[bn][bi]; + } + set + { + if (index >= _count) + { + throw new IndexOutOfRangeException(nameof(index)); + } + + var bn = index >> PoolsDefaults.DefaultPoolBucketDegree; + var bi = index & PoolsDefaults.DefaultPoolBucketMask; + _root.Memory.Span[bn][bi] = value; + + unchecked + { + _ver++; + } + } + } + + public void Dispose() + { + Clear(); + _root?.Dispose(); + _root = default!; + } + + private class Enumerator : IPoolingEnumerator + { + private PoolingListBase _src; + private int _bucket, _index, _ver; + + public Enumerator Init(PoolingListBase src) + { + _bucket = 0; + _index = -1; + _src = src; + _ver = _src._ver; + return this; + } + + public bool MoveNext() + { + if (_index >= _src.Count) return false; + if (_ver != _src._ver) + { + throw new InvalidOperationException("Collection was changed while enumeration"); + } + + _index++; + var tb = _src._count >> PoolsDefaults.DefaultPoolBucketDegree; + var ti = _src._count & PoolsDefaults.DefaultPoolBucketMask; + + if (_index == PoolsDefaults.DefaultPoolBucketSize) + { + _index = 0; + _bucket++; + } + + if ((_bucket < tb && _index < PoolsDefaults.DefaultPoolBucketSize) || + (_bucket == tb && _index < ti)) + { + return true; + } + + return false; + } + + public void Reset() + { + _index = -1; + _bucket = 0; + _ver = _src._ver; + } + + public T Current + { + get + { + if (_ver != _src._ver) + { + throw new InvalidOperationException("Collection was changed while enumeration"); + } + return _src._root.Memory.Span[_bucket][_index]; + } + } + + object IPoolingEnumerator.Current => Current!; + + public void Dispose() + { + Pool.Return(this); + } + } + } } \ No newline at end of file diff --git a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingNode.cs b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingNode.cs index ce9086d..2d8ccfd 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingNode.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingNode.cs @@ -10,7 +10,7 @@ public override IPoolingNode Init(int capacity) { - Next = null; + Next = null!; _buf = Pool.GetBuffer(capacity); return this; } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingNodeBase.cs b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingNodeBase.cs index 9be70b5..0f7c9f1 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingNodeBase.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingNodeBase.cs @@ -17,8 +17,8 @@ namespace MemoryPools.Collections.Specialized public virtual void Dispose() { _buf.Dispose(); - _buf = null; - Next = null; + _buf = null!; + Next = null!; } public IPoolingNode Next { get; set; } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingNodeCanon.cs b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingNodeCanon.cs index 9d0d559..0e9e7de 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingNodeCanon.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingNodeCanon.cs @@ -28,7 +28,7 @@ public override IPoolingNode Init(int capacity) { - Next = null; + Next = null!; _buf = Pool.GetBuffer(capacity); return this; } diff --git a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingQueue.cs b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingQueue.cs index d081fe4..d91cf0b 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingQueue.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingQueue.cs @@ -14,7 +14,7 @@ namespace MemoryPools.Collections.Specialized Count = 0; _enqueueIndex = 0; _dequeueIndex = 0; - _enqueueTo = _dequeueFrom = null; + _enqueueTo = _dequeueFrom = null!; } public bool IsEmpty => Count == 0; @@ -29,7 +29,7 @@ namespace MemoryPools.Collections.Specialized [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Enqueue(T obj) { - if (Count == 0 && _enqueueTo == null) + if (Count == 0 && _enqueueTo == null!) _enqueueTo = _dequeueFrom = CreateNodeHolder(); _enqueueTo[_enqueueIndex] = obj; @@ -58,7 +58,7 @@ namespace MemoryPools.Collections.Specialized { if (IsEmpty) { - val = default; + val = default!; return false; } @@ -78,7 +78,7 @@ namespace MemoryPools.Collections.Specialized if (IsEmpty) throw new IndexOutOfRangeException(); var obj = _dequeueFrom[_dequeueIndex]; - _dequeueFrom[_dequeueIndex] = default; + _dequeueFrom[_dequeueIndex] = default!; _dequeueIndex++; Count--; @@ -115,14 +115,14 @@ namespace MemoryPools.Collections.Specialized [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Clear() { - while (_enqueueTo != null) + while (_enqueueTo != null!) { var next = _enqueueTo.Next; _enqueueTo.Dispose(); _enqueueTo = next; } - _dequeueFrom = null; + _dequeueFrom = null!; } } } \ No newline at end of file diff --git a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingStackBase.cs b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingStackBase.cs index 486f94c..a19cca9 100644 --- a/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingStackBase.cs +++ b/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingStackBase.cs @@ -12,7 +12,7 @@ namespace MemoryPools.Collections.Specialized { Count = 0; _topIndex = 0; - _top = null; + _top = null!; } public bool IsEmpty => Count == 0; @@ -30,7 +30,7 @@ namespace MemoryPools.Collections.Specialized [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Push(T obj) { - if (Count == 0 && _top == null) + if (Count == 0 && _top == null!) _top = CreateNodeHolder(); _top[_topIndex] = obj; @@ -57,7 +57,7 @@ namespace MemoryPools.Collections.Specialized { if (IsEmpty) { - val = default; + val = default!; return false; } @@ -87,7 +87,7 @@ namespace MemoryPools.Collections.Specialized } var obj = _top[_topIndex]; - _top[_topIndex] = default; + _top[_topIndex] = default!; Count--; @@ -97,7 +97,7 @@ namespace MemoryPools.Collections.Specialized [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Clear() { - while (_top != null) + while (_top != null!) { var next = _top.Next; _top.Dispose(); diff --git a/ZeroLevel/Services/MemoryPools/DefaultObjectPool.cs b/ZeroLevel/Services/MemoryPools/DefaultObjectPool.cs index 7b96f80..7ae0f88 100644 --- a/ZeroLevel/Services/MemoryPools/DefaultObjectPool.cs +++ b/ZeroLevel/Services/MemoryPools/DefaultObjectPool.cs @@ -38,7 +38,7 @@ namespace MemoryPools public DefaultObjectPool(IPooledObjectPolicy policy, int maximumRetained) { _policy = policy ?? throw new ArgumentNullException(nameof(policy)); - _fastPolicy = policy as PooledObjectPolicy; + _fastPolicy = (policy as PooledObjectPolicy)!; _isDefaultPolicy = IsDefaultPolicy(); // -1 due to _firstItem @@ -56,13 +56,13 @@ namespace MemoryPools public override T Get() { var item = _firstItem; - if (item == null || Interlocked.CompareExchange(ref _firstItem, null, item) != item) + if (item == null || Interlocked.CompareExchange(ref _firstItem!, null, item) != item) { var items = _items; for (var i = 0; i < items.Length; i++) { item = items[i].Element; - if (item != null && Interlocked.CompareExchange(ref items[i].Element, null, item) == item) + if (item != null && Interlocked.CompareExchange(ref items[i].Element!, null, item) == item) { return item; } @@ -83,10 +83,10 @@ namespace MemoryPools { if (_isDefaultPolicy || (_fastPolicy?.Return(obj) ?? _policy.Return(obj))) { - if (_firstItem != null || Interlocked.CompareExchange(ref _firstItem, obj, null) != null) + if (_firstItem != null || Interlocked.CompareExchange(ref _firstItem, obj, null) != null!) { var items = _items; - for (var i = 0; i < items.Length && Interlocked.CompareExchange(ref items[i].Element, obj, null) != null; ++i) + for (var i = 0; i < items.Length && Interlocked.CompareExchange(ref items[i].Element, obj, null) != null!; ++i) { } } diff --git a/ZeroLevel/Services/MemoryPools/DefaultObjectPoolProvider.cs b/ZeroLevel/Services/MemoryPools/DefaultObjectPoolProvider.cs index bfaf118..d6a1e28 100644 --- a/ZeroLevel/Services/MemoryPools/DefaultObjectPoolProvider.cs +++ b/ZeroLevel/Services/MemoryPools/DefaultObjectPoolProvider.cs @@ -18,7 +18,7 @@ namespace MemoryPools /// public override ObjectPool Create(IPooledObjectPolicy policy) { - if (policy == null) + if (policy == null!) { throw new ArgumentNullException(nameof(policy)); } diff --git a/ZeroLevel/Services/MemoryPools/DisposableObjectPool.cs b/ZeroLevel/Services/MemoryPools/DisposableObjectPool.cs index 0ee749b..931aa1a 100644 --- a/ZeroLevel/Services/MemoryPools/DisposableObjectPool.cs +++ b/ZeroLevel/Services/MemoryPools/DisposableObjectPool.cs @@ -50,14 +50,14 @@ namespace MemoryPools if (_isDefaultPolicy || (_fastPolicy?.Return(obj) ?? _policy.Return(obj))) { - if (_firstItem == null && Interlocked.CompareExchange(ref _firstItem, obj, null) == null) + if (_firstItem == null && Interlocked.CompareExchange(ref _firstItem, obj, null) == null!) { returnedTooPool = true; } else { var items = _items; - for (var i = 0; i < items.Length && !(returnedTooPool = Interlocked.CompareExchange(ref items[i].Element, obj, null) == null); i++) + for (var i = 0; i < items.Length && !(returnedTooPool = Interlocked.CompareExchange(ref items[i].Element, obj, null) == null!); i++) { } } @@ -71,13 +71,13 @@ namespace MemoryPools _isDisposed = true; DisposeItem(_firstItem); - _firstItem = null; + _firstItem = null!; ObjectWrapper[] items = _items; for (var i = 0; i < items.Length; i++) { DisposeItem(items[i].Element); - items[i].Element = null; + items[i].Element = null!; } } diff --git a/ZeroLevel/Services/MemoryPools/JetPool.cs b/ZeroLevel/Services/MemoryPools/JetPool.cs index 411d344..c8fb9b7 100644 --- a/ZeroLevel/Services/MemoryPools/JetPool.cs +++ b/ZeroLevel/Services/MemoryPools/JetPool.cs @@ -21,7 +21,7 @@ namespace MemoryPools private readonly JetStack _freeObjectsQueue = new JetStack(); [MethodImpl(MethodImplOptions.AggressiveInlining)] - public T Get() => _freeObjectsQueue.Count > 0 ? _freeObjectsQueue.Pop() : default(T); + public T Get() => (_freeObjectsQueue.Count > 0 ? _freeObjectsQueue.Pop() : default(T))!; [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Return(T instance) => _freeObjectsQueue.Push(instance); diff --git a/ZeroLevel/Services/MemoryPools/Memory/CountdownMemoryOwner.cs b/ZeroLevel/Services/MemoryPools/Memory/CountdownMemoryOwner.cs index 5ba8d30..0acdc5f 100644 --- a/ZeroLevel/Services/MemoryPools/Memory/CountdownMemoryOwner.cs +++ b/ZeroLevel/Services/MemoryPools/Memory/CountdownMemoryOwner.cs @@ -8,7 +8,7 @@ namespace MemoryPools.Memory { /// /// Encapsulates manual memory management mechanism. Holds - /// IMemoryOwner instance goes to GC (link = null) only when + /// IMemoryOwner instance goes to GC (link = null!) only when /// all owning entities called Dispose() method. This means, /// that only this mechanism should be used for covering /// managed instances. @@ -48,7 +48,7 @@ namespace MemoryPools.Memory _owners = 1; _offset = 0; _length = length; - _parent = default; + _parent = default!; _arr = array; Memory = _arr.AsMemory(0, _length); return this; @@ -69,7 +69,7 @@ namespace MemoryPools.Memory if (_parent != default) { _parent.Dispose(); - _parent = null; + _parent = null!; } else { diff --git a/ZeroLevel/Services/MemoryPools/Memory/JetStack.cs b/ZeroLevel/Services/MemoryPools/Memory/JetStack.cs index 560e59b..d1f8ec1 100644 --- a/ZeroLevel/Services/MemoryPools/Memory/JetStack.cs +++ b/ZeroLevel/Services/MemoryPools/Memory/JetStack.cs @@ -45,9 +45,9 @@ namespace MemoryPools.Memory public T Pop() { var item = _firstItem; - if (_firstItem != null) + if (_firstItem != null!) { - _firstItem = default; + _firstItem = default!; return item; } return _array[--_size].Element; @@ -57,7 +57,7 @@ namespace MemoryPools.Memory [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Push(T item) { - if (_firstItem == null) + if (_firstItem == null!) { _firstItem = item; return; diff --git a/ZeroLevel/Services/MemoryPools/ObjectPool.cs b/ZeroLevel/Services/MemoryPools/ObjectPool.cs index 35c092c..7b31f1d 100644 --- a/ZeroLevel/Services/MemoryPools/ObjectPool.cs +++ b/ZeroLevel/Services/MemoryPools/ObjectPool.cs @@ -23,7 +23,7 @@ namespace MemoryPools public static class ObjectPool { /// - public static ObjectPool Create(IPooledObjectPolicy policy = null) where T : class, new() + public static ObjectPool Create(IPooledObjectPolicy policy = null!) where T : class, new() { var provider = new DefaultObjectPoolProvider(); return provider.Create(policy ?? new DefaultPooledObjectPolicy()); diff --git a/ZeroLevel/Services/MemoryPools/Pool.cs b/ZeroLevel/Services/MemoryPools/Pool.cs index c73d391..cbbfbd9 100644 --- a/ZeroLevel/Services/MemoryPools/Pool.cs +++ b/ZeroLevel/Services/MemoryPools/Pool.cs @@ -19,7 +19,8 @@ namespace MemoryPools [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Return(T1 instance) where T1 : T { - _freeObjectsQueue.Return(instance); + if (instance != null) + _freeObjectsQueue.Return(instance); } } diff --git a/ZeroLevel/Services/Network/Contracts/ISocketClient.cs b/ZeroLevel/Services/Network/Contracts/ISocketClient.cs index a2c0480..2c1bce7 100644 --- a/ZeroLevel/Services/Network/Contracts/ISocketClient.cs +++ b/ZeroLevel/Services/Network/Contracts/ISocketClient.cs @@ -14,7 +14,7 @@ namespace ZeroLevel.Network IRouter Router { get; } void Send(Frame data); - void Request(Frame data, Action callback, Action fail = null); + void Request(Frame data, Action callback, Action fail = null!); void Response(byte[] data, int identity); } } diff --git a/ZeroLevel/Services/Network/ExClient.cs b/ZeroLevel/Services/Network/ExClient.cs index 08ce2e3..d6b6725 100644 --- a/ZeroLevel/Services/Network/ExClient.cs +++ b/ZeroLevel/Services/Network/ExClient.cs @@ -8,7 +8,7 @@ namespace ZeroLevel.Network : IClient, IDisposable { private readonly ISocketClient _client; - public IPEndPoint Endpoint => _client?.Endpoint; + public IPEndPoint Endpoint => _client?.Endpoint!; public SocketClientStatus Status => _client.Status; public IRouter Router => _client.Router; public ISocketClient Socket => _client; diff --git a/ZeroLevel/Services/Network/Exchange.cs b/ZeroLevel/Services/Network/Exchange.cs index ccef053..0ee37ac 100644 --- a/ZeroLevel/Services/Network/Exchange.cs +++ b/ZeroLevel/Services/Network/Exchange.cs @@ -433,7 +433,7 @@ namespace ZeroLevel.Network private bool _UseDiscovery(Func epf) { - if (epf == null) return false; + if (epf == null!) return false; try { var ep = epf.Invoke(); @@ -478,7 +478,7 @@ namespace ZeroLevel.Network if (discovery_endpoint.Success) { var discoveryClient = _cachee.GetClient(discovery_endpoint.Value, true); - if (discoveryClient != null) + if (discoveryClient != null!) { foreach (var service in _cachee.ServerList) { @@ -510,13 +510,13 @@ namespace ZeroLevel.Network if (discovery_endpoint.Success) { var discoveryClient = _cachee.GetClient(discovery_endpoint.Value, true); - if (discoveryClient != null) + if (discoveryClient != null!) { try { var ir = discoveryClient.Request>("services", records => { - if (records == null) + if (records == null!) { Log.SystemWarning("[Exchange.UpdateServiceListFromDiscovery] UpdateServiceListInfo. Discrovery response is empty"); return; @@ -579,7 +579,7 @@ namespace ZeroLevel.Network Log.SystemError(ex, "[Exchange.GetConnection]"); } } - return null; + return null!; } public IClient GetConnection(IPEndPoint endpoint) @@ -592,7 +592,7 @@ namespace ZeroLevel.Network { Log.SystemError(ex, "[Exchange.GetConnection]"); } - return null; + return null!; } public IClient GetConnection(ISocketClient client) @@ -605,7 +605,7 @@ namespace ZeroLevel.Network { Log.SystemError(ex, "[Exchange.GetConnection]"); } - return null; + return null!; } #region Host service @@ -670,7 +670,7 @@ namespace ZeroLevel.Network return result.Value; } } - return null; + return null!; } private IEnumerable GetAllAddressesByType(string serviceType) @@ -700,7 +700,7 @@ namespace ZeroLevel.Network return result.Value; } } - return null; + return null!; } private IEnumerable GetAllAddressesByGroup(string serviceGroup) @@ -730,7 +730,7 @@ namespace ZeroLevel.Network return result.Value; } } - return null; + return null!; } private IEnumerable GetClientEnumerator(string serviceKey) @@ -743,7 +743,7 @@ namespace ZeroLevel.Network catch (Exception ex) { Log.SystemError(ex, $"[Exchange.GetClientEnumerator] Error when trying get endpoints for service key '{serviceKey}'"); - candidates = null; + candidates = null!; } if (candidates != null && candidates.Any()) { @@ -759,7 +759,7 @@ namespace ZeroLevel.Network Log.SystemError(ex, $"[Exchange.GetClientEnumerator] Can't get transport for endpoint '{endpoint}'"); continue; } - if (transport == null) continue; + if (transport == null!) continue; yield return transport; } } @@ -779,7 +779,7 @@ namespace ZeroLevel.Network catch (Exception ex) { Log.SystemError(ex, $"[Exchange.GetClientEnumeratorByType] Error when trying get endpoints for service type '{serviceType}'"); - candidates = null; + candidates = null!; } if (candidates != null && candidates.Any()) { @@ -795,7 +795,7 @@ namespace ZeroLevel.Network Log.SystemError(ex, $"[Exchange.GetClientEnumeratorByType] Can't get transport for endpoint '{endpoint}'"); continue; } - if (transport == null) continue; + if (transport == null!) continue; yield return transport; } } @@ -815,7 +815,7 @@ namespace ZeroLevel.Network catch (Exception ex) { Log.SystemError(ex, $"[Exchange.GetClientEnumeratorByGroup] Error when trying get endpoints for service group '{serviceGroup}'"); - candidates = null; + candidates = null!; } if (candidates != null && candidates.Any()) { @@ -831,7 +831,7 @@ namespace ZeroLevel.Network Log.SystemError(ex, $"[Exchange.GetClientEnumeratorByGroup] Can't get transport for endpoint '{service}'"); continue; } - if (transport == null) continue; + if (transport == null!) continue; yield return transport; } } @@ -876,7 +876,7 @@ namespace ZeroLevel.Network Log.SystemError(ex, $"[Exchange.CallService] Can't get transport for service '{serviceKey}'"); continue; } - if (transport == null) continue; + if (transport == null!) continue; try { success = callHandler(transport); @@ -955,7 +955,7 @@ namespace ZeroLevel.Network { return new ServiceDescription { - ServiceInfo = this._owner?.ServiceInfo, + ServiceInfo = this._owner?.ServiceInfo!, Inboxes = _cachee.ServerList .SelectMany(se => se .CollectInboxInfo() diff --git a/ZeroLevel/Services/Network/Extensions/ExchangeExtension.cs b/ZeroLevel/Services/Network/Extensions/ExchangeExtension.cs index 1fe8215..463f446 100644 --- a/ZeroLevel/Services/Network/Extensions/ExchangeExtension.cs +++ b/ZeroLevel/Services/Network/Extensions/ExchangeExtension.cs @@ -15,7 +15,7 @@ namespace ZeroLevel.Network public static Tresponse Request(this IClientSet exchange, string alias, TimeSpan timeout) { - Tresponse response = default; + Tresponse response = default!; var ev = _mrePool.Get(); ev.Reset(); try @@ -35,7 +35,7 @@ namespace ZeroLevel.Network public static Tresponse Request(this IClientSet exchange, string alias, string inbox, TimeSpan timeout) { - Tresponse response = default; + Tresponse response = default!; var ev = _mrePool.Get(); ev.Reset(); try @@ -58,7 +58,7 @@ namespace ZeroLevel.Network public static Tresponse Request(this IClientSet exchange, string alias, Trequest request, TimeSpan timeout) { - Tresponse response = default; + Tresponse response = default!; var ev = _mrePool.Get(); ev.Reset(); try @@ -79,7 +79,7 @@ namespace ZeroLevel.Network public static Tresponse Request(this IClientSet exchange, string alias, string inbox , Trequest request, TimeSpan timeout) { - Tresponse response = default; + Tresponse response = default!; var ev = _mrePool.Get(); ev.Reset(); try @@ -99,7 +99,7 @@ namespace ZeroLevel.Network public static Tresponse Request(this IClientSet exchange, string alias) { - Tresponse response = default; + Tresponse response = default!; var ev = _mrePool.Get(); ev.Reset(); try @@ -119,7 +119,7 @@ namespace ZeroLevel.Network public static Tresponse Request(this IClientSet exchange, string alias, string inbox) { - Tresponse response = default; + Tresponse response = default!; var ev = _mrePool.Get(); ev.Reset(); try @@ -142,7 +142,7 @@ namespace ZeroLevel.Network public static Tresponse Request(this IClientSet exchange, string alias, Trequest request) { - Tresponse response = default; + Tresponse response = default!; var ev = _mrePool.Get(); ev.Reset(); try @@ -163,7 +163,7 @@ namespace ZeroLevel.Network public static Tresponse Request(this IClientSet exchange, string alias, string inbox , Trequest request) { - Tresponse response = default; + Tresponse response = default!; var ev = _mrePool.Get(); ev.Reset(); try diff --git a/ZeroLevel/Services/Network/FileTransfer/FileSender.cs b/ZeroLevel/Services/Network/FileTransfer/FileSender.cs index 48890c1..be04279 100644 --- a/ZeroLevel/Services/Network/FileTransfer/FileSender.cs +++ b/ZeroLevel/Services/Network/FileTransfer/FileSender.cs @@ -25,15 +25,15 @@ namespace ZeroLevel.Network.FileTransfer _uploadFileThread.Start(); } - public void Send(IClient client, string fileName, Action completeHandler = null, Action errorHandler = null) + public void Send(IClient client, string fileName, Action completeHandler = null!, Action errorHandler = null!) { - if (client == null) return; + if (client == null!) return; PushTransferTask(client, fileName, completeHandler, errorHandler); } - private void PushTransferTask(IClient client, string filePath, Action completeHandler = null, Action errorHandler = null) + private void PushTransferTask(IClient client, string filePath, Action completeHandler = null!, Action errorHandler = null!) { - if (client == null) + if (client == null!) { throw new ArgumentNullException(nameof(client)); } diff --git a/ZeroLevel/Services/Network/FileTransfer/FileWriter.cs b/ZeroLevel/Services/Network/FileTransfer/FileWriter.cs index 8ad27cf..f35fd3e 100644 --- a/ZeroLevel/Services/Network/FileTransfer/FileWriter.cs +++ b/ZeroLevel/Services/Network/FileTransfer/FileWriter.cs @@ -92,7 +92,7 @@ namespace ZeroLevel.Network.FileTransfer lock (_locker) { SafeDataWriter writer; - if (_incoming.TryGetValue(info.UploadFileTaskId, out writer) && writer != null) + if (_incoming.TryGetValue(info.UploadFileTaskId, out writer) && writer != null!) { writer.CompleteReceiving(); } diff --git a/ZeroLevel/Services/Network/Model/Frame.cs b/ZeroLevel/Services/Network/Model/Frame.cs index 36afa4c..3d5100d 100644 --- a/ZeroLevel/Services/Network/Model/Frame.cs +++ b/ZeroLevel/Services/Network/Model/Frame.cs @@ -25,7 +25,7 @@ namespace ZeroLevel.Network public T Read() { - if (this.Payload == null || this.Payload.Length == 0) return default(T); + if (this.Payload == null || this.Payload.Length == 0) return default(T)!; return MessageSerializer.DeserializeCompatible(this.Payload); } @@ -36,7 +36,7 @@ namespace ZeroLevel.Network public string ReadText() { - if (this.Payload == null || this.Payload.Length == 0) return null; + if (this.Payload == null || this.Payload.Length == 0) return null!; return Encoding.UTF32.GetString(this.Payload); } @@ -74,8 +74,8 @@ namespace ZeroLevel.Network { return new Frame { - Inbox = null, - Payload = null + Inbox = null!, + Payload = null! }; } @@ -84,7 +84,7 @@ namespace ZeroLevel.Network return new Frame { Inbox = inbox, - Payload = null + Payload = null! }; } diff --git a/ZeroLevel/Services/Network/Model/ServiceEndpointInfo.cs b/ZeroLevel/Services/Network/Model/ServiceEndpointInfo.cs index 0973122..d7d2159 100644 --- a/ZeroLevel/Services/Network/Model/ServiceEndpointInfo.cs +++ b/ZeroLevel/Services/Network/Model/ServiceEndpointInfo.cs @@ -14,14 +14,14 @@ namespace ZeroLevel.Network public bool Equals(ServiceEndpointInfo other) { - if (other == null) return false; + if (other == null!) return false; if (string.Compare(this.Endpoint, other.Endpoint, true) != 0) return false; return this.ServiceInfo?.Equals(other.ServiceInfo) ?? other != null ? false : true; } public override bool Equals(object obj) { - return this.Equals(obj as ServiceEndpointInfo); + return this.Equals((obj as ServiceEndpointInfo)!); } public override int GetHashCode() diff --git a/ZeroLevel/Services/Network/Model/ServiceRegisterInfo.cs b/ZeroLevel/Services/Network/Model/ServiceRegisterInfo.cs index 035b5a0..3da9d8e 100644 --- a/ZeroLevel/Services/Network/Model/ServiceRegisterInfo.cs +++ b/ZeroLevel/Services/Network/Model/ServiceRegisterInfo.cs @@ -11,14 +11,14 @@ namespace ZeroLevel.Network public bool Equals(ServiceRegisterInfo other) { - if (other == null) return false; + if (other == null!) return false; if (this.Port != other.Port) return false; return this.ServiceInfo?.Equals(other.ServiceInfo) ?? other != null ? false : true; } public override bool Equals(object obj) { - return this.Equals(obj as ServiceRegisterInfo); + return this.Equals((obj as ServiceRegisterInfo)!); } public override int GetHashCode() diff --git a/ZeroLevel/Services/Network/Proxies/ProxyBalancer.cs b/ZeroLevel/Services/Network/Proxies/ProxyBalancer.cs index 3eadcaf..7deb9b8 100644 --- a/ZeroLevel/Services/Network/Proxies/ProxyBalancer.cs +++ b/ZeroLevel/Services/Network/Proxies/ProxyBalancer.cs @@ -26,7 +26,7 @@ namespace ZeroLevel.Services.Network.Proxies { return _servers.Current; } - return null; + return null!; } } } diff --git a/ZeroLevel/Services/Network/Proxies/ProxyBinding.cs b/ZeroLevel/Services/Network/Proxies/ProxyBinding.cs index 2a35875..7e0c703 100644 --- a/ZeroLevel/Services/Network/Proxies/ProxyBinding.cs +++ b/ZeroLevel/Services/Network/Proxies/ProxyBinding.cs @@ -78,7 +78,7 @@ namespace ZeroLevel.Services.Network.Proxies public void Dispose() { - if (_left != null) + if (_left != null!) { try { @@ -90,7 +90,7 @@ namespace ZeroLevel.Services.Network.Proxies } catch { } } - if (_right != null) + if (_right != null!) { try { diff --git a/ZeroLevel/Services/Network/SocketClient.cs b/ZeroLevel/Services/Network/SocketClient.cs index d41e32c..72572de 100644 --- a/ZeroLevel/Services/Network/SocketClient.cs +++ b/ZeroLevel/Services/Network/SocketClient.cs @@ -124,7 +124,7 @@ namespace ZeroLevel.Network public event Action OnDisconnect = (_) => { }; public IPEndPoint Endpoint { get; } - public void Request(Frame frame, Action callback, Action fail = null) + public void Request(Frame frame, Action callback, Action fail = null!) { if (Status != SocketClientStatus.Working) throw new Exception($"[SocketClient.Request] Socket status: {Status}"); var data = NetworkPacketFactory.Reqeust(MessageSerializer.Serialize(frame), out int id); @@ -141,7 +141,7 @@ namespace ZeroLevel.Network public void Response(byte[] data, int identity) { - if (data == null) throw new ArgumentNullException(nameof(data)); + if (data == null!) throw new ArgumentNullException(nameof(data)); if (Status != SocketClientStatus.Working) throw new Exception($"[SocketClient.Response] Socket status: {Status}"); Send(0, false, NetworkPacketFactory.Response(data, identity)); } @@ -250,7 +250,7 @@ namespace ZeroLevel.Network { Router?.HandleRequest(MessageSerializer.Deserialize(frame.data), this, frame.identity, (id, response) => { - if (response != null) + if (response != null!) { this.Response(response, id); } diff --git a/ZeroLevel/Services/Network/SocketServer.cs b/ZeroLevel/Services/Network/SocketServer.cs index f070d48..c5390c9 100644 --- a/ZeroLevel/Services/Network/SocketServer.cs +++ b/ZeroLevel/Services/Network/SocketServer.cs @@ -76,7 +76,7 @@ namespace ZeroLevel.Network { var client_socket = _serverSocket.EndAccept(ar); var ep = client_socket.RemoteEndPoint as IPEndPoint; - Log.SystemInfo($"[ZSocketServer.BeginAcceptCallback] Incoming connection {ep.Address}:{ep.Port}"); + Log.SystemInfo($"[ZSocketServer.BeginAcceptCallback] Incoming connection {(ep?.Address?.ToString() ?? string.Empty)}:{(ep?.Port.ToString() ?? string.Empty)}"); _connection_set_lock.EnterWriteLock(); var connection = new SocketClient(client_socket, _router); connection.OnDisconnect += Connection_OnDisconnect; diff --git a/ZeroLevel/Services/Network/Utils/ExClientServerCachee.cs b/ZeroLevel/Services/Network/Utils/ExClientServerCachee.cs index 3d5438d..cb0bf35 100644 --- a/ZeroLevel/Services/Network/Utils/ExClientServerCachee.cs +++ b/ZeroLevel/Services/Network/Utils/ExClientServerCachee.cs @@ -15,7 +15,7 @@ namespace ZeroLevel.Network internal IEnumerable ServerList => _serverInstances.Values; - public IClient GetClient(IPEndPoint endpoint, bool use_cachee, IRouter router = null) + public IClient GetClient(IPEndPoint endpoint, bool use_cachee, IRouter router = null!) { if (use_cachee) { @@ -28,7 +28,7 @@ namespace ZeroLevel.Network { try { - ExClient instance = null; + ExClient instance = null!; if (_clientInstances.ContainsKey(key)) { instance = _clientInstances[key]; @@ -38,7 +38,7 @@ namespace ZeroLevel.Network } _clientInstances.TryRemove(key, out instance); instance.Dispose(); - instance = null; + instance = null!; } instance = new ExClient(new SocketClient(endpoint, router ?? new Router())); if (instance.Status == SocketClientStatus.Initialized @@ -63,7 +63,7 @@ namespace ZeroLevel.Network return instance; } } - return null; + return null!; } public SocketServer GetServer(IPEndPoint endpoint, IRouter router) diff --git a/ZeroLevel/Services/Network/Utils/FrameParser.cs b/ZeroLevel/Services/Network/Utils/FrameParser.cs index c6cfa96..6defbef 100644 --- a/ZeroLevel/Services/Network/Utils/FrameParser.cs +++ b/ZeroLevel/Services/Network/Utils/FrameParser.cs @@ -31,7 +31,7 @@ namespace ZeroLevel.Network Identity = 0; Size = 0; offset = 0; - Payload = null; + Payload = null!; SizeFilled = false; IdentityFilled = false; PayloadFilled = false; @@ -87,7 +87,7 @@ namespace ZeroLevel.Network public int WritePayload(byte[] buf, int start, int length) { - if (Payload == null) + if (Payload == null!) { Payload = new byte[Size]; var mask = ((byte)(NetworkPacketFactory.MAGIC ^ _size_buf[0] ^ _size_buf[1] ^ _size_buf[2] ^ _size_buf[3])); diff --git a/ZeroLevel/Services/Network/Utils/NetUtils.cs b/ZeroLevel/Services/Network/Utils/NetUtils.cs index 955ef77..3eb3aed 100644 --- a/ZeroLevel/Services/Network/Utils/NetUtils.cs +++ b/ZeroLevel/Services/Network/Utils/NetUtils.cs @@ -36,7 +36,7 @@ namespace ZeroLevel.Network public static bool TestConnection(IPEndPoint endpoint, int timeout = 100) { - if (endpoint == null) return false; + if (endpoint == null!) return false; using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) { socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.DontLinger, true); @@ -72,9 +72,9 @@ namespace ZeroLevel.Network public static int Compare(this IPEndPoint x, IPEndPoint y) { - if (x == null && y == null) return 0; - if (x == null) return 1; - if (y == null) return -1; + if (x == null && y == null!) return 0; + if (x == null!) return 1; + if (y == null!) return -1; var xx = x.Address.ToString(); var yy = y.Address.ToString(); @@ -84,9 +84,9 @@ namespace ZeroLevel.Network public static int Compare(this IPAddress x, IPAddress y) { - if (x == null && y == null) return 0; - if (x == null) return 1; - if (y == null) return -1; + if (x == null && y == null!) return 0; + if (x == null!) return 1; + if (y == null!) return -1; var xx = x.ToString(); var yy = y.ToString(); @@ -95,7 +95,7 @@ namespace ZeroLevel.Network public static IPEndPoint CreateIPEndPoint(string endPoint) { - if (string.IsNullOrWhiteSpace(endPoint)) return null; + if (string.IsNullOrWhiteSpace(endPoint)) return null!; string[] ep = endPoint.Split(':'); if (ep.Length < 2) throw new FormatException("Invalid endpoint format"); @@ -128,7 +128,7 @@ namespace ZeroLevel.Network l.Start(); int port = ((IPEndPoint)l.LocalEndpoint).Port; l.Stop(); - l = null; + l = null!; return port; } @@ -159,7 +159,7 @@ namespace ZeroLevel.Network } } } - return null; + return null!; } } } \ No newline at end of file diff --git a/ZeroLevel/Services/Network/Utils/RequestBuffer.cs b/ZeroLevel/Services/Network/Utils/RequestBuffer.cs index 989498a..1e2a63a 100644 --- a/ZeroLevel/Services/Network/Utils/RequestBuffer.cs +++ b/ZeroLevel/Services/Network/Utils/RequestBuffer.cs @@ -10,7 +10,7 @@ namespace ZeroLevel.Network private ConcurrentDictionary _requests = new ConcurrentDictionary(); private static DefaultObjectPool _ri_pool = new DefaultObjectPool(new DefaultPooledObjectPolicy()); - public void RegisterForFrame(int identity, Action callback, Action fail = null) + public void RegisterForFrame(int identity, Action callback, Action fail = null!) { var ri = _ri_pool.Get(); ri.Reset(callback, fail); diff --git a/ZeroLevel/Services/Network/Utils/Router.cs b/ZeroLevel/Services/Network/Utils/Router.cs index 7178c76..e453ce3 100644 --- a/ZeroLevel/Services/Network/Utils/Router.cs +++ b/ZeroLevel/Services/Network/Utils/Router.cs @@ -57,8 +57,8 @@ namespace ZeroLevel.Network return new MRInvoker { _noArguments = true, - _typeReq = null, - _typeResp = null, + _typeReq = null!, + _typeResp = null!, _instance = handler.Target, _invoker = CreateCompiledExpression(handler) }; @@ -69,7 +69,7 @@ namespace ZeroLevel.Network return new MRInvoker { _typeReq = typeof(T), - _typeResp = null, + _typeResp = null!, _instance = handler.Target, _invoker = CreateCompiledExpression(handler) }; @@ -80,7 +80,7 @@ namespace ZeroLevel.Network return new MRInvoker { _noArguments = true, - _typeReq = null, + _typeReq = null!, _typeResp = typeof(Tresponse), _instance = handler.Target, _invoker = CreateCompiledExpression(handler) @@ -100,7 +100,7 @@ namespace ZeroLevel.Network public void Invoke(byte[] data, ISocketClient client) { - if (_typeResp == null) + if (_typeResp == null!) { if (_noArguments) { @@ -116,7 +116,7 @@ namespace ZeroLevel.Network public void Invoke(byte[] data, ISocketClient client, Action callback) { - if (_typeReq == null) + if (_typeReq == null!) { callback(this._invoker.Invoke(this._instance, new object[] { client })); } @@ -133,7 +133,7 @@ namespace ZeroLevel.Network { Name = name, InboxKind = DetectKind(), - Target = _instance?.GetType()?.Name, + Target = _instance?.GetType()?.Name!, IncomingType = GetIncomingTypeDescription(), OutcomingType = GetOutcomingTypeDescription() }; @@ -141,35 +141,35 @@ namespace ZeroLevel.Network private InboxType GetIncomingTypeDescription() { - if (_typeReq == null) return null; + if (_typeReq == null!) return null!; return new InboxType { Name = _typeReq.FullName, Fields = _typeReq .GetMembers(BindingFlags.Public | BindingFlags.FlattenHierarchy | BindingFlags.GetField | BindingFlags.GetProperty | BindingFlags.Instance) .Where(m => m.MemberType == MemberTypes.Field || m.MemberType == MemberTypes.Property) - .Select(f => new KeyValuePair(f.Name, (f.MemberType == MemberTypes.Property) ? (f as PropertyInfo).PropertyType.FullName : (f as FieldInfo).FieldType.FullName)) + .Select(f => new KeyValuePair(f.Name, (f.MemberType == MemberTypes.Property) ? (f as PropertyInfo)!.PropertyType.FullName : (f as FieldInfo)!.FieldType.FullName)) .ToDictionary(pair => pair.Key, pair => pair.Value) }; } private InboxType GetOutcomingTypeDescription() { - if (_typeResp == null) return null; + if (_typeResp == null!) return null!; return new InboxType { Name = _typeResp.FullName, Fields = _typeResp .GetMembers(BindingFlags.Public | BindingFlags.FlattenHierarchy | BindingFlags.GetField | BindingFlags.GetProperty | BindingFlags.Instance) .Where(m => m.MemberType == MemberTypes.Field || m.MemberType == MemberTypes.Property) - .Select(f => new KeyValuePair(f.Name, (f.MemberType == MemberTypes.Property) ? (f as PropertyInfo).PropertyType.FullName : (f as FieldInfo).FieldType.FullName)) + .Select(f => new KeyValuePair(f.Name, (f.MemberType == MemberTypes.Property) ? (f as PropertyInfo)!.PropertyType.FullName : (f as FieldInfo)!.FieldType.FullName)) .ToDictionary(pair => pair.Key, pair => pair.Value) }; } private InboxKind DetectKind() { - if (_typeResp == null) + if (_typeResp == null!) { return _noArguments ? InboxKind.HandlerNoArgs : InboxKind.Handler; } diff --git a/ZeroLevel/Services/Network/Utils/ServiceRouteStorage.cs b/ZeroLevel/Services/Network/Utils/ServiceRouteStorage.cs index c0f3c4e..57a0a8e 100644 --- a/ZeroLevel/Services/Network/Utils/ServiceRouteStorage.cs +++ b/ZeroLevel/Services/Network/Utils/ServiceRouteStorage.cs @@ -41,7 +41,7 @@ namespace ZeroLevel.Network if (_in_transaction == 1) { TransAppendByKeys(key, endpoint); - _tran_endpoints[endpoint] = new string[] { key, null, null }; + _tran_endpoints[endpoint] = new string[] { key, null!, null! }; return; } @@ -57,7 +57,7 @@ namespace ZeroLevel.Network RemoveLocked(endpoint); } AppendByKeys(key, endpoint); - _endpoints.Add(endpoint, new string[3] { $"{endpoint.Address}:{endpoint.Port}", null, null }); + _endpoints.Add(endpoint, new string[3] { $"{endpoint.Address}:{endpoint.Port}", null!, null! }); } finally { @@ -80,7 +80,7 @@ namespace ZeroLevel.Network if (_in_transaction == 1) { TransAppendByKeys(key, endpoint); - _tran_endpoints[endpoint] = new string[] { key, null, null }; + _tran_endpoints[endpoint] = new string[] { key, null!, null! }; return; } @@ -100,7 +100,7 @@ namespace ZeroLevel.Network RemoveLocked(endpoint); } AppendByKeys(key, endpoint); - _endpoints.Add(endpoint, new string[3] { key, null, null }); + _endpoints.Add(endpoint, new string[3] { key, null!, null! }); } finally { @@ -116,7 +116,7 @@ namespace ZeroLevel.Network foreach (var endpoint in endpoints) { TransAppendByKeys(key, endpoint); - _tran_endpoints[endpoint] = new string[] { key, null, null }; + _tran_endpoints[endpoint] = new string[] { key, null!, null! }; } return; } @@ -138,7 +138,7 @@ namespace ZeroLevel.Network } foreach (var ep in endpoints) { - _endpoints.Add(ep, new string[3] { key.ToUpperInvariant(), null, null }); + _endpoints.Add(ep, new string[3] { key.ToUpperInvariant(), null!, null! }); AppendByKeys(key, ep); } } @@ -150,7 +150,7 @@ namespace ZeroLevel.Network public void Set(string key, string type, string group, IPEndPoint endpoint) { - if (key == null) + if (key == null!) { key = $"{endpoint.Address}:{endpoint.Port}"; } @@ -164,15 +164,15 @@ namespace ZeroLevel.Network if (_in_transaction == 1) { TransAppendByKeys(key, endpoint); - if (type != null) + if (type != null!) { TransAppendByType(type, endpoint); } - if (group != null) + if (group != null!) { TransAppendByGroup(group, endpoint); } - _tran_endpoints[endpoint] = new string[] { key, type, group }; + _tran_endpoints[endpoint] = new string[] { key, type!, group! }; return; } @@ -181,15 +181,15 @@ namespace ZeroLevel.Network { RemoveLocked(endpoint); AppendByKeys(key, endpoint); - if (type != null) + if (type != null!) { AppendByType(type, endpoint); } - if (group != null) + if (group != null!) { AppendByGroup(group, endpoint); } - _endpoints.Add(endpoint, new string[3] { key.ToUpperInvariant(), type.ToUpperInvariant(), group.ToUpperInvariant() }); + _endpoints.Add(endpoint, new string[3] { key.ToUpperInvariant(), type?.ToUpperInvariant() ?? string.Empty, group?.ToUpperInvariant() ?? string.Empty }); } finally { @@ -208,15 +208,15 @@ namespace ZeroLevel.Network foreach (var endpoint in endpoints) { TransAppendByKeys(key, endpoint); - if (type != null) + if (type != null!) { TransAppendByType(type, endpoint); } - if (group != null) + if (group != null!) { TransAppendByGroup(group, endpoint); } - _tran_endpoints[endpoint] = new string[] { key, type, group }; + _tran_endpoints[endpoint] = new string[] { key, type!, group! }; } return; } diff --git a/ZeroLevel/Services/ObjectMapping/MapFieldInfo.cs b/ZeroLevel/Services/ObjectMapping/MapFieldInfo.cs index 6eddc28..18450a3 100644 --- a/ZeroLevel/Services/ObjectMapping/MapFieldInfo.cs +++ b/ZeroLevel/Services/ObjectMapping/MapFieldInfo.cs @@ -35,12 +35,12 @@ namespace ZeroLevel.Services.ObjectMapping switch (memberInfo.MemberType) { case MemberTypes.Field: - return FromField(memberInfo as FieldInfo); + return FromField((memberInfo as FieldInfo)!); case MemberTypes.Property: - return FromProperty(memberInfo as PropertyInfo); + return FromProperty((memberInfo as PropertyInfo)!); } - return null; + return null!; } #endregion Factory @@ -50,12 +50,13 @@ namespace ZeroLevel.Services.ObjectMapping private static bool IsNullable(Type type) { if (!type.IsValueType) return true; // ref-type - if (Nullable.GetUnderlyingType(type) != null) return true; // Nullable + if (Nullable.GetUnderlyingType(type) != null!) return true; // Nullable return false; // value-type } private static MapMemberInfo FromField(FieldInfo fieldInfo) { + if (fieldInfo == null) return null!; var field = new MapMemberInfo(TypeGetterSetterBuilder.BuildSetter(fieldInfo), TypeGetterSetterBuilder.BuildGetter(fieldInfo)) { Name = fieldInfo.Name, @@ -69,6 +70,7 @@ namespace ZeroLevel.Services.ObjectMapping private static IMemberInfo FromProperty(PropertyInfo propertyInfo) { + if (propertyInfo == null) return null!; var field = new MapMemberInfo(TypeGetterSetterBuilder.BuildSetter(propertyInfo), TypeGetterSetterBuilder.BuildGetter(propertyInfo)) { Name = propertyInfo.Name, @@ -86,7 +88,7 @@ namespace ZeroLevel.Services.ObjectMapping { return Activator.CreateInstance(type); } - return null; + return null!; } #endregion Helpers diff --git a/ZeroLevel/Services/ObjectMapping/TypeMapper.cs b/ZeroLevel/Services/ObjectMapping/TypeMapper.cs index 5914681..a4980e8 100644 --- a/ZeroLevel/Services/ObjectMapping/TypeMapper.cs +++ b/ZeroLevel/Services/ObjectMapping/TypeMapper.cs @@ -59,7 +59,7 @@ namespace ZeroLevel.Services.ObjectMapping public TypeMapper(Type entityType) { - if (entityType == null) + if (entityType == null!) { throw new ArgumentNullException(nameof(entityType)); } @@ -96,13 +96,13 @@ namespace ZeroLevel.Services.ObjectMapping if (this._fields.ContainsKey(name)) { var setter = this._fields[name].Setter; - if (setter == null) + if (setter == null!) { throw new Exception($"{(this._fields[name].IsField ? "Field" : "Property")} '{name}' has not setter"); } - if (value == null) + if (value == null!) { - setter(instance, null); + setter(instance, null!); } else if (value.GetType() != this._fields[name].ClrType) { @@ -120,7 +120,7 @@ namespace ZeroLevel.Services.ObjectMapping if (this._fields.ContainsKey(name)) { var getter = this._fields[name]?.Getter; - if (getter == null) + if (getter == null!) { throw new Exception($"{(this._fields[name].IsField ? "Field" : "Property")} '{name}' has not getter"); } @@ -134,7 +134,7 @@ namespace ZeroLevel.Services.ObjectMapping if (this._fields.ContainsKey(name)) { var getter = this._fields[name]?.Getter; - if (getter == null) + if (getter == null!) { throw new Exception($"{(this._fields[name].IsField ? "Field" : "Property")} '{name}' has not getter"); } @@ -148,7 +148,7 @@ namespace ZeroLevel.Services.ObjectMapping if (this._fields.ContainsKey(name)) { var getter = this._fields[name]?.Getter; - if (getter == null) + if (getter == null!) { return defaultValue; } @@ -162,7 +162,7 @@ namespace ZeroLevel.Services.ObjectMapping if (this._fields.ContainsKey(name)) { var getter = this._fields[name]?.Getter; - if (getter == null) + if (getter == null!) { return defaultValue; } @@ -223,6 +223,7 @@ namespace ZeroLevel.Services.ObjectMapping /// public static object CopyDTO(object instance) { + if (instance == null) return null!; var type = instance.GetType(); if (TypeHelpers.IsSimpleType(type)) { @@ -239,9 +240,9 @@ namespace ZeroLevel.Services.ObjectMapping public static bool EqualsDTO(object left, object right) { - if (left == null && right == null) return true; - if (left == null) return false; - if (right == null) return false; + if (left == null && right == null!) return true; + if (left == null!) return false; + if (right == null!) return false; if (left.GetType() != right.GetType()) return false; var lt = left.GetType(); if (TypeHelpers.IsSimpleType(lt)) diff --git a/ZeroLevel/Services/PartitionStorage/Indexes/KeysIndex/StorePartitionSparseIndex.cs b/ZeroLevel/Services/PartitionStorage/Indexes/KeysIndex/StorePartitionSparseIndex.cs index b26659e..63d661f 100644 --- a/ZeroLevel/Services/PartitionStorage/Indexes/KeysIndex/StorePartitionSparseIndex.cs +++ b/ZeroLevel/Services/PartitionStorage/Indexes/KeysIndex/StorePartitionSparseIndex.cs @@ -142,7 +142,7 @@ namespace ZeroLevel.Services.PartitionStorage { Log.SystemError(ex, "[StorePartitionSparseIndex.GetFileIndex] No cachee"); } - return null; + return null!; } private KeyIndex[] ReadIndexesFromIndexFile(string filePath) @@ -178,7 +178,7 @@ namespace ZeroLevel.Services.PartitionStorage } return list.ToArray(); } - return null; + return null!; } } } diff --git a/ZeroLevel/Services/PartitionStorage/Partition/BasePartition.cs b/ZeroLevel/Services/PartitionStorage/Partition/BasePartition.cs index a9bdab4..2992862 100644 --- a/ZeroLevel/Services/PartitionStorage/Partition/BasePartition.cs +++ b/ZeroLevel/Services/PartitionStorage/Partition/BasePartition.cs @@ -45,7 +45,7 @@ namespace ZeroLevel.Services.PartitionStorage.Partition } _phisicalFileAccessor = fileAccessorCachee; Serializer = serializer; - _indexBuilder = _options.Index.Enabled ? new IndexBuilder(_options.Index.StepType, _options.Index.StepValue, _catalog, fileAccessorCachee, Serializer) : null; + _indexBuilder = (_options.Index.Enabled ? new IndexBuilder(_options.Index.StepType, _options.Index.StepValue, _catalog, fileAccessorCachee, Serializer) : null)!; } #region IStorePartitionBase @@ -207,7 +207,7 @@ namespace ZeroLevel.Services.PartitionStorage.Partition { Log.SystemError(ex, "[StorePartitionBuilder.TryGetWriteStream]"); } - writer = null; + writer = null!; return false; } */ @@ -231,7 +231,7 @@ namespace ZeroLevel.Services.PartitionStorage.Partition { Log.SystemError(ex, "[StorePartitionBuilder.TryGetReadStream]"); } - reader = null; + reader = null!; return false; } protected IViewAccessor GetViewAccessor(TKey key, long offset) @@ -256,7 +256,7 @@ namespace ZeroLevel.Services.PartitionStorage.Partition { Log.SystemError(ex, $"[StorePartitionAccessor.GetViewAccessor] '{filePath}'"); } - return null; + return null!; } protected IViewAccessor GetViewAccessor(string filePath, long offset, int length) { @@ -268,7 +268,7 @@ namespace ZeroLevel.Services.PartitionStorage.Partition { Log.SystemError(ex, $"[StorePartitionAccessor.GetViewAccessor] '{filePath}'"); } - return null; + return null!; } } } diff --git a/ZeroLevel/Services/PartitionStorage/Partition/CompactKeyStorePartitionBuilder.cs b/ZeroLevel/Services/PartitionStorage/Partition/CompactKeyStorePartitionBuilder.cs index c8166b0..88d9654 100644 --- a/ZeroLevel/Services/PartitionStorage/Partition/CompactKeyStorePartitionBuilder.cs +++ b/ZeroLevel/Services/PartitionStorage/Partition/CompactKeyStorePartitionBuilder.cs @@ -25,7 +25,7 @@ namespace ZeroLevel.Services.PartitionStorage.Partition PhisicalFileAccessorCachee fileAccessorCachee) : base(options, info, serializer, fileAccessorCachee) { - if (options == null) throw new ArgumentNullException(nameof(options)); + if (options == null!) throw new ArgumentNullException(nameof(options)); if (options.ThreadSafeWriting) { _storeMethod = StoreDirectSafe; @@ -146,8 +146,8 @@ namespace ZeroLevel.Services.PartitionStorage.Partition foreach (var pair in dict.OrderBy(p => p.Key)) { var v = _options.MergeFunction(pair.Value); - writer.SerializeCompatible(pair.Key); - writer.SerializeCompatible(v); + writer.SerializeCompatible(pair.Key!); + writer.SerializeCompatible(v!); } } File.Delete(file); diff --git a/ZeroLevel/Services/PartitionStorage/Partition/StoreMergePartitionAccessor.cs b/ZeroLevel/Services/PartitionStorage/Partition/StoreMergePartitionAccessor.cs index 7ddd452..72e993f 100644 --- a/ZeroLevel/Services/PartitionStorage/Partition/StoreMergePartitionAccessor.cs +++ b/ZeroLevel/Services/PartitionStorage/Partition/StoreMergePartitionAccessor.cs @@ -41,7 +41,7 @@ namespace ZeroLevel.Services.PartitionStorage IStoreSerializer serializer, PhisicalFileAccessorCachee cachee) { - if (decompress == null) throw new ArgumentNullException(nameof(decompress)); + if (decompress == null!) throw new ArgumentNullException(nameof(decompress)); _decompress = decompress; _accessor = new StorePartitionAccessor(options, info, serializer, cachee); _temporaryFolder = Path.Combine(_accessor.GetCatalogPath(), Guid.NewGuid().ToString()); @@ -82,7 +82,7 @@ namespace ZeroLevel.Services.PartitionStorage { var name = Path.GetFileName(file); // if datafile by key exists - if (existsFiles.ContainsKey(name)) + if (existsFiles?.ContainsKey(name) ?? false) { // append all records from existing file to new foreach (var r in IterateReadKeyInputs(existsFiles[name])) @@ -100,7 +100,7 @@ namespace ZeroLevel.Services.PartitionStorage // compress new file foreach (var file in newFiles) { - await (_temporaryAccessor as StorePartitionBuilder) + await (_temporaryAccessor as StorePartitionBuilder)! .CompressFile(file); } @@ -110,7 +110,7 @@ namespace ZeroLevel.Services.PartitionStorage _phisicalFileAccessor.DropDataReader(file); // 1. Remove index file - (_accessor as StorePartitionAccessor) + (_accessor as StorePartitionAccessor)! .DropFileIndex(file); // 2. Replace source @@ -132,7 +132,8 @@ namespace ZeroLevel.Services.PartitionStorage } // 3. Rebuil index - await (_accessor as BasePartition).RebuildFileIndex(name); + await (_accessor as BasePartition)! + .RebuildFileIndex(name); } } // remove temporary files diff --git a/ZeroLevel/Services/PartitionStorage/Partition/StorePartitionAccessor.cs b/ZeroLevel/Services/PartitionStorage/Partition/StorePartitionAccessor.cs index e222224..3f378e9 100644 --- a/ZeroLevel/Services/PartitionStorage/Partition/StorePartitionAccessor.cs +++ b/ZeroLevel/Services/PartitionStorage/Partition/StorePartitionAccessor.cs @@ -21,7 +21,7 @@ namespace ZeroLevel.Services.PartitionStorage PhisicalFileAccessorCachee phisicalFileAccessor) : base(options, info, serializer, phisicalFileAccessor) { - if (options == null) throw new ArgumentNullException(nameof(options)); + if (options == null!) throw new ArgumentNullException(nameof(options)); if (options.Index.Enabled) { Indexes = new StorePartitionSparseIndex(_catalog, _info, options.FilePartition, options.KeyComparer, options.Index.EnableIndexInMemoryCachee, phisicalFileAccessor); @@ -52,10 +52,10 @@ namespace ZeroLevel.Services.PartitionStorage { Key = key, Success = false, - Value = default + Value = default! }; } - if (memoryAccessor != null) + if (memoryAccessor != null!) { using (var reader = new MemoryStreamReader(memoryAccessor)) { @@ -85,7 +85,7 @@ namespace ZeroLevel.Services.PartitionStorage { Key = key, Success = false, - Value = default + Value = default! }; } @@ -114,7 +114,7 @@ namespace ZeroLevel.Services.PartitionStorage foreach (var file in files) { var accessor = PhisicalFileAccessorCachee.GetDataAccessor(file, 0); - if (accessor != null) + if (accessor != null!) { using (var reader = new MemoryStreamReader(accessor)) { @@ -145,7 +145,7 @@ namespace ZeroLevel.Services.PartitionStorage foreach (var file in files) { var accessor = PhisicalFileAccessorCachee.GetDataAccessor(file, 0); - if (accessor != null) + if (accessor != null!) { using (var reader = new MemoryStreamReader(accessor)) { @@ -173,7 +173,7 @@ namespace ZeroLevel.Services.PartitionStorage if (File.Exists(filePath)) { var accessor = PhisicalFileAccessorCachee.GetDataAccessor(filePath, 0); - if (accessor != null) + if (accessor != null!) { using (var reader = new MemoryStreamReader(accessor)) { @@ -262,7 +262,7 @@ namespace ZeroLevel.Services.PartitionStorage { memoryAccessor = GetViewAccessor(filePath, offset.Offset); } - if (memoryAccessor != null) + if (memoryAccessor != null!) { using (var reader = new MemoryStreamReader(memoryAccessor)) { @@ -292,7 +292,7 @@ namespace ZeroLevel.Services.PartitionStorage else { var memoryAccessor = GetViewAccessor(filePath, 0); - if (memoryAccessor != null) + if (memoryAccessor != null!) { using (var reader = new MemoryStreamReader(memoryAccessor)) { @@ -353,7 +353,7 @@ namespace ZeroLevel.Services.PartitionStorage { memoryAccessor = GetViewAccessor(filePath, offset.Offset); } - if (memoryAccessor != null) + if (memoryAccessor != null!) { using (var reader = new MemoryStreamReader(memoryAccessor)) { @@ -392,7 +392,7 @@ namespace ZeroLevel.Services.PartitionStorage else { var memoryAccessor = GetViewAccessor(filePath, 0); - if (memoryAccessor != null) + if (memoryAccessor != null!) { using (var reader = new MemoryStreamReader(memoryAccessor)) { @@ -501,7 +501,7 @@ namespace ZeroLevel.Services.PartitionStorage { if ((ranges?.Count ?? 0) == 0) return new List { new FilePositionRange { Start = 0, End = length } }; var inverted = new List(); - var current = new FilePositionRange { Start = 0, End = ranges[0].Start }; + var current = new FilePositionRange { Start = 0, End = ranges![0].Start }; for (var i = 0; i < ranges.Count; i++) { current.End = ranges[i].Start; diff --git a/ZeroLevel/Services/PartitionStorage/Partition/StorePartitionBuilder.cs b/ZeroLevel/Services/PartitionStorage/Partition/StorePartitionBuilder.cs index d64bbd1..8bd5d39 100644 --- a/ZeroLevel/Services/PartitionStorage/Partition/StorePartitionBuilder.cs +++ b/ZeroLevel/Services/PartitionStorage/Partition/StorePartitionBuilder.cs @@ -26,7 +26,7 @@ namespace ZeroLevel.Services.PartitionStorage PhisicalFileAccessorCachee fileAccessorCachee) : base(options, info, serializer, fileAccessorCachee) { - if (options == null) throw new ArgumentNullException(nameof(options)); + if (options == null!) throw new ArgumentNullException(nameof(options)); if (options.ThreadSafeWriting) { _storeMethod = StoreDirectSafe; @@ -85,7 +85,7 @@ namespace ZeroLevel.Services.PartitionStorage foreach (var file in files) { var accessor = GetViewAccessor(file, 0); - if (accessor != null) + if (accessor != null!) { using (var reader = new MemoryStreamReader(accessor)) { @@ -152,7 +152,7 @@ namespace ZeroLevel.Services.PartitionStorage { var dict = new Dictionary>(); var accessor = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.None, 1024 * 1024 * 32); - if (accessor != null) + if (accessor != null!) { using (var reader = new MemoryStreamReader(accessor)) { @@ -163,7 +163,7 @@ namespace ZeroLevel.Services.PartitionStorage { throw new Exception($"[StorePartitionBuilder.CompressFile] Fault compress data in file '{file}'. Incorrect file structure. Fault read key."); } - if (kv.Value != null) + if (kv.Value != null!) { if (false == dict.ContainsKey(kv.Value)) { diff --git a/ZeroLevel/Services/PartitionStorage/PhisicalFileAccessorCachee.cs b/ZeroLevel/Services/PartitionStorage/PhisicalFileAccessorCachee.cs index b69c3c6..0c91d20 100644 --- a/ZeroLevel/Services/PartitionStorage/PhisicalFileAccessorCachee.cs +++ b/ZeroLevel/Services/PartitionStorage/PhisicalFileAccessorCachee.cs @@ -49,7 +49,7 @@ namespace ZeroLevel.Services.PartitionStorage } return reader.GetAccessor(offset); } - return null; + return null!; } public IViewAccessor GetDataAccessor(string filePath, long offset, int length) @@ -68,7 +68,7 @@ namespace ZeroLevel.Services.PartitionStorage } return reader.GetAccessor(offset, length); } - return null; + return null!; } public void DropAllDataReaders() { @@ -104,7 +104,7 @@ namespace ZeroLevel.Services.PartitionStorage } return reader.GetAccessor(offset); } - return null; + return null!; } public IViewAccessor GetIndexAccessor(string filePath, long offset, int length) @@ -123,7 +123,7 @@ namespace ZeroLevel.Services.PartitionStorage } return reader.GetAccessor(offset, length); } - return null; + return null!; } public void DropAllIndexReaders() { diff --git a/ZeroLevel/Services/PartitionStorage/Store.cs b/ZeroLevel/Services/PartitionStorage/Store.cs index 19c4487..cf62ef1 100644 --- a/ZeroLevel/Services/PartitionStorage/Store.cs +++ b/ZeroLevel/Services/PartitionStorage/Store.cs @@ -18,8 +18,8 @@ namespace ZeroLevel.Services.PartitionStorage public Store(StoreOptions options, IStoreSerializer serializer) { - if (options == null) throw new ArgumentNullException(nameof(options)); - if (serializer == null) throw new ArgumentNullException(nameof(serializer)); + if (options == null!) throw new ArgumentNullException(nameof(options)); + if (serializer == null!) throw new ArgumentNullException(nameof(serializer)); _options = options; _serializer = serializer; if (Directory.Exists(_options.RootFolder) == false) @@ -32,7 +32,7 @@ namespace ZeroLevel.Services.PartitionStorage public void RemovePartition(TMeta info) { var partition = CreateAccessor(info); - if (partition != null) + if (partition != null!) { string path; using (partition) @@ -48,7 +48,7 @@ namespace ZeroLevel.Services.PartitionStorage { if (false == Directory.Exists(_options.GetCatalogPath(info))) { - return null; + return null!; } return new StorePartitionAccessor(_options, info, _serializer, _fileAccessorCachee); } @@ -79,7 +79,7 @@ namespace ZeroLevel.Services.PartitionStorage foreach(var pair in partitionsSearchInfo) { var accessor = CreateAccessor(pair.Key); - if (accessor != null) + if (accessor != null!) { using (accessor) { @@ -101,7 +101,7 @@ namespace ZeroLevel.Services.PartitionStorage public async IAsyncEnumerable> Bypass(TMeta meta) { var accessor = CreateAccessor(meta); - if (accessor != null) + if (accessor != null!) { using (accessor) { @@ -116,7 +116,7 @@ namespace ZeroLevel.Services.PartitionStorage public async IAsyncEnumerable BypassKeys(TMeta meta) { var accessor = CreateAccessor(meta); - if (accessor != null) + if (accessor != null!) { using (accessor) { @@ -131,7 +131,7 @@ namespace ZeroLevel.Services.PartitionStorage public async Task Exists(TMeta meta, TKey key) { var accessor = CreateAccessor(meta); - if (accessor != null) + if (accessor != null!) { using (accessor) { diff --git a/ZeroLevel/Services/Pools/ObjectPool.cs b/ZeroLevel/Services/Pools/ObjectPool.cs index bf36d31..61e03e6 100644 --- a/ZeroLevel/Services/Pools/ObjectPool.cs +++ b/ZeroLevel/Services/Pools/ObjectPool.cs @@ -26,7 +26,7 @@ if (size <= 0) throw new ArgumentOutOfRangeException("size", size, "Argument 'size' must be greater than zero."); - if (factory == null) + if (factory == null!) throw new ArgumentNullException("factory"); this.size = size; @@ -242,7 +242,7 @@ public void Store(T item) { Slot slot = slots.Find(s => object.Equals(s.Item, item)); - if (slot == null) + if (slot == null!) { slot = new Slot(item); slots.Add(slot); diff --git a/ZeroLevel/Services/Queries/Builder/MemoryStorageQueryBuilder.cs b/ZeroLevel/Services/Queries/Builder/MemoryStorageQueryBuilder.cs index c3bf28d..a212348 100644 --- a/ZeroLevel/Services/Queries/Builder/MemoryStorageQueryBuilder.cs +++ b/ZeroLevel/Services/Queries/Builder/MemoryStorageQueryBuilder.cs @@ -31,17 +31,17 @@ namespace ZeroLevel.Patterns.Queries { if (query is AndQuery) { - return ResolveQueryAnd(query as AndQuery); + return ResolveQueryAnd((query as AndQuery)!); } else if (query is OrQuery) { - return ResolveQueryOr(query as OrQuery); + return ResolveQueryOr((query as OrQuery)!); } else if (query is NotQuery) { - return ResolveQueryNot(query as NotQuery); + return ResolveQueryNot((query as NotQuery)!); } - return ResolveQueryOp(query as QueryOp); + return ResolveQueryOp((query as QueryOp)!); } private static Expression> ResolveQueryOp(QueryOp query) @@ -117,7 +117,7 @@ namespace ZeroLevel.Patterns.Queries param, constant); return Expression.Lambda>(call, new[] { argument }); } - return null; + return null!; } private static Expression> ResolveQueryAnd(AndQuery query) diff --git a/ZeroLevel/Services/Queries/Query.cs b/ZeroLevel/Services/Queries/Query.cs index a5b25ad..217ec2f 100644 --- a/ZeroLevel/Services/Queries/Query.cs +++ b/ZeroLevel/Services/Queries/Query.cs @@ -39,7 +39,7 @@ public static IQuery ALL() { - return new QueryOp(string.Empty, null, QueryOperation.ALL); + return new QueryOp(string.Empty, null!, QueryOperation.ALL); } } } \ No newline at end of file diff --git a/ZeroLevel/Services/Queries/Storage/MemoryStorage.cs b/ZeroLevel/Services/Queries/Storage/MemoryStorage.cs index 167268c..6fe20c2 100644 --- a/ZeroLevel/Services/Queries/Storage/MemoryStorage.cs +++ b/ZeroLevel/Services/Queries/Storage/MemoryStorage.cs @@ -50,7 +50,7 @@ namespace ZeroLevel.Patterns.Queries _lock.EnterReadLock(); try { - return _memory.Select(i => (T)TypeMapper.CopyDTO(i)); + return _memory.Select(i => (T)TypeMapper.CopyDTO(i!)); } finally { @@ -64,7 +64,7 @@ namespace ZeroLevel.Patterns.Queries try { var q = _queryBuilder.Build(query); - return _memory.Where(q.Query).Select(i => (T)TypeMapper.CopyDTO(i)); + return _memory.Where(q.Query).Select(i => (T)TypeMapper.CopyDTO(i!)); } finally { @@ -77,7 +77,7 @@ namespace ZeroLevel.Patterns.Queries _lock.EnterWriteLock(); try { - var insert = (T)TypeMapper.CopyDTO(obj); + var insert = (T)TypeMapper.CopyDTO(obj!); if (_memory.Add(insert)) { return QueryResult.Result(1); diff --git a/ZeroLevel/Services/Reflection/EntryAssebmlyAttribute.cs b/ZeroLevel/Services/Reflection/EntryAssebmlyAttribute.cs index 372b4b4..ecd5237 100644 --- a/ZeroLevel/Services/Reflection/EntryAssebmlyAttribute.cs +++ b/ZeroLevel/Services/Reflection/EntryAssebmlyAttribute.cs @@ -56,7 +56,7 @@ namespace ZeroLevel.Services.Reflection // a compiler error. var attribute = assembly.GetCustomAttributes().OfType().SingleOrDefault(); - if (attribute != null) + if (attribute != null!) { entryAssemblies.Add(assembly); } diff --git a/ZeroLevel/Services/Reflection/StackTraceReader.cs b/ZeroLevel/Services/Reflection/StackTraceReader.cs index 865c63c..fbc547f 100644 --- a/ZeroLevel/Services/Reflection/StackTraceReader.cs +++ b/ZeroLevel/Services/Reflection/StackTraceReader.cs @@ -21,7 +21,7 @@ namespace ZeroLevel.Services.Reflection foreach (var frame in stackTrace.GetFrames() ?? Enumerable.Empty()) { var method = frame.GetMethod(); - if (method != null && method.DeclaringType != null) + if (method != null && method.DeclaringType != null!) { var type = method.DeclaringType.Name; if (false == type.Equals("StackTraceReader", StringComparison.Ordinal)) diff --git a/ZeroLevel/Services/Reflection/StringToTypeConverter.cs b/ZeroLevel/Services/Reflection/StringToTypeConverter.cs index cd088b8..b01bf40 100644 --- a/ZeroLevel/Services/Reflection/StringToTypeConverter.cs +++ b/ZeroLevel/Services/Reflection/StringToTypeConverter.cs @@ -39,7 +39,7 @@ namespace ZeroLevel.Services.Reflection { return Activator.CreateInstance(type); } - return null; + return null!; } #endregion TypeHelpers diff --git a/ZeroLevel/Services/Reflection/TypeGetterSetterBuilder.cs b/ZeroLevel/Services/Reflection/TypeGetterSetterBuilder.cs index 38e514e..4a27679 100644 --- a/ZeroLevel/Services/Reflection/TypeGetterSetterBuilder.cs +++ b/ZeroLevel/Services/Reflection/TypeGetterSetterBuilder.cs @@ -8,7 +8,7 @@ namespace ZeroLevel.Services.Reflection { public static Func BuildGetter(FieldInfo field) { - if (field == null) return null; + if (field == null!) return null!; var entity = Expression.Parameter(typeof(object), "o"); var target = field.DeclaringType.IsValueType ? Expression.Unbox(entity, field.DeclaringType) : @@ -21,8 +21,8 @@ namespace ZeroLevel.Services.Reflection public static Func BuildGetter(PropertyInfo property) { - if (property == null) return null; - if (property.CanRead == false) return null; + if (property == null!) return null!; + if (property.CanRead == false) return null!; var getterMethodInfo = property.GetGetMethod(); var entity = Expression.Parameter(typeof(object), "o"); var target = property.DeclaringType.IsValueType ? @@ -39,9 +39,9 @@ namespace ZeroLevel.Services.Reflection /// public static Action BuildSetter(FieldInfo field) { - if (field == null) + if (field == null!) { - return null; + return null!; } var instance = Expression.Parameter(typeof(object), "target"); var inputValue = Expression.Parameter(typeof(object), "value"); @@ -74,7 +74,7 @@ namespace ZeroLevel.Services.Reflection { if (property == null || property.CanWrite == false) { - return null; + return null!; } var instance = Expression.Parameter(typeof(object), "target"); var inputValue = Expression.Parameter(typeof(object), "value"); @@ -106,7 +106,7 @@ namespace ZeroLevel.Services.Reflection { if (field == null || typeof(T) != field.DeclaringType) { - return null; + return null!; } var targetExp = Expression.Parameter(typeof(T), "target"); var inputValue = Expression.Parameter(typeof(object), "o"); @@ -133,7 +133,7 @@ namespace ZeroLevel.Services.Reflection { if (property == null || typeof(T) != property.DeclaringType || property.CanWrite == false) { - return null; + return null!; } var method = property.GetSetMethod(true); var instance = Expression.Parameter(property.DeclaringType, "i"); diff --git a/ZeroLevel/Services/Reflection/TypeHelpers.cs b/ZeroLevel/Services/Reflection/TypeHelpers.cs index c8c674e..8d66c01 100644 --- a/ZeroLevel/Services/Reflection/TypeHelpers.cs +++ b/ZeroLevel/Services/Reflection/TypeHelpers.cs @@ -24,7 +24,7 @@ namespace ZeroLevel.Services.Reflection if (givenType.IsGenericType && givenType.GetGenericTypeDefinition() == genericType) return true; Type baseType = givenType.BaseType; - if (baseType == null) return false; + if (baseType == null!) return false; return IsAssignableToGenericType(baseType, genericType); } public static bool IsNumericType(Type type) @@ -206,19 +206,18 @@ namespace ZeroLevel.Services.Reflection public static object CreateDefaultState(Type type) { - return type. - Return(t => t.IsValueType ? Activator.CreateInstance(type) : null, null); + return type.Return(t => t.IsValueType ? Activator.CreateInstance(type) : null, null)!; } public static object CreateInitialState(Type type) { - if (type == null) + if (type == null!) { throw new ArgumentNullException(nameof(type)); } if (IsString(type)) { - return null; + return null!; } if (IsArray(type)) { @@ -237,7 +236,7 @@ namespace ZeroLevel.Services.Reflection return Activator.CreateInstance(dictType); } var constructor = type.GetConstructor(Type.EmptyTypes); - if (constructor != null) + if (constructor != null!) return Activator.CreateInstance(type); return FormatterServices.GetUninitializedObject(type); } @@ -249,7 +248,7 @@ namespace ZeroLevel.Services.Reflection public static object CreateNonInitializedInstance(Type type) { - if (type == null) + if (type == null!) { throw new ArgumentNullException(nameof(type)); } @@ -259,8 +258,8 @@ namespace ZeroLevel.Services.Reflection public static Type GetElementTypeOfEnumerable(object o) { var enumerable = o as IEnumerable; - if (enumerable == null) - return null; + if (enumerable == null!) + return null!; Type[] interfaces = enumerable.GetType().GetInterfaces(); return (from i in interfaces where i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IEnumerable<>) diff --git a/ZeroLevel/Services/Semantic/Contracts/LexToken.cs b/ZeroLevel/Services/Semantic/Contracts/LexToken.cs index 1df5bf5..75f4467 100644 --- a/ZeroLevel/Services/Semantic/Contracts/LexToken.cs +++ b/ZeroLevel/Services/Semantic/Contracts/LexToken.cs @@ -25,18 +25,18 @@ namespace ZeroLevel.Services.Semantic public override bool Equals(object obj) { - if (this == null) + if (this == null!) throw new NullReferenceException(); - return this.Equals(obj as LexToken); + return this.Equals((obj as LexToken)!); } public bool Equals(LexToken other) { if ((object)this == (object)other) return true; - if (this == null) + if (this == null!) throw new NullReferenceException(); - if (other == null) + if (other == null!) return false; if (ReferenceEquals(this, other)) return true; diff --git a/ZeroLevel/Services/Semantic/Helpers/BagOfTerms.cs b/ZeroLevel/Services/Semantic/Helpers/BagOfTerms.cs index f523a9e..ed7d8d7 100644 --- a/ZeroLevel/Services/Semantic/Helpers/BagOfTerms.cs +++ b/ZeroLevel/Services/Semantic/Helpers/BagOfTerms.cs @@ -15,20 +15,20 @@ namespace ZeroLevel.Services.Semantic.Helpers private string[] _words; private ILexProvider _lexer; - public BagOfTerms(string text) : this(TextAnalizer.ExtractWords(text).ToArray(), null) { } + public BagOfTerms(string text) : this(TextAnalizer.ExtractWords(text).ToArray(), null!) { } public BagOfTerms(string text, ILexProvider lexer) : this(TextAnalizer.ExtractWords(text).ToArray(), lexer) { } - public BagOfTerms(IEnumerable words) : this(words.ToArray(), null) { } + public BagOfTerms(IEnumerable words) : this(words.ToArray(), null!) { } public BagOfTerms(IEnumerable words, ILexProvider lexer) : this(words.ToArray(), lexer) { } - public BagOfTerms(string[] words) : this(words, null) { } + public BagOfTerms(string[] words) : this(words, null!) { } public BagOfTerms(string[] words, ILexProvider lexer) { _lexer = lexer; - _frequency = null; + _frequency = null!; _words = _lexer == null ? words : _lexer.ExtractLexTokens(words).Select(t => t.Token).ToArray(); } @@ -38,7 +38,7 @@ namespace ZeroLevel.Services.Semantic.Helpers public IDictionary Freguency() { - if (_frequency == null) + if (_frequency == null!) { var frequency = new Dictionary(); for (int i = 0; i < _words.Length; i++) diff --git a/ZeroLevel/Services/Semantic/LexProvider.cs b/ZeroLevel/Services/Semantic/LexProvider.cs index 2dcbd2c..8775cfd 100644 --- a/ZeroLevel/Services/Semantic/LexProvider.cs +++ b/ZeroLevel/Services/Semantic/LexProvider.cs @@ -65,7 +65,7 @@ namespace ZeroLevel.Services.Semantic public IDictionary> SearchLexTokensByWords(string text, string[] words) { var result = new Dictionary>(); - if (false == string.IsNullOrWhiteSpace(text) && words != null) + if (false == string.IsNullOrWhiteSpace(text) && words != null!) { var textWords = ExtractLexTokens(text).ToList(); var keywords = words.Select(w => new Tuple(w, _lexer.Lex(w))); @@ -85,7 +85,7 @@ namespace ZeroLevel.Services.Semantic public IDictionary> SearchLexTokensByPhrases(string text, string[] phrases) { var result = new Dictionary>(); - if (false == string.IsNullOrWhiteSpace(text) && phrases != null) + if (false == string.IsNullOrWhiteSpace(text) && phrases != null!) { var text_tokens = ExtractLexTokens(text).ToList(); foreach (var phrase in phrases) diff --git a/ZeroLevel/Services/Semantic/LexProviderFactory.cs b/ZeroLevel/Services/Semantic/LexProviderFactory.cs index 7ad6e21..79edbf0 100644 --- a/ZeroLevel/Services/Semantic/LexProviderFactory.cs +++ b/ZeroLevel/Services/Semantic/LexProviderFactory.cs @@ -16,7 +16,7 @@ namespace ZeroLevel.Services.Semantic public static ILexProvider CreateStemProvider(Languages language) { - ILexer lexer = null; + ILexer lexer = null!; switch (language) { case Languages.Czech: diff --git a/ZeroLevel/Services/Semantic/Search/BoyerMoore.cs b/ZeroLevel/Services/Semantic/Search/BoyerMoore.cs index 3912949..2088a84 100644 --- a/ZeroLevel/Services/Semantic/Search/BoyerMoore.cs +++ b/ZeroLevel/Services/Semantic/Search/BoyerMoore.cs @@ -29,8 +29,8 @@ namespace ZeroLevel.Services.Semantic.Helpers /// Returns the position of the first occurrence of the pattern. If not found returns -1. public static int BoyerMooreSearchFirst(string target, string pattern) { - if (target == null) throw new ArgumentNullException(nameof(target)); - if (pattern == null) throw new ArgumentNullException(nameof(pattern)); + if (target == null!) throw new ArgumentNullException(nameof(target)); + if (pattern == null!) throw new ArgumentNullException(nameof(pattern)); // Build tables var badCharTable = BuildBadCharacterTable(pattern); @@ -71,8 +71,8 @@ namespace ZeroLevel.Services.Semantic.Helpers /// Returns of values of the positions at which the pattern occurs. is empty if none found. public static IList BoyerMooreSearchAll(string target, string pattern) { - if (target == null) throw new ArgumentNullException(nameof(target)); - if (pattern == null) throw new ArgumentNullException(nameof(pattern)); + if (target == null!) throw new ArgumentNullException(nameof(target)); + if (pattern == null!) throw new ArgumentNullException(nameof(pattern)); // List with matches var matches = new List(); @@ -127,8 +127,8 @@ namespace ZeroLevel.Services.Semantic.Helpers /// If a pattern is not found there is no entry in the dictionary. public static Dictionary BoyerMooreMultipleSearchFirst(string target, IList patterns) { - if (target == null) throw new ArgumentNullException(nameof(target)); - if (patterns == null) throw new ArgumentNullException(nameof(patterns)); + if (target == null!) throw new ArgumentNullException(nameof(target)); + if (patterns == null!) throw new ArgumentNullException(nameof(patterns)); // Dictionary with matches var matches = new Dictionary(); @@ -152,8 +152,8 @@ namespace ZeroLevel.Services.Semantic.Helpers /// If a pattern is not found there is no entry in the dictionary. public static Dictionary> BoyerMooreMultipleSearchAll(string target, IList patterns) { - if (target == null) throw new ArgumentNullException(nameof(target)); - if (patterns == null) throw new ArgumentNullException(nameof(patterns)); + if (target == null!) throw new ArgumentNullException(nameof(target)); + if (patterns == null!) throw new ArgumentNullException(nameof(patterns)); // Dictionary with matches var matches = new Dictionary>(); diff --git a/ZeroLevel/Services/Semantic/Search/KnuthMorrisPratt.cs b/ZeroLevel/Services/Semantic/Search/KnuthMorrisPratt.cs index 20c6121..8d258d5 100644 --- a/ZeroLevel/Services/Semantic/Search/KnuthMorrisPratt.cs +++ b/ZeroLevel/Services/Semantic/Search/KnuthMorrisPratt.cs @@ -54,8 +54,8 @@ namespace ZeroLevel.Services.Semantic.Helpers /// Returns the position of the first occurrence of the pattern. If not found returns -1. public static int KnuthMorrisPrattSearchFirst(string target, string pattern) { - if (target == null) throw new ArgumentNullException(nameof(target)); - if (pattern == null) throw new ArgumentNullException(nameof(pattern)); + if (target == null!) throw new ArgumentNullException(nameof(target)); + if (pattern == null!) throw new ArgumentNullException(nameof(pattern)); // Build KMP table var kmpTable = BuildKMPTable(pattern); @@ -102,8 +102,8 @@ namespace ZeroLevel.Services.Semantic.Helpers /// Returns of values of the positions at which the pattern occurs. is empty if none found. public static IList KnuthMorrisPrattSearchAll(string target, string pattern) { - if (target == null) throw new ArgumentNullException(nameof(target)); - if (pattern == null) throw new ArgumentNullException(nameof(pattern)); + if (target == null!) throw new ArgumentNullException(nameof(target)); + if (pattern == null!) throw new ArgumentNullException(nameof(pattern)); // List with matches var matches = new List(); @@ -171,8 +171,8 @@ namespace ZeroLevel.Services.Semantic.Helpers /// If a pattern is not found there is no entry in the dictionary. public static Dictionary KnuthMorrisPrattMultipleSearchFirst(string target, IList patterns) { - if (target == null) throw new ArgumentNullException(nameof(target)); - if (patterns == null) throw new ArgumentNullException(nameof(patterns)); + if (target == null!) throw new ArgumentNullException(nameof(target)); + if (patterns == null!) throw new ArgumentNullException(nameof(patterns)); // Dictionary with matches var matches = new Dictionary(); @@ -196,8 +196,8 @@ namespace ZeroLevel.Services.Semantic.Helpers /// If a pattern is not found there is no entry in the dictionary. public static Dictionary> KnuthMorrisPrattMultipleSearchAll(string target, IList patterns) { - if (target == null) throw new ArgumentNullException(nameof(target)); - if (patterns == null) throw new ArgumentNullException(nameof(patterns)); + if (target == null!) throw new ArgumentNullException(nameof(target)); + if (patterns == null!) throw new ArgumentNullException(nameof(patterns)); // Dictionary with matches var matches = new Dictionary>(); diff --git a/ZeroLevel/Services/Semantic/Search/RabinKarp.cs b/ZeroLevel/Services/Semantic/Search/RabinKarp.cs index 31d7eca..6f34b6a 100644 --- a/ZeroLevel/Services/Semantic/Search/RabinKarp.cs +++ b/ZeroLevel/Services/Semantic/Search/RabinKarp.cs @@ -13,8 +13,8 @@ namespace ZeroLevel.Services.Semantic.Helpers /// Returns the position of the first occurrence of the pattern. If not found returns -1. public static int RabinKarpSearchFirst(string target, string pattern) { - if (target == null) throw new ArgumentNullException(nameof(target)); - if (pattern == null) throw new ArgumentNullException(nameof(pattern)); + if (target == null!) throw new ArgumentNullException(nameof(target)); + if (pattern == null!) throw new ArgumentNullException(nameof(pattern)); // Save for faster access int patternLength = pattern.Length; @@ -72,8 +72,8 @@ namespace ZeroLevel.Services.Semantic.Helpers /// Returns of values of the positions at which the pattern occurs. is empty if none found. public static IList RabinKarpSearchAll(string target, string pattern) { - if (target == null) throw new ArgumentNullException(nameof(target)); - if (pattern == null) throw new ArgumentNullException(nameof(pattern)); + if (target == null!) throw new ArgumentNullException(nameof(target)); + if (pattern == null!) throw new ArgumentNullException(nameof(pattern)); // Save for faster access int patternLength = pattern.Length; @@ -135,8 +135,8 @@ namespace ZeroLevel.Services.Semantic.Helpers /// If a pattern is not found there is no entry in the dictionary. public static Dictionary RabinKarpMultipleSearchFirst(string target, IList patterns) { - if (target == null) throw new ArgumentNullException(nameof(target)); - if (patterns == null) throw new ArgumentNullException(nameof(patterns)); + if (target == null!) throw new ArgumentNullException(nameof(target)); + if (patterns == null!) throw new ArgumentNullException(nameof(patterns)); // Dictionary with pattern hashes for all strings var patternHashes = new Dictionary(); @@ -241,8 +241,8 @@ namespace ZeroLevel.Services.Semantic.Helpers /// If a pattern is not found there is no entry in the dictionary. public static Dictionary> RabinKarpMultipleSearchAll(string target, IList patterns) { - if (target == null) throw new ArgumentNullException(nameof(target)); - if (patterns == null) throw new ArgumentNullException(nameof(patterns)); + if (target == null!) throw new ArgumentNullException(nameof(target)); + if (patterns == null!) throw new ArgumentNullException(nameof(patterns)); // Dictionary with pattern hashes for all strings var patternHashes = new Dictionary(); diff --git a/ZeroLevel/Services/Semantic/Snowball/DanishStemmer.cs b/ZeroLevel/Services/Semantic/Snowball/DanishStemmer.cs index f6844e6..6812297 100644 --- a/ZeroLevel/Services/Semantic/Snowball/DanishStemmer.cs +++ b/ZeroLevel/Services/Semantic/Snowball/DanishStemmer.cs @@ -17,55 +17,55 @@ namespace Iveonik.Stemmers private readonly static Among[] a_0 = { - new Among ( "hed", -1, 1, null ), - new Among ( "ethed", 0, 1, null ), - new Among ( "ered", -1, 1, null ), - new Among ( "e", -1, 1, null ), - new Among ( "erede", 3, 1, null ), - new Among ( "ende", 3, 1, null ), - new Among ( "erende", 5, 1, null ), - new Among ( "ene", 3, 1, null ), - new Among ( "erne", 3, 1, null ), - new Among ( "ere", 3, 1, null ), - new Among ( "en", -1, 1, null ), - new Among ( "heden", 10, 1, null ), - new Among ( "eren", 10, 1, null ), - new Among ( "er", -1, 1, null ), - new Among ( "heder", 13, 1, null ), - new Among ( "erer", 13, 1, null ), - new Among ( "s", -1, 2, null ), - new Among ( "heds", 16, 1, null ), - new Among ( "es", 16, 1, null ), - new Among ( "endes", 18, 1, null ), - new Among ( "erendes", 19, 1, null ), - new Among ( "enes", 18, 1, null ), - new Among ( "ernes", 18, 1, null ), - new Among ( "eres", 18, 1, null ), - new Among ( "ens", 16, 1, null ), - new Among ( "hedens", 24, 1, null ), - new Among ( "erens", 24, 1, null ), - new Among ( "ers", 16, 1, null ), - new Among ( "ets", 16, 1, null ), - new Among ( "erets", 28, 1, null ), - new Among ( "et", -1, 1, null ), - new Among ( "eret", 30, 1, null ) + new Among ( "hed", -1, 1, null! ), + new Among ( "ethed", 0, 1, null! ), + new Among ( "ered", -1, 1, null! ), + new Among ( "e", -1, 1, null! ), + new Among ( "erede", 3, 1, null! ), + new Among ( "ende", 3, 1, null! ), + new Among ( "erende", 5, 1, null! ), + new Among ( "ene", 3, 1, null! ), + new Among ( "erne", 3, 1, null! ), + new Among ( "ere", 3, 1, null! ), + new Among ( "en", -1, 1, null! ), + new Among ( "heden", 10, 1, null! ), + new Among ( "eren", 10, 1, null! ), + new Among ( "er", -1, 1, null! ), + new Among ( "heder", 13, 1, null! ), + new Among ( "erer", 13, 1, null! ), + new Among ( "s", -1, 2, null! ), + new Among ( "heds", 16, 1, null! ), + new Among ( "es", 16, 1, null! ), + new Among ( "endes", 18, 1, null! ), + new Among ( "erendes", 19, 1, null! ), + new Among ( "enes", 18, 1, null! ), + new Among ( "ernes", 18, 1, null! ), + new Among ( "eres", 18, 1, null! ), + new Among ( "ens", 16, 1, null! ), + new Among ( "hedens", 24, 1, null! ), + new Among ( "erens", 24, 1, null! ), + new Among ( "ers", 16, 1, null! ), + new Among ( "ets", 16, 1, null! ), + new Among ( "erets", 28, 1, null! ), + new Among ( "et", -1, 1, null! ), + new Among ( "eret", 30, 1, null! ) }; private readonly static Among[] a_1 = { - new Among ( "gd", -1, -1, null ), - new Among ( "dt", -1, -1, null ), - new Among ( "gt", -1, -1, null ), - new Among ( "kt", -1, -1, null ) + new Among ( "gd", -1, -1, null! ), + new Among ( "dt", -1, -1, null! ), + new Among ( "gt", -1, -1, null! ), + new Among ( "kt", -1, -1, null! ) }; private readonly static Among[] a_2 = { - new Among ( "ig", -1, 1, null ), - new Among ( "lig", 0, 1, null ), - new Among ( "elig", 1, 1, null ), - new Among ( "els", -1, 1, null ), - new Among ( "l\u00F8st", -1, 2, null ) + new Among ( "ig", -1, 1, null! ), + new Among ( "lig", 0, 1, null! ), + new Among ( "elig", 1, 1, null! ), + new Among ( "els", -1, 1, null! ), + new Among ( "l\u00F8st", -1, 2, null! ) }; private static readonly char[] g_v = {(char)17, (char)65, (char)16, (char)1, (char)0, (char)0, (char)0, diff --git a/ZeroLevel/Services/Semantic/Snowball/DutchStemmer.cs b/ZeroLevel/Services/Semantic/Snowball/DutchStemmer.cs index 2698b16..597d512 100644 --- a/ZeroLevel/Services/Semantic/Snowball/DutchStemmer.cs +++ b/ZeroLevel/Services/Semantic/Snowball/DutchStemmer.cs @@ -16,58 +16,58 @@ namespace Iveonik.Stemmers private readonly static Among[] a_0 = { - new Among ( "", -1, 6, null ), - new Among ( "\u00E1", 0, 1, null ), - new Among ( "\u00E4", 0, 1, null ), - new Among ( "\u00E9", 0, 2, null ), - new Among ( "\u00EB", 0, 2, null ), - new Among ( "\u00ED", 0, 3, null ), - new Among ( "\u00EF", 0, 3, null ), - new Among ( "\u00F3", 0, 4, null ), - new Among ( "\u00F6", 0, 4, null ), - new Among ( "\u00FA", 0, 5, null ), - new Among ( "\u00FC", 0, 5, null ) + new Among ( "", -1, 6, null! ), + new Among ( "\u00E1", 0, 1, null! ), + new Among ( "\u00E4", 0, 1, null! ), + new Among ( "\u00E9", 0, 2, null! ), + new Among ( "\u00EB", 0, 2, null! ), + new Among ( "\u00ED", 0, 3, null! ), + new Among ( "\u00EF", 0, 3, null! ), + new Among ( "\u00F3", 0, 4, null! ), + new Among ( "\u00F6", 0, 4, null! ), + new Among ( "\u00FA", 0, 5, null! ), + new Among ( "\u00FC", 0, 5, null! ) }; private readonly static Among[] a_1 = { - new Among ( "", -1, 3, null ), - new Among ( "I", 0, 2, null ), - new Among ( "Y", 0, 1, null ) + new Among ( "", -1, 3, null! ), + new Among ( "I", 0, 2, null! ), + new Among ( "Y", 0, 1, null! ) }; private readonly static Among[] a_2 = { - new Among ( "dd", -1, -1, null ), - new Among ( "kk", -1, -1, null ), - new Among ( "tt", -1, -1, null ) + new Among ( "dd", -1, -1, null! ), + new Among ( "kk", -1, -1, null! ), + new Among ( "tt", -1, -1, null! ) }; private readonly static Among[] a_3 = { - new Among ( "ene", -1, 2, null ), - new Among ( "se", -1, 3, null ), - new Among ( "en", -1, 2, null ), - new Among ( "heden", 2, 1, null ), - new Among ( "s", -1, 3, null ) + new Among ( "ene", -1, 2, null! ), + new Among ( "se", -1, 3, null! ), + new Among ( "en", -1, 2, null! ), + new Among ( "heden", 2, 1, null! ), + new Among ( "s", -1, 3, null! ) }; private readonly static Among[] a_4 = { - new Among ( "end", -1, 1, null ), - new Among ( "ig", -1, 2, null ), - new Among ( "ing", -1, 1, null ), - new Among ( "lijk", -1, 3, null ), - new Among ( "baar", -1, 4, null ), - new Among ( "bar", -1, 5, null ) + new Among ( "end", -1, 1, null! ), + new Among ( "ig", -1, 2, null! ), + new Among ( "ing", -1, 1, null! ), + new Among ( "lijk", -1, 3, null! ), + new Among ( "baar", -1, 4, null! ), + new Among ( "bar", -1, 5, null! ) }; private readonly static Among[] a_5 = { - new Among ( "aa", -1, -1, null ), - new Among ( "ee", -1, -1, null ), - new Among ( "oo", -1, -1, null ), - new Among ( "uu", -1, -1, null ) + new Among ( "aa", -1, -1, null! ), + new Among ( "ee", -1, -1, null! ), + new Among ( "oo", -1, -1, null! ), + new Among ( "uu", -1, -1, null! ) }; private static readonly char[] g_v = {(char)17, (char)65, (char)16, (char)1, (char)0, (char)0, (char)0, diff --git a/ZeroLevel/Services/Semantic/Snowball/EnglishStemmer.cs b/ZeroLevel/Services/Semantic/Snowball/EnglishStemmer.cs index 8f32960..cce89ec 100644 --- a/ZeroLevel/Services/Semantic/Snowball/EnglishStemmer.cs +++ b/ZeroLevel/Services/Semantic/Snowball/EnglishStemmer.cs @@ -14,156 +14,156 @@ namespace Iveonik.Stemmers { private readonly static Among[] a_0 = { - new Among ( "arsen", -1, -1,null ), - new Among ( "commun", -1, -1, null ), - new Among ( "gener", -1, -1, null ) + new Among ( "arsen", -1, -1,null! ), + new Among ( "commun", -1, -1, null! ), + new Among ( "gener", -1, -1, null! ) }; private readonly static Among[] a_1 = { - new Among ( "'", -1, 1, null), - new Among ( "'s'", 0, 1, null), - new Among ( "'s", -1, 1, null) + new Among ( "'", -1, 1, null!), + new Among ( "'s'", 0, 1, null!), + new Among ( "'s", -1, 1, null!) }; private readonly static Among[] a_2 = { - new Among ( "ied", -1, 2, null), - new Among ( "s", -1, 3, null), - new Among ( "ies", 1, 2, null), - new Among ( "sses", 1, 1, null), - new Among ( "ss", 1, -1, null), - new Among ( "us", 1, -1, null) + new Among ( "ied", -1, 2, null!), + new Among ( "s", -1, 3, null!), + new Among ( "ies", 1, 2, null!), + new Among ( "sses", 1, 1, null!), + new Among ( "ss", 1, -1, null!), + new Among ( "us", 1, -1, null!) }; private readonly static Among[] a_3 = { - new Among ( "", -1, 3, null), - new Among ( "bb", 0, 2, null), - new Among ( "dd", 0, 2, null), - new Among ( "ff", 0, 2, null), - new Among ( "gg", 0, 2, null), - new Among ( "bl", 0, 1, null), - new Among ( "mm", 0, 2, null), - new Among ( "nn", 0, 2, null), - new Among ( "pp", 0, 2, null), - new Among ( "rr", 0, 2, null), - new Among ( "at", 0, 1, null), - new Among ( "tt", 0, 2, null), - new Among ( "iz", 0, 1, null) + new Among ( "", -1, 3, null!), + new Among ( "bb", 0, 2, null!), + new Among ( "dd", 0, 2, null!), + new Among ( "ff", 0, 2, null!), + new Among ( "gg", 0, 2, null!), + new Among ( "bl", 0, 1, null!), + new Among ( "mm", 0, 2, null!), + new Among ( "nn", 0, 2, null!), + new Among ( "pp", 0, 2, null!), + new Among ( "rr", 0, 2, null!), + new Among ( "at", 0, 1, null!), + new Among ( "tt", 0, 2, null!), + new Among ( "iz", 0, 1, null!) }; private readonly static Among[] a_4 = { - new Among ( "ed", -1, 2, null), - new Among ( "eed", 0, 1, null), - new Among ( "ing", -1, 2, null), - new Among ( "edly", -1, 2, null), - new Among ( "eedly", 3, 1, null), - new Among ( "ingly", -1, 2, null) + new Among ( "ed", -1, 2, null!), + new Among ( "eed", 0, 1, null!), + new Among ( "ing", -1, 2, null!), + new Among ( "edly", -1, 2, null!), + new Among ( "eedly", 3, 1, null!), + new Among ( "ingly", -1, 2, null!) }; private readonly static Among[] a_5 = { - new Among ( "anci", -1, 3, null), - new Among ( "enci", -1, 2, null), - new Among ( "ogi", -1, 13, null), - new Among ( "li", -1, 16, null), - new Among ( "bli", 3, 12, null), - new Among ( "abli", 4, 4, null), - new Among ( "alli", 3, 8, null), - new Among ( "fulli", 3, 14, null), - new Among ( "lessli", 3, 15, null), - new Among ( "ousli", 3, 10, null), - new Among ( "entli", 3, 5, null), - new Among ( "aliti", -1, 8, null), - new Among ( "biliti", -1, 12, null), - new Among ( "iviti", -1, 11, null), - new Among ( "tional", -1, 1, null), - new Among ( "ational", 14, 7, null), - new Among ( "alism", -1, 8, null), - new Among ( "ation", -1, 7, null), - new Among ( "ization", 17, 6, null), - new Among ( "izer", -1, 6, null), - new Among ( "ator", -1, 7, null), - new Among ( "iveness", -1, 11, null), - new Among ( "fulness", -1, 9, null), - new Among ( "ousness", -1, 10, null) + new Among ( "anci", -1, 3, null!), + new Among ( "enci", -1, 2, null!), + new Among ( "ogi", -1, 13, null!), + new Among ( "li", -1, 16, null!), + new Among ( "bli", 3, 12, null!), + new Among ( "abli", 4, 4, null!), + new Among ( "alli", 3, 8, null!), + new Among ( "fulli", 3, 14, null!), + new Among ( "lessli", 3, 15, null!), + new Among ( "ousli", 3, 10, null!), + new Among ( "entli", 3, 5, null!), + new Among ( "aliti", -1, 8, null!), + new Among ( "biliti", -1, 12, null!), + new Among ( "iviti", -1, 11, null!), + new Among ( "tional", -1, 1, null!), + new Among ( "ational", 14, 7, null!), + new Among ( "alism", -1, 8, null!), + new Among ( "ation", -1, 7, null!), + new Among ( "ization", 17, 6, null!), + new Among ( "izer", -1, 6, null!), + new Among ( "ator", -1, 7, null!), + new Among ( "iveness", -1, 11, null!), + new Among ( "fulness", -1, 9, null!), + new Among ( "ousness", -1, 10, null!) }; private readonly static Among[] a_6 = { - new Among ( "icate", -1, 4, null), - new Among ( "ative", -1, 6, null), - new Among ( "alize", -1, 3, null), - new Among ( "iciti", -1, 4, null), - new Among ( "ical", -1, 4, null), - new Among ( "tional", -1, 1, null), - new Among ( "ational", 5, 2, null), - new Among ( "ful", -1, 5, null), - new Among ( "ness", -1, 5, null) + new Among ( "icate", -1, 4, null!), + new Among ( "ative", -1, 6, null!), + new Among ( "alize", -1, 3, null!), + new Among ( "iciti", -1, 4, null!), + new Among ( "ical", -1, 4, null!), + new Among ( "tional", -1, 1, null!), + new Among ( "ational", 5, 2, null!), + new Among ( "ful", -1, 5, null!), + new Among ( "ness", -1, 5, null!) }; private readonly static Among[] a_7 = { - new Among ( "ic", -1, 1, null), - new Among ( "ance", -1, 1, null), - new Among ( "ence", -1, 1, null), - new Among ( "able", -1, 1, null), - new Among ( "ible", -1, 1, null), - new Among ( "ate", -1, 1, null), - new Among ( "ive", -1, 1, null), - new Among ( "ize", -1, 1, null), - new Among ( "iti", -1, 1, null), - new Among ( "al", -1, 1, null), - new Among ( "ism", -1, 1, null), - new Among ( "ion", -1, 2, null), - new Among ( "er", -1, 1, null), - new Among ( "ous", -1, 1, null), - new Among ( "ant", -1, 1, null), - new Among ( "ent", -1, 1, null), - new Among ( "ment", 15, 1, null), - new Among ( "ement", 16, 1, null) + new Among ( "ic", -1, 1, null!), + new Among ( "ance", -1, 1, null!), + new Among ( "ence", -1, 1, null!), + new Among ( "able", -1, 1, null!), + new Among ( "ible", -1, 1, null!), + new Among ( "ate", -1, 1, null!), + new Among ( "ive", -1, 1, null!), + new Among ( "ize", -1, 1, null!), + new Among ( "iti", -1, 1, null!), + new Among ( "al", -1, 1, null!), + new Among ( "ism", -1, 1, null!), + new Among ( "ion", -1, 2, null!), + new Among ( "er", -1, 1, null!), + new Among ( "ous", -1, 1, null!), + new Among ( "ant", -1, 1, null!), + new Among ( "ent", -1, 1, null!), + new Among ( "ment", 15, 1, null!), + new Among ( "ement", 16, 1, null!) }; private readonly static Among[] a_8 = { - new Among ( "e", -1, 1, null), - new Among ( "l", -1, 2, null) + new Among ( "e", -1, 1, null!), + new Among ( "l", -1, 2, null!) }; private readonly static Among[] a_9 = { - new Among ( "succeed", -1, -1, null), - new Among ( "proceed", -1, -1, null), - new Among ( "exceed", -1, -1, null), - new Among ( "canning", -1, -1, null), - new Among ( "inning", -1, -1, null), - new Among ( "earring", -1, -1, null), - new Among ( "herring", -1, -1, null), - new Among ( "outing", -1, -1, null) + new Among ( "succeed", -1, -1, null!), + new Among ( "proceed", -1, -1, null!), + new Among ( "exceed", -1, -1, null!), + new Among ( "canning", -1, -1, null!), + new Among ( "inning", -1, -1, null!), + new Among ( "earring", -1, -1, null!), + new Among ( "herring", -1, -1, null!), + new Among ( "outing", -1, -1, null!) }; private readonly static Among[] a_10 = { - new Among ( "andes", -1, -1, null), - new Among ( "atlas", -1, -1, null), - new Among ( "bias", -1, -1, null), - new Among ( "cosmos", -1, -1, null), - new Among ( "dying", -1, 3, null), - new Among ( "early", -1, 9, null), - new Among ( "gently", -1, 7, null), - new Among ( "howe", -1, -1, null), - new Among ( "idly", -1, 6, null), - new Among ( "lying", -1, 4, null), - new Among ( "news", -1, -1, null), - new Among ( "only", -1, 10, null), - new Among ( "singly", -1, 11, null), - new Among ( "skies", -1, 2, null), - new Among ( "skis", -1, 1, null), - new Among ( "sky", -1, -1, null), - new Among ( "tying", -1, 5, null), - new Among ( "ugly", -1, 8, null) + new Among ( "andes", -1, -1, null!), + new Among ( "atlas", -1, -1, null!), + new Among ( "bias", -1, -1, null!), + new Among ( "cosmos", -1, -1, null!), + new Among ( "dying", -1, 3, null!), + new Among ( "early", -1, 9, null!), + new Among ( "gently", -1, 7, null!), + new Among ( "howe", -1, -1, null!), + new Among ( "idly", -1, 6, null!), + new Among ( "lying", -1, 4, null!), + new Among ( "news", -1, -1, null!), + new Among ( "only", -1, 10, null!), + new Among ( "singly", -1, 11, null!), + new Among ( "skies", -1, 2, null!), + new Among ( "skis", -1, 1, null!), + new Among ( "sky", -1, -1, null!), + new Among ( "tying", -1, 5, null!), + new Among ( "ugly", -1, 8, null!) }; private static readonly char[] g_v = { (char)17, (char)65, (char)16, (char)1 }; diff --git a/ZeroLevel/Services/Semantic/Snowball/FinnishStemmer.cs b/ZeroLevel/Services/Semantic/Snowball/FinnishStemmer.cs index 7514fb0..126543a 100644 --- a/ZeroLevel/Services/Semantic/Snowball/FinnishStemmer.cs +++ b/ZeroLevel/Services/Semantic/Snowball/FinnishStemmer.cs @@ -20,121 +20,121 @@ namespace Iveonik.Stemmers public delegate bool DelegateType(); private readonly static Among[] a_0 = { - new Among ( "pa", -1, 1, null ), - new Among ( "sti", -1, 2, null ), - new Among ( "kaan", -1, 1, null ), - new Among ( "han", -1, 1, null ), - new Among ( "kin", -1, 1, null ), - new Among ( "h\u00E4n", -1, 1, null ), - new Among ( "k\u00E4\u00E4n", -1, 1, null ), - new Among ( "ko", -1, 1, null ), - new Among ( "p\u00E4", -1, 1, null ), - new Among ( "k\u00F6", -1, 1, null ) + new Among ( "pa", -1, 1, null! ), + new Among ( "sti", -1, 2, null! ), + new Among ( "kaan", -1, 1, null! ), + new Among ( "han", -1, 1, null! ), + new Among ( "kin", -1, 1, null! ), + new Among ( "h\u00E4n", -1, 1, null! ), + new Among ( "k\u00E4\u00E4n", -1, 1, null! ), + new Among ( "ko", -1, 1, null! ), + new Among ( "p\u00E4", -1, 1, null! ), + new Among ( "k\u00F6", -1, 1, null! ) }; private readonly static Among[] a_1 = { - new Among ( "lla", -1, -1, null ), - new Among ( "na", -1, -1, null ), - new Among ( "ssa", -1, -1, null ), - new Among ( "ta", -1, -1, null ), - new Among ( "lta", 3, -1, null ), - new Among ( "sta", 3, -1, null ) + new Among ( "lla", -1, -1, null! ), + new Among ( "na", -1, -1, null! ), + new Among ( "ssa", -1, -1, null! ), + new Among ( "ta", -1, -1, null! ), + new Among ( "lta", 3, -1, null! ), + new Among ( "sta", 3, -1, null! ) }; private readonly static Among[] a_2 = { - new Among ( "ll\u00E4", -1, -1, null ), - new Among ( "n\u00E4", -1, -1, null ), - new Among ( "ss\u00E4", -1, -1, null ), - new Among ( "t\u00E4", -1, -1, null ), - new Among ( "lt\u00E4", 3, -1, null ), - new Among ( "st\u00E4", 3, -1, null ) + new Among ( "ll\u00E4", -1, -1, null! ), + new Among ( "n\u00E4", -1, -1, null! ), + new Among ( "ss\u00E4", -1, -1, null! ), + new Among ( "t\u00E4", -1, -1, null! ), + new Among ( "lt\u00E4", 3, -1, null! ), + new Among ( "st\u00E4", 3, -1, null! ) }; private readonly static Among[] a_3 = { - new Among ( "lle", -1, -1, null ), - new Among ( "ine", -1, -1, null ) + new Among ( "lle", -1, -1, null! ), + new Among ( "ine", -1, -1, null! ) }; private readonly static Among[] a_4 = { - new Among ( "nsa", -1, 3, null ), - new Among ( "mme", -1, 3, null ), - new Among ( "nne", -1, 3, null ), - new Among ( "ni", -1, 2, null ), - new Among ( "si", -1, 1, null ), - new Among ( "an", -1, 4, null ), - new Among ( "en", -1, 6, null ), - new Among ( "\u00E4n", -1, 5, null ), - new Among ( "ns\u00E4", -1, 3, null ) + new Among ( "nsa", -1, 3, null! ), + new Among ( "mme", -1, 3, null! ), + new Among ( "nne", -1, 3, null! ), + new Among ( "ni", -1, 2, null! ), + new Among ( "si", -1, 1, null! ), + new Among ( "an", -1, 4, null! ), + new Among ( "en", -1, 6, null! ), + new Among ( "\u00E4n", -1, 5, null! ), + new Among ( "ns\u00E4", -1, 3, null! ) }; private readonly static Among[] a_5 = { - new Among ( "aa", -1, -1, null ), - new Among ( "ee", -1, -1, null ), - new Among ( "ii", -1, -1, null ), - new Among ( "oo", -1, -1, null ), - new Among ( "uu", -1, -1, null ), - new Among ( "\u00E4\u00E4", -1, -1, null ), - new Among ( "\u00F6\u00F6", -1, -1, null ) + new Among ( "aa", -1, -1, null! ), + new Among ( "ee", -1, -1, null! ), + new Among ( "ii", -1, -1, null! ), + new Among ( "oo", -1, -1, null! ), + new Among ( "uu", -1, -1, null! ), + new Among ( "\u00E4\u00E4", -1, -1, null! ), + new Among ( "\u00F6\u00F6", -1, -1, null! ) }; private readonly static Among[] a_6 = { - new Among ( "a", -1, 8, null ), - new Among ( "lla", 0, -1, null ), - new Among ( "na", 0, -1, null ), - new Among ( "ssa", 0, -1, null ), - new Among ( "ta", 0, -1, null ), - new Among ( "lta", 4, -1, null ), - new Among ( "sta", 4, -1, null ), - new Among ( "tta", 4, 9, null ), - new Among ( "lle", -1, -1, null ), - new Among ( "ine", -1, -1, null ), - new Among ( "ksi", -1, -1, null ), - new Among ( "n", -1, 7, null ), - new Among ( "han", 11, 1, null ), + new Among ( "a", -1, 8, null! ), + new Among ( "lla", 0, -1, null! ), + new Among ( "na", 0, -1, null! ), + new Among ( "ssa", 0, -1, null! ), + new Among ( "ta", 0, -1, null! ), + new Among ( "lta", 4, -1, null! ), + new Among ( "sta", 4, -1, null! ), + new Among ( "tta", 4, 9, null! ), + new Among ( "lle", -1, -1, null! ), + new Among ( "ine", -1, -1, null! ), + new Among ( "ksi", -1, -1, null! ), + new Among ( "n", -1, 7, null! ), + new Among ( "han", 11, 1, null! ), new Among ( "den", 11, -1, delegate{ return methodObject.r_VI();} /*"r_VI"*/ ), new Among ( "seen", 11, -1, delegate{return methodObject.r_LONG();}/*"r_LONG"*/ ), - new Among ( "hen", 11, 2, null ), + new Among ( "hen", 11, 2, null! ), new Among ( "tten", 11, -1,delegate{ return methodObject.r_VI();} /*"r_VI"*/ ), - new Among ( "hin", 11, 3, null ), + new Among ( "hin", 11, 3, null! ), new Among ( "siin", 11, -1,delegate{ return methodObject.r_VI();} /*"r_VI"*/ ), - new Among ( "hon", 11, 4, null ), - new Among ( "h\u00E4n", 11, 5, null ), - new Among ( "h\u00F6n", 11, 6, null ), - new Among ( "\u00E4", -1, 8, null ), - new Among ( "ll\u00E4", 22, -1, null ), - new Among ( "n\u00E4", 22, -1, null ), - new Among ( "ss\u00E4", 22, -1, null ), - new Among ( "t\u00E4", 22, -1, null ), - new Among ( "lt\u00E4", 26, -1, null ), - new Among ( "st\u00E4", 26, -1, null ), - new Among ( "tt\u00E4", 26, 9, null ) + new Among ( "hon", 11, 4, null! ), + new Among ( "h\u00E4n", 11, 5, null! ), + new Among ( "h\u00F6n", 11, 6, null! ), + new Among ( "\u00E4", -1, 8, null! ), + new Among ( "ll\u00E4", 22, -1, null! ), + new Among ( "n\u00E4", 22, -1, null! ), + new Among ( "ss\u00E4", 22, -1, null! ), + new Among ( "t\u00E4", 22, -1, null! ), + new Among ( "lt\u00E4", 26, -1, null! ), + new Among ( "st\u00E4", 26, -1, null! ), + new Among ( "tt\u00E4", 26, 9, null! ) }; private readonly static Among[] a_7 = { - new Among ( "eja", -1, -1, null ), - new Among ( "mma", -1, 1, null ), - new Among ( "imma", 1, -1, null ), - new Among ( "mpa", -1, 1, null ), - new Among ( "impa", 3, -1, null ), - new Among ( "mmi", -1, 1, null ), - new Among ( "immi", 5, -1, null ), - new Among ( "mpi", -1, 1, null ), - new Among ( "impi", 7, -1, null ), - new Among ( "ej\u00E4", -1, -1, null ), - new Among ( "mm\u00E4", -1, 1, null ), - new Among ( "imm\u00E4", 10, -1, null ), - new Among ( "mp\u00E4", -1, 1, null ), - new Among ( "imp\u00E4", 12, -1, null ) + new Among ( "eja", -1, -1, null! ), + new Among ( "mma", -1, 1, null! ), + new Among ( "imma", 1, -1, null! ), + new Among ( "mpa", -1, 1, null! ), + new Among ( "impa", 3, -1, null! ), + new Among ( "mmi", -1, 1, null! ), + new Among ( "immi", 5, -1, null! ), + new Among ( "mpi", -1, 1, null! ), + new Among ( "impi", 7, -1, null! ), + new Among ( "ej\u00E4", -1, -1, null! ), + new Among ( "mm\u00E4", -1, 1, null! ), + new Among ( "imm\u00E4", 10, -1, null! ), + new Among ( "mp\u00E4", -1, 1, null! ), + new Among ( "imp\u00E4", 12, -1, null! ) }; private readonly static Among[] a_8 = { - new Among ( "i", -1, -1, null ), - new Among ( "j", -1, -1, null ) + new Among ( "i", -1, -1, null! ), + new Among ( "j", -1, -1, null! ) }; private readonly static Among[] a_9 = { - new Among ( "mma", -1, 1, null ), - new Among ( "imma", 0, -1, null ) + new Among ( "mma", -1, 1, null! ), + new Among ( "imma", 0, -1, null! ) }; private static readonly char[] g_AEI = {(char)17, (char)1, (char)0, (char)0, (char)0, (char)0, diff --git a/ZeroLevel/Services/Semantic/Snowball/FrenchStemmer.cs b/ZeroLevel/Services/Semantic/Snowball/FrenchStemmer.cs index 4b71ec1..729059d 100644 --- a/ZeroLevel/Services/Semantic/Snowball/FrenchStemmer.cs +++ b/ZeroLevel/Services/Semantic/Snowball/FrenchStemmer.cs @@ -16,182 +16,182 @@ namespace Iveonik.Stemmers private readonly static Among[] a_0 = { - new Among ( "col", -1, -1, null ), - new Among ( "par", -1, -1, null ), - new Among ( "tap", -1, -1, null ) + new Among ( "col", -1, -1, null! ), + new Among ( "par", -1, -1, null! ), + new Among ( "tap", -1, -1, null! ) }; private readonly static Among[] a_1 = { - new Among ( "", -1, 4, null ), - new Among ( "I", 0, 1, null ), - new Among ( "U", 0, 2, null ), - new Among ( "Y", 0, 3, null ) + new Among ( "", -1, 4, null! ), + new Among ( "I", 0, 1, null! ), + new Among ( "U", 0, 2, null! ), + new Among ( "Y", 0, 3, null! ) }; private readonly static Among[] a_2 = { - new Among ( "iqU", -1, 3, null ), - new Among ( "abl", -1, 3, null ), - new Among ( "I\u00E8r", -1, 4, null ), - new Among ( "i\u00E8r", -1, 4, null ), - new Among ( "eus", -1, 2, null ), - new Among ( "iv", -1, 1, null ) + new Among ( "iqU", -1, 3, null! ), + new Among ( "abl", -1, 3, null! ), + new Among ( "I\u00E8r", -1, 4, null! ), + new Among ( "i\u00E8r", -1, 4, null! ), + new Among ( "eus", -1, 2, null! ), + new Among ( "iv", -1, 1, null! ) }; private readonly static Among[] a_3 = { - new Among ( "ic", -1, 2, null ), - new Among ( "abil", -1, 1, null ), - new Among ( "iv", -1, 3, null ) + new Among ( "ic", -1, 2, null! ), + new Among ( "abil", -1, 1, null! ), + new Among ( "iv", -1, 3, null! ) }; private readonly static Among[] a_4 = { - new Among ( "iqUe", -1, 1, null ), - new Among ( "atrice", -1, 2, null ), - new Among ( "ance", -1, 1, null ), - new Among ( "ence", -1, 5, null ), - new Among ( "logie", -1, 3, null ), - new Among ( "able", -1, 1, null ), - new Among ( "isme", -1, 1, null ), - new Among ( "euse", -1, 11, null ), - new Among ( "iste", -1, 1, null ), - new Among ( "ive", -1, 8, null ), - new Among ( "if", -1, 8, null ), - new Among ( "usion", -1, 4, null ), - new Among ( "ation", -1, 2, null ), - new Among ( "ution", -1, 4, null ), - new Among ( "ateur", -1, 2, null ), - new Among ( "iqUes", -1, 1, null ), - new Among ( "atrices", -1, 2, null ), - new Among ( "ances", -1, 1, null ), - new Among ( "ences", -1, 5, null ), - new Among ( "logies", -1, 3, null ), - new Among ( "ables", -1, 1, null ), - new Among ( "ismes", -1, 1, null ), - new Among ( "euses", -1, 11, null ), - new Among ( "istes", -1, 1, null ), - new Among ( "ives", -1, 8, null ), - new Among ( "ifs", -1, 8, null ), - new Among ( "usions", -1, 4, null ), - new Among ( "ations", -1, 2, null ), - new Among ( "utions", -1, 4, null ), - new Among ( "ateurs", -1, 2, null ), - new Among ( "ments", -1, 15, null ), - new Among ( "ements", 30, 6, null ), - new Among ( "issements", 31, 12, null ), - new Among ( "it\u00E9s", -1, 7, null ), - new Among ( "ment", -1, 15, null ), - new Among ( "ement", 34, 6, null ), - new Among ( "issement", 35, 12, null ), - new Among ( "amment", 34, 13, null ), - new Among ( "emment", 34, 14, null ), - new Among ( "aux", -1, 10, null ), - new Among ( "eaux", 39, 9, null ), - new Among ( "eux", -1, 1, null ), - new Among ( "it\u00E9", -1, 7, null ) + new Among ( "iqUe", -1, 1, null! ), + new Among ( "atrice", -1, 2, null! ), + new Among ( "ance", -1, 1, null! ), + new Among ( "ence", -1, 5, null! ), + new Among ( "logie", -1, 3, null! ), + new Among ( "able", -1, 1, null! ), + new Among ( "isme", -1, 1, null! ), + new Among ( "euse", -1, 11, null! ), + new Among ( "iste", -1, 1, null! ), + new Among ( "ive", -1, 8, null! ), + new Among ( "if", -1, 8, null! ), + new Among ( "usion", -1, 4, null! ), + new Among ( "ation", -1, 2, null! ), + new Among ( "ution", -1, 4, null! ), + new Among ( "ateur", -1, 2, null! ), + new Among ( "iqUes", -1, 1, null! ), + new Among ( "atrices", -1, 2, null! ), + new Among ( "ances", -1, 1, null! ), + new Among ( "ences", -1, 5, null! ), + new Among ( "logies", -1, 3, null! ), + new Among ( "ables", -1, 1, null! ), + new Among ( "ismes", -1, 1, null! ), + new Among ( "euses", -1, 11, null! ), + new Among ( "istes", -1, 1, null! ), + new Among ( "ives", -1, 8, null! ), + new Among ( "ifs", -1, 8, null! ), + new Among ( "usions", -1, 4, null! ), + new Among ( "ations", -1, 2, null! ), + new Among ( "utions", -1, 4, null! ), + new Among ( "ateurs", -1, 2, null! ), + new Among ( "ments", -1, 15, null! ), + new Among ( "ements", 30, 6, null! ), + new Among ( "issements", 31, 12, null! ), + new Among ( "it\u00E9s", -1, 7, null! ), + new Among ( "ment", -1, 15, null! ), + new Among ( "ement", 34, 6, null! ), + new Among ( "issement", 35, 12, null! ), + new Among ( "amment", 34, 13, null! ), + new Among ( "emment", 34, 14, null! ), + new Among ( "aux", -1, 10, null! ), + new Among ( "eaux", 39, 9, null! ), + new Among ( "eux", -1, 1, null! ), + new Among ( "it\u00E9", -1, 7, null! ) }; private readonly static Among[] a_5 = { - new Among ( "ira", -1, 1, null ), - new Among ( "ie", -1, 1, null ), - new Among ( "isse", -1, 1, null ), - new Among ( "issante", -1, 1, null ), - new Among ( "i", -1, 1, null ), - new Among ( "irai", 4, 1, null ), - new Among ( "ir", -1, 1, null ), - new Among ( "iras", -1, 1, null ), - new Among ( "ies", -1, 1, null ), - new Among ( "\u00EEmes", -1, 1, null ), - new Among ( "isses", -1, 1, null ), - new Among ( "issantes", -1, 1, null ), - new Among ( "\u00EEtes", -1, 1, null ), - new Among ( "is", -1, 1, null ), - new Among ( "irais", 13, 1, null ), - new Among ( "issais", 13, 1, null ), - new Among ( "irions", -1, 1, null ), - new Among ( "issions", -1, 1, null ), - new Among ( "irons", -1, 1, null ), - new Among ( "issons", -1, 1, null ), - new Among ( "issants", -1, 1, null ), - new Among ( "it", -1, 1, null ), - new Among ( "irait", 21, 1, null ), - new Among ( "issait", 21, 1, null ), - new Among ( "issant", -1, 1, null ), - new Among ( "iraIent", -1, 1, null ), - new Among ( "issaIent", -1, 1, null ), - new Among ( "irent", -1, 1, null ), - new Among ( "issent", -1, 1, null ), - new Among ( "iront", -1, 1, null ), - new Among ( "\u00EEt", -1, 1, null ), - new Among ( "iriez", -1, 1, null ), - new Among ( "issiez", -1, 1, null ), - new Among ( "irez", -1, 1, null ), - new Among ( "issez", -1, 1, null ) + new Among ( "ira", -1, 1, null! ), + new Among ( "ie", -1, 1, null! ), + new Among ( "isse", -1, 1, null! ), + new Among ( "issante", -1, 1, null! ), + new Among ( "i", -1, 1, null! ), + new Among ( "irai", 4, 1, null! ), + new Among ( "ir", -1, 1, null! ), + new Among ( "iras", -1, 1, null! ), + new Among ( "ies", -1, 1, null! ), + new Among ( "\u00EEmes", -1, 1, null! ), + new Among ( "isses", -1, 1, null! ), + new Among ( "issantes", -1, 1, null! ), + new Among ( "\u00EEtes", -1, 1, null! ), + new Among ( "is", -1, 1, null! ), + new Among ( "irais", 13, 1, null! ), + new Among ( "issais", 13, 1, null! ), + new Among ( "irions", -1, 1, null! ), + new Among ( "issions", -1, 1, null! ), + new Among ( "irons", -1, 1, null! ), + new Among ( "issons", -1, 1, null! ), + new Among ( "issants", -1, 1, null! ), + new Among ( "it", -1, 1, null! ), + new Among ( "irait", 21, 1, null! ), + new Among ( "issait", 21, 1, null! ), + new Among ( "issant", -1, 1, null! ), + new Among ( "iraIent", -1, 1, null! ), + new Among ( "issaIent", -1, 1, null! ), + new Among ( "irent", -1, 1, null! ), + new Among ( "issent", -1, 1, null! ), + new Among ( "iront", -1, 1, null! ), + new Among ( "\u00EEt", -1, 1, null! ), + new Among ( "iriez", -1, 1, null! ), + new Among ( "issiez", -1, 1, null! ), + new Among ( "irez", -1, 1, null! ), + new Among ( "issez", -1, 1, null! ) }; private readonly static Among[] a_6 = { - new Among ( "a", -1, 3, null ), - new Among ( "era", 0, 2, null ), - new Among ( "asse", -1, 3, null ), - new Among ( "ante", -1, 3, null ), - new Among ( "\u00E9e", -1, 2, null ), - new Among ( "ai", -1, 3, null ), - new Among ( "erai", 5, 2, null ), - new Among ( "er", -1, 2, null ), - new Among ( "as", -1, 3, null ), - new Among ( "eras", 8, 2, null ), - new Among ( "\u00E2mes", -1, 3, null ), - new Among ( "asses", -1, 3, null ), - new Among ( "antes", -1, 3, null ), - new Among ( "\u00E2tes", -1, 3, null ), - new Among ( "\u00E9es", -1, 2, null ), - new Among ( "ais", -1, 3, null ), - new Among ( "erais", 15, 2, null ), - new Among ( "ions", -1, 1, null ), - new Among ( "erions", 17, 2, null ), - new Among ( "assions", 17, 3, null ), - new Among ( "erons", -1, 2, null ), - new Among ( "ants", -1, 3, null ), - new Among ( "\u00E9s", -1, 2, null ), - new Among ( "ait", -1, 3, null ), - new Among ( "erait", 23, 2, null ), - new Among ( "ant", -1, 3, null ), - new Among ( "aIent", -1, 3, null ), - new Among ( "eraIent", 26, 2, null ), - new Among ( "\u00E8rent", -1, 2, null ), - new Among ( "assent", -1, 3, null ), - new Among ( "eront", -1, 2, null ), - new Among ( "\u00E2t", -1, 3, null ), - new Among ( "ez", -1, 2, null ), - new Among ( "iez", 32, 2, null ), - new Among ( "eriez", 33, 2, null ), - new Among ( "assiez", 33, 3, null ), - new Among ( "erez", 32, 2, null ), - new Among ( "\u00E9", -1, 2, null ) + new Among ( "a", -1, 3, null! ), + new Among ( "era", 0, 2, null! ), + new Among ( "asse", -1, 3, null! ), + new Among ( "ante", -1, 3, null! ), + new Among ( "\u00E9e", -1, 2, null! ), + new Among ( "ai", -1, 3, null! ), + new Among ( "erai", 5, 2, null! ), + new Among ( "er", -1, 2, null! ), + new Among ( "as", -1, 3, null! ), + new Among ( "eras", 8, 2, null! ), + new Among ( "\u00E2mes", -1, 3, null! ), + new Among ( "asses", -1, 3, null! ), + new Among ( "antes", -1, 3, null! ), + new Among ( "\u00E2tes", -1, 3, null! ), + new Among ( "\u00E9es", -1, 2, null! ), + new Among ( "ais", -1, 3, null! ), + new Among ( "erais", 15, 2, null! ), + new Among ( "ions", -1, 1, null! ), + new Among ( "erions", 17, 2, null! ), + new Among ( "assions", 17, 3, null! ), + new Among ( "erons", -1, 2, null! ), + new Among ( "ants", -1, 3, null! ), + new Among ( "\u00E9s", -1, 2, null! ), + new Among ( "ait", -1, 3, null! ), + new Among ( "erait", 23, 2, null! ), + new Among ( "ant", -1, 3, null! ), + new Among ( "aIent", -1, 3, null! ), + new Among ( "eraIent", 26, 2, null! ), + new Among ( "\u00E8rent", -1, 2, null! ), + new Among ( "assent", -1, 3, null! ), + new Among ( "eront", -1, 2, null! ), + new Among ( "\u00E2t", -1, 3, null! ), + new Among ( "ez", -1, 2, null! ), + new Among ( "iez", 32, 2, null! ), + new Among ( "eriez", 33, 2, null! ), + new Among ( "assiez", 33, 3, null! ), + new Among ( "erez", 32, 2, null! ), + new Among ( "\u00E9", -1, 2, null! ) }; private readonly static Among[] a_7 = { - new Among ( "e", -1, 3, null ), - new Among ( "I\u00E8re", 0, 2, null ), - new Among ( "i\u00E8re", 0, 2, null ), - new Among ( "ion", -1, 1, null ), - new Among ( "Ier", -1, 2, null ), - new Among ( "ier", -1, 2, null ), - new Among ( "\u00EB", -1, 4, null ) + new Among ( "e", -1, 3, null! ), + new Among ( "I\u00E8re", 0, 2, null! ), + new Among ( "i\u00E8re", 0, 2, null! ), + new Among ( "ion", -1, 1, null! ), + new Among ( "Ier", -1, 2, null! ), + new Among ( "ier", -1, 2, null! ), + new Among ( "\u00EB", -1, 4, null! ) }; private readonly static Among[] a_8 = { - new Among ( "ell", -1, -1, null ), - new Among ( "eill", -1, -1, null ), - new Among ( "enn", -1, -1, null ), - new Among ( "onn", -1, -1, null ), - new Among ( "ett", -1, -1, null ) + new Among ( "ell", -1, -1, null! ), + new Among ( "eill", -1, -1, null! ), + new Among ( "enn", -1, -1, null! ), + new Among ( "onn", -1, -1, null! ), + new Among ( "ett", -1, -1, null! ) }; private static readonly char[] g_v = {(char)17, (char)65, (char)16, (char)1, (char)0, diff --git a/ZeroLevel/Services/Semantic/Snowball/GermanStemmer.cs b/ZeroLevel/Services/Semantic/Snowball/GermanStemmer.cs index a12fb0988028289f1690c60f642949d678f1c80b..11bedd68750009953b5923024b9f15d6f8d7a5a2 100644 GIT binary patch delta 43 vcmbQRjd990#tk~`jEa*Na#T-F5H;C+i~S5Em@5wCN==?1#kTnlr%50HQgaUD delta 51 zcmV-30L=fCwgHf~0kA9wlVS)SlYSl+lO6{Mli&zGlh9HslRz2@v)l*F0h5vkFq4oe J2D9J^G*R3k5?25K diff --git a/ZeroLevel/Services/Semantic/Snowball/HungarianStemmer.cs b/ZeroLevel/Services/Semantic/Snowball/HungarianStemmer.cs index 5977ac5..2d347b1 100644 --- a/ZeroLevel/Services/Semantic/Snowball/HungarianStemmer.cs +++ b/ZeroLevel/Services/Semantic/Snowball/HungarianStemmer.cs @@ -15,232 +15,232 @@ namespace Iveonik.Stemmers //private readonly static HungarianStemmer methodObject = new HungarianStemmer(); private readonly static Among[] a_0 = { - new Among ( "cs", -1, -1, null ), - new Among ( "dzs", -1, -1, null ), - new Among ( "gy", -1, -1, null ), - new Among ( "ly", -1, -1, null ), - new Among ( "ny", -1, -1, null ), - new Among ( "sz", -1, -1, null ), - new Among ( "ty", -1, -1, null ), - new Among ( "zs", -1, -1, null ) + new Among ( "cs", -1, -1, null! ), + new Among ( "dzs", -1, -1, null! ), + new Among ( "gy", -1, -1, null! ), + new Among ( "ly", -1, -1, null! ), + new Among ( "ny", -1, -1, null! ), + new Among ( "sz", -1, -1, null! ), + new Among ( "ty", -1, -1, null! ), + new Among ( "zs", -1, -1, null! ) }; private readonly static Among[] a_1 = { - new Among ( "\u00E1", -1, 1, null ), - new Among ( "\u00E9", -1, 2, null ) + new Among ( "\u00E1", -1, 1, null! ), + new Among ( "\u00E9", -1, 2, null! ) }; private readonly static Among[] a_2 = { - new Among ( "bb", -1, -1, null ), - new Among ( "cc", -1, -1, null ), - new Among ( "dd", -1, -1, null ), - new Among ( "ff", -1, -1, null ), - new Among ( "gg", -1, -1, null ), - new Among ( "jj", -1, -1, null ), - new Among ( "kk", -1, -1, null ), - new Among ( "ll", -1, -1, null ), - new Among ( "mm", -1, -1, null ), - new Among ( "nn", -1, -1, null ), - new Among ( "pp", -1, -1, null ), - new Among ( "rr", -1, -1, null ), - new Among ( "ccs", -1, -1, null ), - new Among ( "ss", -1, -1, null ), - new Among ( "zzs", -1, -1, null ), - new Among ( "tt", -1, -1, null ), - new Among ( "vv", -1, -1, null ), - new Among ( "ggy", -1, -1, null ), - new Among ( "lly", -1, -1, null ), - new Among ( "nny", -1, -1, null ), - new Among ( "tty", -1, -1, null ), - new Among ( "ssz", -1, -1, null ), - new Among ( "zz", -1, -1, null ) + new Among ( "bb", -1, -1, null! ), + new Among ( "cc", -1, -1, null! ), + new Among ( "dd", -1, -1, null! ), + new Among ( "ff", -1, -1, null! ), + new Among ( "gg", -1, -1, null! ), + new Among ( "jj", -1, -1, null! ), + new Among ( "kk", -1, -1, null! ), + new Among ( "ll", -1, -1, null! ), + new Among ( "mm", -1, -1, null! ), + new Among ( "nn", -1, -1, null! ), + new Among ( "pp", -1, -1, null! ), + new Among ( "rr", -1, -1, null! ), + new Among ( "ccs", -1, -1, null! ), + new Among ( "ss", -1, -1, null! ), + new Among ( "zzs", -1, -1, null! ), + new Among ( "tt", -1, -1, null! ), + new Among ( "vv", -1, -1, null! ), + new Among ( "ggy", -1, -1, null! ), + new Among ( "lly", -1, -1, null! ), + new Among ( "nny", -1, -1, null! ), + new Among ( "tty", -1, -1, null! ), + new Among ( "ssz", -1, -1, null! ), + new Among ( "zz", -1, -1, null! ) }; private readonly static Among[] a_3 = { - new Among ( "al", -1, 1, null ), - new Among ( "el", -1, 2, null ) + new Among ( "al", -1, 1, null! ), + new Among ( "el", -1, 2, null! ) }; private readonly static Among[] a_4 = { - new Among ( "ba", -1, -1, null ), - new Among ( "ra", -1, -1, null ), - new Among ( "be", -1, -1, null ), - new Among ( "re", -1, -1, null ), - new Among ( "ig", -1, -1, null ), - new Among ( "nak", -1, -1, null ), - new Among ( "nek", -1, -1, null ), - new Among ( "val", -1, -1, null ), - new Among ( "vel", -1, -1, null ), - new Among ( "ul", -1, -1, null ), - new Among ( "n\u00E1l", -1, -1, null ), - new Among ( "n\u00E9l", -1, -1, null ), - new Among ( "b\u00F3l", -1, -1, null ), - new Among ( "r\u00F3l", -1, -1, null ), - new Among ( "t\u00F3l", -1, -1, null ), - new Among ( "b\u00F5l", -1, -1, null ), - new Among ( "r\u00F5l", -1, -1, null ), - new Among ( "t\u00F5l", -1, -1, null ), - new Among ( "\u00FCl", -1, -1, null ), - new Among ( "n", -1, -1, null ), - new Among ( "an", 19, -1, null ), - new Among ( "ban", 20, -1, null ), - new Among ( "en", 19, -1, null ), - new Among ( "ben", 22, -1, null ), - new Among ( "k\u00E9ppen", 22, -1, null ), - new Among ( "on", 19, -1, null ), - new Among ( "\u00F6n", 19, -1, null ), - new Among ( "k\u00E9pp", -1, -1, null ), - new Among ( "kor", -1, -1, null ), - new Among ( "t", -1, -1, null ), - new Among ( "at", 29, -1, null ), - new Among ( "et", 29, -1, null ), - new Among ( "k\u00E9nt", 29, -1, null ), - new Among ( "ank\u00E9nt", 32, -1, null ), - new Among ( "enk\u00E9nt", 32, -1, null ), - new Among ( "onk\u00E9nt", 32, -1, null ), - new Among ( "ot", 29, -1, null ), - new Among ( "\u00E9rt", 29, -1, null ), - new Among ( "\u00F6t", 29, -1, null ), - new Among ( "hez", -1, -1, null ), - new Among ( "hoz", -1, -1, null ), - new Among ( "h\u00F6z", -1, -1, null ), - new Among ( "v\u00E1", -1, -1, null ), - new Among ( "v\u00E9", -1, -1, null ) + new Among ( "ba", -1, -1, null! ), + new Among ( "ra", -1, -1, null! ), + new Among ( "be", -1, -1, null! ), + new Among ( "re", -1, -1, null! ), + new Among ( "ig", -1, -1, null! ), + new Among ( "nak", -1, -1, null! ), + new Among ( "nek", -1, -1, null! ), + new Among ( "val", -1, -1, null! ), + new Among ( "vel", -1, -1, null! ), + new Among ( "ul", -1, -1, null! ), + new Among ( "n\u00E1l", -1, -1, null! ), + new Among ( "n\u00E9l", -1, -1, null! ), + new Among ( "b\u00F3l", -1, -1, null! ), + new Among ( "r\u00F3l", -1, -1, null! ), + new Among ( "t\u00F3l", -1, -1, null! ), + new Among ( "b\u00F5l", -1, -1, null! ), + new Among ( "r\u00F5l", -1, -1, null! ), + new Among ( "t\u00F5l", -1, -1, null! ), + new Among ( "\u00FCl", -1, -1, null! ), + new Among ( "n", -1, -1, null! ), + new Among ( "an", 19, -1, null! ), + new Among ( "ban", 20, -1, null! ), + new Among ( "en", 19, -1, null! ), + new Among ( "ben", 22, -1, null! ), + new Among ( "k\u00E9ppen", 22, -1, null! ), + new Among ( "on", 19, -1, null! ), + new Among ( "\u00F6n", 19, -1, null! ), + new Among ( "k\u00E9pp", -1, -1, null! ), + new Among ( "kor", -1, -1, null! ), + new Among ( "t", -1, -1, null! ), + new Among ( "at", 29, -1, null! ), + new Among ( "et", 29, -1, null! ), + new Among ( "k\u00E9nt", 29, -1, null! ), + new Among ( "ank\u00E9nt", 32, -1, null! ), + new Among ( "enk\u00E9nt", 32, -1, null! ), + new Among ( "onk\u00E9nt", 32, -1, null! ), + new Among ( "ot", 29, -1, null! ), + new Among ( "\u00E9rt", 29, -1, null! ), + new Among ( "\u00F6t", 29, -1, null! ), + new Among ( "hez", -1, -1, null! ), + new Among ( "hoz", -1, -1, null! ), + new Among ( "h\u00F6z", -1, -1, null! ), + new Among ( "v\u00E1", -1, -1, null! ), + new Among ( "v\u00E9", -1, -1, null! ) }; private readonly static Among[] a_5 = { - new Among ( "\u00E1n", -1, 2, null ), - new Among ( "\u00E9n", -1, 1, null ), - new Among ( "\u00E1nk\u00E9nt", -1, 3, null ) + new Among ( "\u00E1n", -1, 2, null! ), + new Among ( "\u00E9n", -1, 1, null! ), + new Among ( "\u00E1nk\u00E9nt", -1, 3, null! ) }; private readonly static Among[] a_6 = { - new Among ( "stul", -1, 2, null ), - new Among ( "astul", 0, 1, null ), - new Among ( "\u00E1stul", 0, 3, null ), - new Among ( "st\u00FCl", -1, 2, null ), - new Among ( "est\u00FCl", 3, 1, null ), - new Among ( "\u00E9st\u00FCl", 3, 4, null ) + new Among ( "stul", -1, 2, null! ), + new Among ( "astul", 0, 1, null! ), + new Among ( "\u00E1stul", 0, 3, null! ), + new Among ( "st\u00FCl", -1, 2, null! ), + new Among ( "est\u00FCl", 3, 1, null! ), + new Among ( "\u00E9st\u00FCl", 3, 4, null! ) }; private readonly static Among[] a_7 = { - new Among ( "\u00E1", -1, 1, null ), - new Among ( "\u00E9", -1, 2, null ) + new Among ( "\u00E1", -1, 1, null! ), + new Among ( "\u00E9", -1, 2, null! ) }; private readonly static Among[] a_8 = { - new Among ( "k", -1, 7, null ), - new Among ( "ak", 0, 4, null ), - new Among ( "ek", 0, 6, null ), - new Among ( "ok", 0, 5, null ), - new Among ( "\u00E1k", 0, 1, null ), - new Among ( "\u00E9k", 0, 2, null ), - new Among ( "\u00F6k", 0, 3, null ) + new Among ( "k", -1, 7, null! ), + new Among ( "ak", 0, 4, null! ), + new Among ( "ek", 0, 6, null! ), + new Among ( "ok", 0, 5, null! ), + new Among ( "\u00E1k", 0, 1, null! ), + new Among ( "\u00E9k", 0, 2, null! ), + new Among ( "\u00F6k", 0, 3, null! ) }; private readonly static Among[] a_9 = { - new Among ( "\u00E9i", -1, 7, null ), - new Among ( "\u00E1\u00E9i", 0, 6, null ), - new Among ( "\u00E9\u00E9i", 0, 5, null ), - new Among ( "\u00E9", -1, 9, null ), - new Among ( "k\u00E9", 3, 4, null ), - new Among ( "ak\u00E9", 4, 1, null ), - new Among ( "ek\u00E9", 4, 1, null ), - new Among ( "ok\u00E9", 4, 1, null ), - new Among ( "\u00E1k\u00E9", 4, 3, null ), - new Among ( "\u00E9k\u00E9", 4, 2, null ), - new Among ( "\u00F6k\u00E9", 4, 1, null ), - new Among ( "\u00E9\u00E9", 3, 8, null ) + new Among ( "\u00E9i", -1, 7, null! ), + new Among ( "\u00E1\u00E9i", 0, 6, null! ), + new Among ( "\u00E9\u00E9i", 0, 5, null! ), + new Among ( "\u00E9", -1, 9, null! ), + new Among ( "k\u00E9", 3, 4, null! ), + new Among ( "ak\u00E9", 4, 1, null! ), + new Among ( "ek\u00E9", 4, 1, null! ), + new Among ( "ok\u00E9", 4, 1, null! ), + new Among ( "\u00E1k\u00E9", 4, 3, null! ), + new Among ( "\u00E9k\u00E9", 4, 2, null! ), + new Among ( "\u00F6k\u00E9", 4, 1, null! ), + new Among ( "\u00E9\u00E9", 3, 8, null! ) }; private readonly static Among[] a_10 = { - new Among ( "a", -1, 18, null ), - new Among ( "ja", 0, 17, null ), - new Among ( "d", -1, 16, null ), - new Among ( "ad", 2, 13, null ), - new Among ( "ed", 2, 13, null ), - new Among ( "od", 2, 13, null ), - new Among ( "\u00E1d", 2, 14, null ), - new Among ( "\u00E9d", 2, 15, null ), - new Among ( "\u00F6d", 2, 13, null ), - new Among ( "e", -1, 18, null ), - new Among ( "je", 9, 17, null ), - new Among ( "nk", -1, 4, null ), - new Among ( "unk", 11, 1, null ), - new Among ( "\u00E1nk", 11, 2, null ), - new Among ( "\u00E9nk", 11, 3, null ), - new Among ( "\u00FCnk", 11, 1, null ), - new Among ( "uk", -1, 8, null ), - new Among ( "juk", 16, 7, null ), - new Among ( "\u00E1juk", 17, 5, null ), - new Among ( "\u00FCk", -1, 8, null ), - new Among ( "j\u00FCk", 19, 7, null ), - new Among ( "\u00E9j\u00FCk", 20, 6, null ), - new Among ( "m", -1, 12, null ), - new Among ( "am", 22, 9, null ), - new Among ( "em", 22, 9, null ), - new Among ( "om", 22, 9, null ), - new Among ( "\u00E1m", 22, 10, null ), - new Among ( "\u00E9m", 22, 11, null ), - new Among ( "o", -1, 18, null ), - new Among ( "\u00E1", -1, 19, null ), - new Among ( "\u00E9", -1, 20, null ) + new Among ( "a", -1, 18, null! ), + new Among ( "ja", 0, 17, null! ), + new Among ( "d", -1, 16, null! ), + new Among ( "ad", 2, 13, null! ), + new Among ( "ed", 2, 13, null! ), + new Among ( "od", 2, 13, null! ), + new Among ( "\u00E1d", 2, 14, null! ), + new Among ( "\u00E9d", 2, 15, null! ), + new Among ( "\u00F6d", 2, 13, null! ), + new Among ( "e", -1, 18, null! ), + new Among ( "je", 9, 17, null! ), + new Among ( "nk", -1, 4, null! ), + new Among ( "unk", 11, 1, null! ), + new Among ( "\u00E1nk", 11, 2, null! ), + new Among ( "\u00E9nk", 11, 3, null! ), + new Among ( "\u00FCnk", 11, 1, null! ), + new Among ( "uk", -1, 8, null! ), + new Among ( "juk", 16, 7, null! ), + new Among ( "\u00E1juk", 17, 5, null! ), + new Among ( "\u00FCk", -1, 8, null! ), + new Among ( "j\u00FCk", 19, 7, null! ), + new Among ( "\u00E9j\u00FCk", 20, 6, null! ), + new Among ( "m", -1, 12, null! ), + new Among ( "am", 22, 9, null! ), + new Among ( "em", 22, 9, null! ), + new Among ( "om", 22, 9, null! ), + new Among ( "\u00E1m", 22, 10, null! ), + new Among ( "\u00E9m", 22, 11, null! ), + new Among ( "o", -1, 18, null! ), + new Among ( "\u00E1", -1, 19, null! ), + new Among ( "\u00E9", -1, 20, null! ) }; private readonly static Among[] a_11 = { - new Among ( "id", -1, 10, null ), - new Among ( "aid", 0, 9, null ), - new Among ( "jaid", 1, 6, null ), - new Among ( "eid", 0, 9, null ), - new Among ( "jeid", 3, 6, null ), - new Among ( "\u00E1id", 0, 7, null ), - new Among ( "\u00E9id", 0, 8, null ), - new Among ( "i", -1, 15, null ), - new Among ( "ai", 7, 14, null ), - new Among ( "jai", 8, 11, null ), - new Among ( "ei", 7, 14, null ), - new Among ( "jei", 10, 11, null ), - new Among ( "\u00E1i", 7, 12, null ), - new Among ( "\u00E9i", 7, 13, null ), - new Among ( "itek", -1, 24, null ), - new Among ( "eitek", 14, 21, null ), - new Among ( "jeitek", 15, 20, null ), - new Among ( "\u00E9itek", 14, 23, null ), - new Among ( "ik", -1, 29, null ), - new Among ( "aik", 18, 26, null ), - new Among ( "jaik", 19, 25, null ), - new Among ( "eik", 18, 26, null ), - new Among ( "jeik", 21, 25, null ), - new Among ( "\u00E1ik", 18, 27, null ), - new Among ( "\u00E9ik", 18, 28, null ), - new Among ( "ink", -1, 20, null ), - new Among ( "aink", 25, 17, null ), - new Among ( "jaink", 26, 16, null ), - new Among ( "eink", 25, 17, null ), - new Among ( "jeink", 28, 16, null ), - new Among ( "\u00E1ink", 25, 18, null ), - new Among ( "\u00E9ink", 25, 19, null ), - new Among ( "aitok", -1, 21, null ), - new Among ( "jaitok", 32, 20, null ), - new Among ( "\u00E1itok", -1, 22, null ), - new Among ( "im", -1, 5, null ), - new Among ( "aim", 35, 4, null ), - new Among ( "jaim", 36, 1, null ), - new Among ( "eim", 35, 4, null ), - new Among ( "jeim", 38, 1, null ), - new Among ( "\u00E1im", 35, 2, null ), - new Among ( "\u00E9im", 35, 3, null ) + new Among ( "id", -1, 10, null! ), + new Among ( "aid", 0, 9, null! ), + new Among ( "jaid", 1, 6, null! ), + new Among ( "eid", 0, 9, null! ), + new Among ( "jeid", 3, 6, null! ), + new Among ( "\u00E1id", 0, 7, null! ), + new Among ( "\u00E9id", 0, 8, null! ), + new Among ( "i", -1, 15, null! ), + new Among ( "ai", 7, 14, null! ), + new Among ( "jai", 8, 11, null! ), + new Among ( "ei", 7, 14, null! ), + new Among ( "jei", 10, 11, null! ), + new Among ( "\u00E1i", 7, 12, null! ), + new Among ( "\u00E9i", 7, 13, null! ), + new Among ( "itek", -1, 24, null! ), + new Among ( "eitek", 14, 21, null! ), + new Among ( "jeitek", 15, 20, null! ), + new Among ( "\u00E9itek", 14, 23, null! ), + new Among ( "ik", -1, 29, null! ), + new Among ( "aik", 18, 26, null! ), + new Among ( "jaik", 19, 25, null! ), + new Among ( "eik", 18, 26, null! ), + new Among ( "jeik", 21, 25, null! ), + new Among ( "\u00E1ik", 18, 27, null! ), + new Among ( "\u00E9ik", 18, 28, null! ), + new Among ( "ink", -1, 20, null! ), + new Among ( "aink", 25, 17, null! ), + new Among ( "jaink", 26, 16, null! ), + new Among ( "eink", 25, 17, null! ), + new Among ( "jeink", 28, 16, null! ), + new Among ( "\u00E1ink", 25, 18, null! ), + new Among ( "\u00E9ink", 25, 19, null! ), + new Among ( "aitok", -1, 21, null! ), + new Among ( "jaitok", 32, 20, null! ), + new Among ( "\u00E1itok", -1, 22, null! ), + new Among ( "im", -1, 5, null! ), + new Among ( "aim", 35, 4, null! ), + new Among ( "jaim", 36, 1, null! ), + new Among ( "eim", 35, 4, null! ), + new Among ( "jeim", 38, 1, null! ), + new Among ( "\u00E1im", 35, 2, null! ), + new Among ( "\u00E9im", 35, 3, null! ) }; private static readonly char[] g_v = {(char)17, (char)65, (char)16, (char)0, (char)0, (char)0, (char)0, diff --git a/ZeroLevel/Services/Semantic/Snowball/ItalianStemmer.cs b/ZeroLevel/Services/Semantic/Snowball/ItalianStemmer.cs index c5a6e37..5adb8ee 100644 --- a/ZeroLevel/Services/Semantic/Snowball/ItalianStemmer.cs +++ b/ZeroLevel/Services/Semantic/Snowball/ItalianStemmer.cs @@ -16,231 +16,231 @@ namespace Iveonik.Stemmers private readonly static Among[] a_0 = { - new Among ( "", -1, 7, null ), - new Among ( "qu", 0, 6, null ), - new Among ( "\u00E1", 0, 1, null ), - new Among ( "\u00E9", 0, 2, null ), - new Among ( "\u00ED", 0, 3, null ), - new Among ( "\u00F3", 0, 4, null ), - new Among ( "\u00FA", 0, 5, null ) + new Among ( "", -1, 7, null! ), + new Among ( "qu", 0, 6, null! ), + new Among ( "\u00E1", 0, 1, null! ), + new Among ( "\u00E9", 0, 2, null! ), + new Among ( "\u00ED", 0, 3, null! ), + new Among ( "\u00F3", 0, 4, null! ), + new Among ( "\u00FA", 0, 5, null! ) }; private readonly static Among[] a_1 = { - new Among ( "", -1, 3, null ), - new Among ( "I", 0, 1, null ), - new Among ( "U", 0, 2, null ) + new Among ( "", -1, 3, null! ), + new Among ( "I", 0, 1, null! ), + new Among ( "U", 0, 2, null! ) }; private readonly static Among[] a_2 = { - new Among ( "la", -1, -1, null ), - new Among ( "cela", 0, -1, null ), - new Among ( "gliela", 0, -1, null ), - new Among ( "mela", 0, -1, null ), - new Among ( "tela", 0, -1, null ), - new Among ( "vela", 0, -1, null ), - new Among ( "le", -1, -1, null ), - new Among ( "cele", 6, -1, null ), - new Among ( "gliele", 6, -1, null ), - new Among ( "mele", 6, -1, null ), - new Among ( "tele", 6, -1, null ), - new Among ( "vele", 6, -1, null ), - new Among ( "ne", -1, -1, null ), - new Among ( "cene", 12, -1, null ), - new Among ( "gliene", 12, -1, null ), - new Among ( "mene", 12, -1, null ), - new Among ( "sene", 12, -1, null ), - new Among ( "tene", 12, -1, null ), - new Among ( "vene", 12, -1, null ), - new Among ( "ci", -1, -1, null ), - new Among ( "li", -1, -1, null ), - new Among ( "celi", 20, -1, null ), - new Among ( "glieli", 20, -1, null ), - new Among ( "meli", 20, -1, null ), - new Among ( "teli", 20, -1, null ), - new Among ( "veli", 20, -1, null ), - new Among ( "gli", 20, -1, null ), - new Among ( "mi", -1, -1, null ), - new Among ( "si", -1, -1, null ), - new Among ( "ti", -1, -1, null ), - new Among ( "vi", -1, -1, null ), - new Among ( "lo", -1, -1, null ), - new Among ( "celo", 31, -1, null ), - new Among ( "glielo", 31, -1, null ), - new Among ( "melo", 31, -1, null ), - new Among ( "telo", 31, -1, null ), - new Among ( "velo", 31, -1, null ) + new Among ( "la", -1, -1, null! ), + new Among ( "cela", 0, -1, null! ), + new Among ( "gliela", 0, -1, null! ), + new Among ( "mela", 0, -1, null! ), + new Among ( "tela", 0, -1, null! ), + new Among ( "vela", 0, -1, null! ), + new Among ( "le", -1, -1, null! ), + new Among ( "cele", 6, -1, null! ), + new Among ( "gliele", 6, -1, null! ), + new Among ( "mele", 6, -1, null! ), + new Among ( "tele", 6, -1, null! ), + new Among ( "vele", 6, -1, null! ), + new Among ( "ne", -1, -1, null! ), + new Among ( "cene", 12, -1, null! ), + new Among ( "gliene", 12, -1, null! ), + new Among ( "mene", 12, -1, null! ), + new Among ( "sene", 12, -1, null! ), + new Among ( "tene", 12, -1, null! ), + new Among ( "vene", 12, -1, null! ), + new Among ( "ci", -1, -1, null! ), + new Among ( "li", -1, -1, null! ), + new Among ( "celi", 20, -1, null! ), + new Among ( "glieli", 20, -1, null! ), + new Among ( "meli", 20, -1, null! ), + new Among ( "teli", 20, -1, null! ), + new Among ( "veli", 20, -1, null! ), + new Among ( "gli", 20, -1, null! ), + new Among ( "mi", -1, -1, null! ), + new Among ( "si", -1, -1, null! ), + new Among ( "ti", -1, -1, null! ), + new Among ( "vi", -1, -1, null! ), + new Among ( "lo", -1, -1, null! ), + new Among ( "celo", 31, -1, null! ), + new Among ( "glielo", 31, -1, null! ), + new Among ( "melo", 31, -1, null! ), + new Among ( "telo", 31, -1, null! ), + new Among ( "velo", 31, -1, null! ) }; private readonly static Among[] a_3 = { - new Among ( "ando", -1, 1, null ), - new Among ( "endo", -1, 1, null ), - new Among ( "ar", -1, 2, null ), - new Among ( "er", -1, 2, null ), - new Among ( "ir", -1, 2, null ) + new Among ( "ando", -1, 1, null! ), + new Among ( "endo", -1, 1, null! ), + new Among ( "ar", -1, 2, null! ), + new Among ( "er", -1, 2, null! ), + new Among ( "ir", -1, 2, null! ) }; private readonly static Among[] a_4 = { - new Among ( "ic", -1, -1, null ), - new Among ( "abil", -1, -1, null ), - new Among ( "os", -1, -1, null ), - new Among ( "iv", -1, 1, null ) + new Among ( "ic", -1, -1, null! ), + new Among ( "abil", -1, -1, null! ), + new Among ( "os", -1, -1, null! ), + new Among ( "iv", -1, 1, null! ) }; private readonly static Among[] a_5 = { - new Among ( "ic", -1, 1, null ), - new Among ( "abil", -1, 1, null ), - new Among ( "iv", -1, 1, null ) + new Among ( "ic", -1, 1, null! ), + new Among ( "abil", -1, 1, null! ), + new Among ( "iv", -1, 1, null! ) }; private readonly static Among[] a_6 = { - new Among ( "ica", -1, 1, null ), - new Among ( "logia", -1, 3, null ), - new Among ( "osa", -1, 1, null ), - new Among ( "ista", -1, 1, null ), - new Among ( "iva", -1, 9, null ), - new Among ( "anza", -1, 1, null ), - new Among ( "enza", -1, 5, null ), - new Among ( "ice", -1, 1, null ), - new Among ( "atrice", 7, 1, null ), - new Among ( "iche", -1, 1, null ), - new Among ( "logie", -1, 3, null ), - new Among ( "abile", -1, 1, null ), - new Among ( "ibile", -1, 1, null ), - new Among ( "usione", -1, 4, null ), - new Among ( "azione", -1, 2, null ), - new Among ( "uzione", -1, 4, null ), - new Among ( "atore", -1, 2, null ), - new Among ( "ose", -1, 1, null ), - new Among ( "ante", -1, 1, null ), - new Among ( "mente", -1, 1, null ), - new Among ( "amente", 19, 7, null ), - new Among ( "iste", -1, 1, null ), - new Among ( "ive", -1, 9, null ), - new Among ( "anze", -1, 1, null ), - new Among ( "enze", -1, 5, null ), - new Among ( "ici", -1, 1, null ), - new Among ( "atrici", 25, 1, null ), - new Among ( "ichi", -1, 1, null ), - new Among ( "abili", -1, 1, null ), - new Among ( "ibili", -1, 1, null ), - new Among ( "ismi", -1, 1, null ), - new Among ( "usioni", -1, 4, null ), - new Among ( "azioni", -1, 2, null ), - new Among ( "uzioni", -1, 4, null ), - new Among ( "atori", -1, 2, null ), - new Among ( "osi", -1, 1, null ), - new Among ( "anti", -1, 1, null ), - new Among ( "amenti", -1, 6, null ), - new Among ( "imenti", -1, 6, null ), - new Among ( "isti", -1, 1, null ), - new Among ( "ivi", -1, 9, null ), - new Among ( "ico", -1, 1, null ), - new Among ( "ismo", -1, 1, null ), - new Among ( "oso", -1, 1, null ), - new Among ( "amento", -1, 6, null ), - new Among ( "imento", -1, 6, null ), - new Among ( "ivo", -1, 9, null ), - new Among ( "it\u00E0", -1, 8, null ), - new Among ( "ist\u00E0", -1, 1, null ), - new Among ( "ist\u00E8", -1, 1, null ), - new Among ( "ist\u00EC", -1, 1, null ) + new Among ( "ica", -1, 1, null! ), + new Among ( "logia", -1, 3, null! ), + new Among ( "osa", -1, 1, null! ), + new Among ( "ista", -1, 1, null! ), + new Among ( "iva", -1, 9, null! ), + new Among ( "anza", -1, 1, null! ), + new Among ( "enza", -1, 5, null! ), + new Among ( "ice", -1, 1, null! ), + new Among ( "atrice", 7, 1, null! ), + new Among ( "iche", -1, 1, null! ), + new Among ( "logie", -1, 3, null! ), + new Among ( "abile", -1, 1, null! ), + new Among ( "ibile", -1, 1, null! ), + new Among ( "usione", -1, 4, null! ), + new Among ( "azione", -1, 2, null! ), + new Among ( "uzione", -1, 4, null! ), + new Among ( "atore", -1, 2, null! ), + new Among ( "ose", -1, 1, null! ), + new Among ( "ante", -1, 1, null! ), + new Among ( "mente", -1, 1, null! ), + new Among ( "amente", 19, 7, null! ), + new Among ( "iste", -1, 1, null! ), + new Among ( "ive", -1, 9, null! ), + new Among ( "anze", -1, 1, null! ), + new Among ( "enze", -1, 5, null! ), + new Among ( "ici", -1, 1, null! ), + new Among ( "atrici", 25, 1, null! ), + new Among ( "ichi", -1, 1, null! ), + new Among ( "abili", -1, 1, null! ), + new Among ( "ibili", -1, 1, null! ), + new Among ( "ismi", -1, 1, null! ), + new Among ( "usioni", -1, 4, null! ), + new Among ( "azioni", -1, 2, null! ), + new Among ( "uzioni", -1, 4, null! ), + new Among ( "atori", -1, 2, null! ), + new Among ( "osi", -1, 1, null! ), + new Among ( "anti", -1, 1, null! ), + new Among ( "amenti", -1, 6, null! ), + new Among ( "imenti", -1, 6, null! ), + new Among ( "isti", -1, 1, null! ), + new Among ( "ivi", -1, 9, null! ), + new Among ( "ico", -1, 1, null! ), + new Among ( "ismo", -1, 1, null! ), + new Among ( "oso", -1, 1, null! ), + new Among ( "amento", -1, 6, null! ), + new Among ( "imento", -1, 6, null! ), + new Among ( "ivo", -1, 9, null! ), + new Among ( "it\u00E0", -1, 8, null! ), + new Among ( "ist\u00E0", -1, 1, null! ), + new Among ( "ist\u00E8", -1, 1, null! ), + new Among ( "ist\u00EC", -1, 1, null! ) }; private readonly static Among[] a_7 = { - new Among ( "isca", -1, 1, null ), - new Among ( "enda", -1, 1, null ), - new Among ( "ata", -1, 1, null ), - new Among ( "ita", -1, 1, null ), - new Among ( "uta", -1, 1, null ), - new Among ( "ava", -1, 1, null ), - new Among ( "eva", -1, 1, null ), - new Among ( "iva", -1, 1, null ), - new Among ( "erebbe", -1, 1, null ), - new Among ( "irebbe", -1, 1, null ), - new Among ( "isce", -1, 1, null ), - new Among ( "ende", -1, 1, null ), - new Among ( "are", -1, 1, null ), - new Among ( "ere", -1, 1, null ), - new Among ( "ire", -1, 1, null ), - new Among ( "asse", -1, 1, null ), - new Among ( "ate", -1, 1, null ), - new Among ( "avate", 16, 1, null ), - new Among ( "evate", 16, 1, null ), - new Among ( "ivate", 16, 1, null ), - new Among ( "ete", -1, 1, null ), - new Among ( "erete", 20, 1, null ), - new Among ( "irete", 20, 1, null ), - new Among ( "ite", -1, 1, null ), - new Among ( "ereste", -1, 1, null ), - new Among ( "ireste", -1, 1, null ), - new Among ( "ute", -1, 1, null ), - new Among ( "erai", -1, 1, null ), - new Among ( "irai", -1, 1, null ), - new Among ( "isci", -1, 1, null ), - new Among ( "endi", -1, 1, null ), - new Among ( "erei", -1, 1, null ), - new Among ( "irei", -1, 1, null ), - new Among ( "assi", -1, 1, null ), - new Among ( "ati", -1, 1, null ), - new Among ( "iti", -1, 1, null ), - new Among ( "eresti", -1, 1, null ), - new Among ( "iresti", -1, 1, null ), - new Among ( "uti", -1, 1, null ), - new Among ( "avi", -1, 1, null ), - new Among ( "evi", -1, 1, null ), - new Among ( "ivi", -1, 1, null ), - new Among ( "isco", -1, 1, null ), - new Among ( "ando", -1, 1, null ), - new Among ( "endo", -1, 1, null ), - new Among ( "Yamo", -1, 1, null ), - new Among ( "iamo", -1, 1, null ), - new Among ( "avamo", -1, 1, null ), - new Among ( "evamo", -1, 1, null ), - new Among ( "ivamo", -1, 1, null ), - new Among ( "eremo", -1, 1, null ), - new Among ( "iremo", -1, 1, null ), - new Among ( "assimo", -1, 1, null ), - new Among ( "ammo", -1, 1, null ), - new Among ( "emmo", -1, 1, null ), - new Among ( "eremmo", 54, 1, null ), - new Among ( "iremmo", 54, 1, null ), - new Among ( "immo", -1, 1, null ), - new Among ( "ano", -1, 1, null ), - new Among ( "iscano", 58, 1, null ), - new Among ( "avano", 58, 1, null ), - new Among ( "evano", 58, 1, null ), - new Among ( "ivano", 58, 1, null ), - new Among ( "eranno", -1, 1, null ), - new Among ( "iranno", -1, 1, null ), - new Among ( "ono", -1, 1, null ), - new Among ( "iscono", 65, 1, null ), - new Among ( "arono", 65, 1, null ), - new Among ( "erono", 65, 1, null ), - new Among ( "irono", 65, 1, null ), - new Among ( "erebbero", -1, 1, null ), - new Among ( "irebbero", -1, 1, null ), - new Among ( "assero", -1, 1, null ), - new Among ( "essero", -1, 1, null ), - new Among ( "issero", -1, 1, null ), - new Among ( "ato", -1, 1, null ), - new Among ( "ito", -1, 1, null ), - new Among ( "uto", -1, 1, null ), - new Among ( "avo", -1, 1, null ), - new Among ( "evo", -1, 1, null ), - new Among ( "ivo", -1, 1, null ), - new Among ( "ar", -1, 1, null ), - new Among ( "ir", -1, 1, null ), - new Among ( "er\u00E0", -1, 1, null ), - new Among ( "ir\u00E0", -1, 1, null ), - new Among ( "er\u00F2", -1, 1, null ), - new Among ( "ir\u00F2", -1, 1, null ) + new Among ( "isca", -1, 1, null! ), + new Among ( "enda", -1, 1, null! ), + new Among ( "ata", -1, 1, null! ), + new Among ( "ita", -1, 1, null! ), + new Among ( "uta", -1, 1, null! ), + new Among ( "ava", -1, 1, null! ), + new Among ( "eva", -1, 1, null! ), + new Among ( "iva", -1, 1, null! ), + new Among ( "erebbe", -1, 1, null! ), + new Among ( "irebbe", -1, 1, null! ), + new Among ( "isce", -1, 1, null! ), + new Among ( "ende", -1, 1, null! ), + new Among ( "are", -1, 1, null! ), + new Among ( "ere", -1, 1, null! ), + new Among ( "ire", -1, 1, null! ), + new Among ( "asse", -1, 1, null! ), + new Among ( "ate", -1, 1, null! ), + new Among ( "avate", 16, 1, null! ), + new Among ( "evate", 16, 1, null! ), + new Among ( "ivate", 16, 1, null! ), + new Among ( "ete", -1, 1, null! ), + new Among ( "erete", 20, 1, null! ), + new Among ( "irete", 20, 1, null! ), + new Among ( "ite", -1, 1, null! ), + new Among ( "ereste", -1, 1, null! ), + new Among ( "ireste", -1, 1, null! ), + new Among ( "ute", -1, 1, null! ), + new Among ( "erai", -1, 1, null! ), + new Among ( "irai", -1, 1, null! ), + new Among ( "isci", -1, 1, null! ), + new Among ( "endi", -1, 1, null! ), + new Among ( "erei", -1, 1, null! ), + new Among ( "irei", -1, 1, null! ), + new Among ( "assi", -1, 1, null! ), + new Among ( "ati", -1, 1, null! ), + new Among ( "iti", -1, 1, null! ), + new Among ( "eresti", -1, 1, null! ), + new Among ( "iresti", -1, 1, null! ), + new Among ( "uti", -1, 1, null! ), + new Among ( "avi", -1, 1, null! ), + new Among ( "evi", -1, 1, null! ), + new Among ( "ivi", -1, 1, null! ), + new Among ( "isco", -1, 1, null! ), + new Among ( "ando", -1, 1, null! ), + new Among ( "endo", -1, 1, null! ), + new Among ( "Yamo", -1, 1, null! ), + new Among ( "iamo", -1, 1, null! ), + new Among ( "avamo", -1, 1, null! ), + new Among ( "evamo", -1, 1, null! ), + new Among ( "ivamo", -1, 1, null! ), + new Among ( "eremo", -1, 1, null! ), + new Among ( "iremo", -1, 1, null! ), + new Among ( "assimo", -1, 1, null! ), + new Among ( "ammo", -1, 1, null! ), + new Among ( "emmo", -1, 1, null! ), + new Among ( "eremmo", 54, 1, null! ), + new Among ( "iremmo", 54, 1, null! ), + new Among ( "immo", -1, 1, null! ), + new Among ( "ano", -1, 1, null! ), + new Among ( "iscano", 58, 1, null! ), + new Among ( "avano", 58, 1, null! ), + new Among ( "evano", 58, 1, null! ), + new Among ( "ivano", 58, 1, null! ), + new Among ( "eranno", -1, 1, null! ), + new Among ( "iranno", -1, 1, null! ), + new Among ( "ono", -1, 1, null! ), + new Among ( "iscono", 65, 1, null! ), + new Among ( "arono", 65, 1, null! ), + new Among ( "erono", 65, 1, null! ), + new Among ( "irono", 65, 1, null! ), + new Among ( "erebbero", -1, 1, null! ), + new Among ( "irebbero", -1, 1, null! ), + new Among ( "assero", -1, 1, null! ), + new Among ( "essero", -1, 1, null! ), + new Among ( "issero", -1, 1, null! ), + new Among ( "ato", -1, 1, null! ), + new Among ( "ito", -1, 1, null! ), + new Among ( "uto", -1, 1, null! ), + new Among ( "avo", -1, 1, null! ), + new Among ( "evo", -1, 1, null! ), + new Among ( "ivo", -1, 1, null! ), + new Among ( "ar", -1, 1, null! ), + new Among ( "ir", -1, 1, null! ), + new Among ( "er\u00E0", -1, 1, null! ), + new Among ( "ir\u00E0", -1, 1, null! ), + new Among ( "er\u00F2", -1, 1, null! ), + new Among ( "ir\u00F2", -1, 1, null! ) }; private static readonly char[] g_v = {(char)17, (char)65, (char)16, (char)0, (char)0, (char)0, (char)0, diff --git a/ZeroLevel/Services/Semantic/Snowball/NorwegianStemmer.cs b/ZeroLevel/Services/Semantic/Snowball/NorwegianStemmer.cs index c3d231a..c313cb7 100644 --- a/ZeroLevel/Services/Semantic/Snowball/NorwegianStemmer.cs +++ b/ZeroLevel/Services/Semantic/Snowball/NorwegianStemmer.cs @@ -16,56 +16,56 @@ namespace Iveonik.Stemmers private readonly static Among[] a_0 = { - new Among ( "a", -1, 1, null ), - new Among ( "e", -1, 1, null ), - new Among ( "ede", 1, 1, null ), - new Among ( "ande", 1, 1, null ), - new Among ( "ende", 1, 1, null ), - new Among ( "ane", 1, 1, null ), - new Among ( "ene", 1, 1, null ), - new Among ( "hetene", 6, 1, null ), - new Among ( "erte", 1, 3, null ), - new Among ( "en", -1, 1, null ), - new Among ( "heten", 9, 1, null ), - new Among ( "ar", -1, 1, null ), - new Among ( "er", -1, 1, null ), - new Among ( "heter", 12, 1, null ), - new Among ( "s", -1, 2, null ), - new Among ( "as", 14, 1, null ), - new Among ( "es", 14, 1, null ), - new Among ( "edes", 16, 1, null ), - new Among ( "endes", 16, 1, null ), - new Among ( "enes", 16, 1, null ), - new Among ( "hetenes", 19, 1, null ), - new Among ( "ens", 14, 1, null ), - new Among ( "hetens", 21, 1, null ), - new Among ( "ers", 14, 1, null ), - new Among ( "ets", 14, 1, null ), - new Among ( "et", -1, 1, null ), - new Among ( "het", 25, 1, null ), - new Among ( "ert", -1, 3, null ), - new Among ( "ast", -1, 1, null ) + new Among ( "a", -1, 1, null! ), + new Among ( "e", -1, 1, null! ), + new Among ( "ede", 1, 1, null! ), + new Among ( "ande", 1, 1, null! ), + new Among ( "ende", 1, 1, null! ), + new Among ( "ane", 1, 1, null! ), + new Among ( "ene", 1, 1, null! ), + new Among ( "hetene", 6, 1, null! ), + new Among ( "erte", 1, 3, null! ), + new Among ( "en", -1, 1, null! ), + new Among ( "heten", 9, 1, null! ), + new Among ( "ar", -1, 1, null! ), + new Among ( "er", -1, 1, null! ), + new Among ( "heter", 12, 1, null! ), + new Among ( "s", -1, 2, null! ), + new Among ( "as", 14, 1, null! ), + new Among ( "es", 14, 1, null! ), + new Among ( "edes", 16, 1, null! ), + new Among ( "endes", 16, 1, null! ), + new Among ( "enes", 16, 1, null! ), + new Among ( "hetenes", 19, 1, null! ), + new Among ( "ens", 14, 1, null! ), + new Among ( "hetens", 21, 1, null! ), + new Among ( "ers", 14, 1, null! ), + new Among ( "ets", 14, 1, null! ), + new Among ( "et", -1, 1, null! ), + new Among ( "het", 25, 1, null! ), + new Among ( "ert", -1, 3, null! ), + new Among ( "ast", -1, 1, null! ) }; private readonly static Among[] a_1 = { - new Among ( "dt", -1, -1, null ), - new Among ( "vt", -1, -1, null ) + new Among ( "dt", -1, -1, null! ), + new Among ( "vt", -1, -1, null! ) }; private readonly static Among[] a_2 = { - new Among ( "leg", -1, 1, null ), - new Among ( "eleg", 0, 1, null ), - new Among ( "ig", -1, 1, null ), - new Among ( "eig", 2, 1, null ), - new Among ( "lig", 2, 1, null ), - new Among ( "elig", 4, 1, null ), - new Among ( "els", -1, 1, null ), - new Among ( "lov", -1, 1, null ), - new Among ( "elov", 7, 1, null ), - new Among ( "slov", 7, 1, null ), - new Among ( "hetslov", 9, 1, null ) + new Among ( "leg", -1, 1, null! ), + new Among ( "eleg", 0, 1, null! ), + new Among ( "ig", -1, 1, null! ), + new Among ( "eig", 2, 1, null! ), + new Among ( "lig", 2, 1, null! ), + new Among ( "elig", 4, 1, null! ), + new Among ( "els", -1, 1, null! ), + new Among ( "lov", -1, 1, null! ), + new Among ( "elov", 7, 1, null! ), + new Among ( "slov", 7, 1, null! ), + new Among ( "hetslov", 9, 1, null! ) }; private static readonly char[] g_v = {(char)17, (char)65, (char)16, (char)1, (char)0, (char)0, (char)0, diff --git a/ZeroLevel/Services/Semantic/Snowball/PortugalStemmer.cs b/ZeroLevel/Services/Semantic/Snowball/PortugalStemmer.cs index 637a8bd..03349ad 100644 --- a/ZeroLevel/Services/Semantic/Snowball/PortugalStemmer.cs +++ b/ZeroLevel/Services/Semantic/Snowball/PortugalStemmer.cs @@ -16,230 +16,230 @@ namespace Iveonik.Stemmers private readonly static Among[] a_0 = { - new Among ( "", -1, 3, null ), - new Among ( "\u00E3", 0, 1, null ), - new Among ( "\u00F5", 0, 2, null ) + new Among ( "", -1, 3, null! ), + new Among ( "\u00E3", 0, 1, null! ), + new Among ( "\u00F5", 0, 2, null! ) }; private readonly static Among[] a_1 = { - new Among ( "", -1, 3, null ), - new Among ( "a~", 0, 1, null ), - new Among ( "o~", 0, 2, null ) + new Among ( "", -1, 3, null! ), + new Among ( "a~", 0, 1, null! ), + new Among ( "o~", 0, 2, null! ) }; private readonly static Among[] a_2 = { - new Among ( "ic", -1, -1, null ), - new Among ( "ad", -1, -1, null ), - new Among ( "os", -1, -1, null ), - new Among ( "iv", -1, 1, null ) + new Among ( "ic", -1, -1, null! ), + new Among ( "ad", -1, -1, null! ), + new Among ( "os", -1, -1, null! ), + new Among ( "iv", -1, 1, null! ) }; private readonly static Among[] a_3 = { - new Among ( "ante", -1, 1, null ), - new Among ( "avel", -1, 1, null ), - new Among ( "\u00EDvel", -1, 1, null ) + new Among ( "ante", -1, 1, null! ), + new Among ( "avel", -1, 1, null! ), + new Among ( "\u00EDvel", -1, 1, null! ) }; private readonly static Among[] a_4 = { - new Among ( "ic", -1, 1, null ), - new Among ( "abil", -1, 1, null ), - new Among ( "iv", -1, 1, null ) + new Among ( "ic", -1, 1, null! ), + new Among ( "abil", -1, 1, null! ), + new Among ( "iv", -1, 1, null! ) }; private readonly static Among[] a_5 = { - new Among ( "ica", -1, 1, null ), - new Among ( "\u00E2ncia", -1, 1, null ), - new Among ( "\u00EAncia", -1, 4, null ), - new Among ( "ira", -1, 9, null ), - new Among ( "adora", -1, 1, null ), - new Among ( "osa", -1, 1, null ), - new Among ( "ista", -1, 1, null ), - new Among ( "iva", -1, 8, null ), - new Among ( "eza", -1, 1, null ), - new Among ( "log\u00EDa", -1, 2, null ), - new Among ( "idade", -1, 7, null ), - new Among ( "ante", -1, 1, null ), - new Among ( "mente", -1, 6, null ), - new Among ( "amente", 12, 5, null ), - new Among ( "\u00E1vel", -1, 1, null ), - new Among ( "\u00EDvel", -1, 1, null ), - new Among ( "uci\u00F3n", -1, 3, null ), - new Among ( "ico", -1, 1, null ), - new Among ( "ismo", -1, 1, null ), - new Among ( "oso", -1, 1, null ), - new Among ( "amento", -1, 1, null ), - new Among ( "imento", -1, 1, null ), - new Among ( "ivo", -1, 8, null ), - new Among ( "a\u00E7a~o", -1, 1, null ), - new Among ( "ador", -1, 1, null ), - new Among ( "icas", -1, 1, null ), - new Among ( "\u00EAncias", -1, 4, null ), - new Among ( "iras", -1, 9, null ), - new Among ( "adoras", -1, 1, null ), - new Among ( "osas", -1, 1, null ), - new Among ( "istas", -1, 1, null ), - new Among ( "ivas", -1, 8, null ), - new Among ( "ezas", -1, 1, null ), - new Among ( "log\u00EDas", -1, 2, null ), - new Among ( "idades", -1, 7, null ), - new Among ( "uciones", -1, 3, null ), - new Among ( "adores", -1, 1, null ), - new Among ( "antes", -1, 1, null ), - new Among ( "a\u00E7o~es", -1, 1, null ), - new Among ( "icos", -1, 1, null ), - new Among ( "ismos", -1, 1, null ), - new Among ( "osos", -1, 1, null ), - new Among ( "amentos", -1, 1, null ), - new Among ( "imentos", -1, 1, null ), - new Among ( "ivos", -1, 8, null ) + new Among ( "ica", -1, 1, null! ), + new Among ( "\u00E2ncia", -1, 1, null! ), + new Among ( "\u00EAncia", -1, 4, null! ), + new Among ( "ira", -1, 9, null! ), + new Among ( "adora", -1, 1, null! ), + new Among ( "osa", -1, 1, null! ), + new Among ( "ista", -1, 1, null! ), + new Among ( "iva", -1, 8, null! ), + new Among ( "eza", -1, 1, null! ), + new Among ( "log\u00EDa", -1, 2, null! ), + new Among ( "idade", -1, 7, null! ), + new Among ( "ante", -1, 1, null! ), + new Among ( "mente", -1, 6, null! ), + new Among ( "amente", 12, 5, null! ), + new Among ( "\u00E1vel", -1, 1, null! ), + new Among ( "\u00EDvel", -1, 1, null! ), + new Among ( "uci\u00F3n", -1, 3, null! ), + new Among ( "ico", -1, 1, null! ), + new Among ( "ismo", -1, 1, null! ), + new Among ( "oso", -1, 1, null! ), + new Among ( "amento", -1, 1, null! ), + new Among ( "imento", -1, 1, null! ), + new Among ( "ivo", -1, 8, null! ), + new Among ( "a\u00E7a~o", -1, 1, null! ), + new Among ( "ador", -1, 1, null! ), + new Among ( "icas", -1, 1, null! ), + new Among ( "\u00EAncias", -1, 4, null! ), + new Among ( "iras", -1, 9, null! ), + new Among ( "adoras", -1, 1, null! ), + new Among ( "osas", -1, 1, null! ), + new Among ( "istas", -1, 1, null! ), + new Among ( "ivas", -1, 8, null! ), + new Among ( "ezas", -1, 1, null! ), + new Among ( "log\u00EDas", -1, 2, null! ), + new Among ( "idades", -1, 7, null! ), + new Among ( "uciones", -1, 3, null! ), + new Among ( "adores", -1, 1, null! ), + new Among ( "antes", -1, 1, null! ), + new Among ( "a\u00E7o~es", -1, 1, null! ), + new Among ( "icos", -1, 1, null! ), + new Among ( "ismos", -1, 1, null! ), + new Among ( "osos", -1, 1, null! ), + new Among ( "amentos", -1, 1, null! ), + new Among ( "imentos", -1, 1, null! ), + new Among ( "ivos", -1, 8, null! ) }; private readonly static Among[] a_6 = { - new Among ( "ada", -1, 1, null ), - new Among ( "ida", -1, 1, null ), - new Among ( "ia", -1, 1, null ), - new Among ( "aria", 2, 1, null ), - new Among ( "eria", 2, 1, null ), - new Among ( "iria", 2, 1, null ), - new Among ( "ara", -1, 1, null ), - new Among ( "era", -1, 1, null ), - new Among ( "ira", -1, 1, null ), - new Among ( "ava", -1, 1, null ), - new Among ( "asse", -1, 1, null ), - new Among ( "esse", -1, 1, null ), - new Among ( "isse", -1, 1, null ), - new Among ( "aste", -1, 1, null ), - new Among ( "este", -1, 1, null ), - new Among ( "iste", -1, 1, null ), - new Among ( "ei", -1, 1, null ), - new Among ( "arei", 16, 1, null ), - new Among ( "erei", 16, 1, null ), - new Among ( "irei", 16, 1, null ), - new Among ( "am", -1, 1, null ), - new Among ( "iam", 20, 1, null ), - new Among ( "ariam", 21, 1, null ), - new Among ( "eriam", 21, 1, null ), - new Among ( "iriam", 21, 1, null ), - new Among ( "aram", 20, 1, null ), - new Among ( "eram", 20, 1, null ), - new Among ( "iram", 20, 1, null ), - new Among ( "avam", 20, 1, null ), - new Among ( "em", -1, 1, null ), - new Among ( "arem", 29, 1, null ), - new Among ( "erem", 29, 1, null ), - new Among ( "irem", 29, 1, null ), - new Among ( "assem", 29, 1, null ), - new Among ( "essem", 29, 1, null ), - new Among ( "issem", 29, 1, null ), - new Among ( "ado", -1, 1, null ), - new Among ( "ido", -1, 1, null ), - new Among ( "ando", -1, 1, null ), - new Among ( "endo", -1, 1, null ), - new Among ( "indo", -1, 1, null ), - new Among ( "ara~o", -1, 1, null ), - new Among ( "era~o", -1, 1, null ), - new Among ( "ira~o", -1, 1, null ), - new Among ( "ar", -1, 1, null ), - new Among ( "er", -1, 1, null ), - new Among ( "ir", -1, 1, null ), - new Among ( "as", -1, 1, null ), - new Among ( "adas", 47, 1, null ), - new Among ( "idas", 47, 1, null ), - new Among ( "ias", 47, 1, null ), - new Among ( "arias", 50, 1, null ), - new Among ( "erias", 50, 1, null ), - new Among ( "irias", 50, 1, null ), - new Among ( "aras", 47, 1, null ), - new Among ( "eras", 47, 1, null ), - new Among ( "iras", 47, 1, null ), - new Among ( "avas", 47, 1, null ), - new Among ( "es", -1, 1, null ), - new Among ( "ardes", 58, 1, null ), - new Among ( "erdes", 58, 1, null ), - new Among ( "irdes", 58, 1, null ), - new Among ( "ares", 58, 1, null ), - new Among ( "eres", 58, 1, null ), - new Among ( "ires", 58, 1, null ), - new Among ( "asses", 58, 1, null ), - new Among ( "esses", 58, 1, null ), - new Among ( "isses", 58, 1, null ), - new Among ( "astes", 58, 1, null ), - new Among ( "estes", 58, 1, null ), - new Among ( "istes", 58, 1, null ), - new Among ( "is", -1, 1, null ), - new Among ( "ais", 71, 1, null ), - new Among ( "eis", 71, 1, null ), - new Among ( "areis", 73, 1, null ), - new Among ( "ereis", 73, 1, null ), - new Among ( "ireis", 73, 1, null ), - new Among ( "\u00E1reis", 73, 1, null ), - new Among ( "\u00E9reis", 73, 1, null ), - new Among ( "\u00EDreis", 73, 1, null ), - new Among ( "\u00E1sseis", 73, 1, null ), - new Among ( "\u00E9sseis", 73, 1, null ), - new Among ( "\u00EDsseis", 73, 1, null ), - new Among ( "\u00E1veis", 73, 1, null ), - new Among ( "\u00EDeis", 73, 1, null ), - new Among ( "ar\u00EDeis", 84, 1, null ), - new Among ( "er\u00EDeis", 84, 1, null ), - new Among ( "ir\u00EDeis", 84, 1, null ), - new Among ( "ados", -1, 1, null ), - new Among ( "idos", -1, 1, null ), - new Among ( "amos", -1, 1, null ), - new Among ( "\u00E1ramos", 90, 1, null ), - new Among ( "\u00E9ramos", 90, 1, null ), - new Among ( "\u00EDramos", 90, 1, null ), - new Among ( "\u00E1vamos", 90, 1, null ), - new Among ( "\u00EDamos", 90, 1, null ), - new Among ( "ar\u00EDamos", 95, 1, null ), - new Among ( "er\u00EDamos", 95, 1, null ), - new Among ( "ir\u00EDamos", 95, 1, null ), - new Among ( "emos", -1, 1, null ), - new Among ( "aremos", 99, 1, null ), - new Among ( "eremos", 99, 1, null ), - new Among ( "iremos", 99, 1, null ), - new Among ( "\u00E1ssemos", 99, 1, null ), - new Among ( "\u00EAssemos", 99, 1, null ), - new Among ( "\u00EDssemos", 99, 1, null ), - new Among ( "imos", -1, 1, null ), - new Among ( "armos", -1, 1, null ), - new Among ( "ermos", -1, 1, null ), - new Among ( "irmos", -1, 1, null ), - new Among ( "\u00E1mos", -1, 1, null ), - new Among ( "ar\u00E1s", -1, 1, null ), - new Among ( "er\u00E1s", -1, 1, null ), - new Among ( "ir\u00E1s", -1, 1, null ), - new Among ( "eu", -1, 1, null ), - new Among ( "iu", -1, 1, null ), - new Among ( "ou", -1, 1, null ), - new Among ( "ar\u00E1", -1, 1, null ), - new Among ( "er\u00E1", -1, 1, null ), - new Among ( "ir\u00E1", -1, 1, null ) + new Among ( "ada", -1, 1, null! ), + new Among ( "ida", -1, 1, null! ), + new Among ( "ia", -1, 1, null! ), + new Among ( "aria", 2, 1, null! ), + new Among ( "eria", 2, 1, null! ), + new Among ( "iria", 2, 1, null! ), + new Among ( "ara", -1, 1, null! ), + new Among ( "era", -1, 1, null! ), + new Among ( "ira", -1, 1, null! ), + new Among ( "ava", -1, 1, null! ), + new Among ( "asse", -1, 1, null! ), + new Among ( "esse", -1, 1, null! ), + new Among ( "isse", -1, 1, null! ), + new Among ( "aste", -1, 1, null! ), + new Among ( "este", -1, 1, null! ), + new Among ( "iste", -1, 1, null! ), + new Among ( "ei", -1, 1, null! ), + new Among ( "arei", 16, 1, null! ), + new Among ( "erei", 16, 1, null! ), + new Among ( "irei", 16, 1, null! ), + new Among ( "am", -1, 1, null! ), + new Among ( "iam", 20, 1, null! ), + new Among ( "ariam", 21, 1, null! ), + new Among ( "eriam", 21, 1, null! ), + new Among ( "iriam", 21, 1, null! ), + new Among ( "aram", 20, 1, null! ), + new Among ( "eram", 20, 1, null! ), + new Among ( "iram", 20, 1, null! ), + new Among ( "avam", 20, 1, null! ), + new Among ( "em", -1, 1, null! ), + new Among ( "arem", 29, 1, null! ), + new Among ( "erem", 29, 1, null! ), + new Among ( "irem", 29, 1, null! ), + new Among ( "assem", 29, 1, null! ), + new Among ( "essem", 29, 1, null! ), + new Among ( "issem", 29, 1, null! ), + new Among ( "ado", -1, 1, null! ), + new Among ( "ido", -1, 1, null! ), + new Among ( "ando", -1, 1, null! ), + new Among ( "endo", -1, 1, null! ), + new Among ( "indo", -1, 1, null! ), + new Among ( "ara~o", -1, 1, null! ), + new Among ( "era~o", -1, 1, null! ), + new Among ( "ira~o", -1, 1, null! ), + new Among ( "ar", -1, 1, null! ), + new Among ( "er", -1, 1, null! ), + new Among ( "ir", -1, 1, null! ), + new Among ( "as", -1, 1, null! ), + new Among ( "adas", 47, 1, null! ), + new Among ( "idas", 47, 1, null! ), + new Among ( "ias", 47, 1, null! ), + new Among ( "arias", 50, 1, null! ), + new Among ( "erias", 50, 1, null! ), + new Among ( "irias", 50, 1, null! ), + new Among ( "aras", 47, 1, null! ), + new Among ( "eras", 47, 1, null! ), + new Among ( "iras", 47, 1, null! ), + new Among ( "avas", 47, 1, null! ), + new Among ( "es", -1, 1, null! ), + new Among ( "ardes", 58, 1, null! ), + new Among ( "erdes", 58, 1, null! ), + new Among ( "irdes", 58, 1, null! ), + new Among ( "ares", 58, 1, null! ), + new Among ( "eres", 58, 1, null! ), + new Among ( "ires", 58, 1, null! ), + new Among ( "asses", 58, 1, null! ), + new Among ( "esses", 58, 1, null! ), + new Among ( "isses", 58, 1, null! ), + new Among ( "astes", 58, 1, null! ), + new Among ( "estes", 58, 1, null! ), + new Among ( "istes", 58, 1, null! ), + new Among ( "is", -1, 1, null! ), + new Among ( "ais", 71, 1, null! ), + new Among ( "eis", 71, 1, null! ), + new Among ( "areis", 73, 1, null! ), + new Among ( "ereis", 73, 1, null! ), + new Among ( "ireis", 73, 1, null! ), + new Among ( "\u00E1reis", 73, 1, null! ), + new Among ( "\u00E9reis", 73, 1, null! ), + new Among ( "\u00EDreis", 73, 1, null! ), + new Among ( "\u00E1sseis", 73, 1, null! ), + new Among ( "\u00E9sseis", 73, 1, null! ), + new Among ( "\u00EDsseis", 73, 1, null! ), + new Among ( "\u00E1veis", 73, 1, null! ), + new Among ( "\u00EDeis", 73, 1, null! ), + new Among ( "ar\u00EDeis", 84, 1, null! ), + new Among ( "er\u00EDeis", 84, 1, null! ), + new Among ( "ir\u00EDeis", 84, 1, null! ), + new Among ( "ados", -1, 1, null! ), + new Among ( "idos", -1, 1, null! ), + new Among ( "amos", -1, 1, null! ), + new Among ( "\u00E1ramos", 90, 1, null! ), + new Among ( "\u00E9ramos", 90, 1, null! ), + new Among ( "\u00EDramos", 90, 1, null! ), + new Among ( "\u00E1vamos", 90, 1, null! ), + new Among ( "\u00EDamos", 90, 1, null! ), + new Among ( "ar\u00EDamos", 95, 1, null! ), + new Among ( "er\u00EDamos", 95, 1, null! ), + new Among ( "ir\u00EDamos", 95, 1, null! ), + new Among ( "emos", -1, 1, null! ), + new Among ( "aremos", 99, 1, null! ), + new Among ( "eremos", 99, 1, null! ), + new Among ( "iremos", 99, 1, null! ), + new Among ( "\u00E1ssemos", 99, 1, null! ), + new Among ( "\u00EAssemos", 99, 1, null! ), + new Among ( "\u00EDssemos", 99, 1, null! ), + new Among ( "imos", -1, 1, null! ), + new Among ( "armos", -1, 1, null! ), + new Among ( "ermos", -1, 1, null! ), + new Among ( "irmos", -1, 1, null! ), + new Among ( "\u00E1mos", -1, 1, null! ), + new Among ( "ar\u00E1s", -1, 1, null! ), + new Among ( "er\u00E1s", -1, 1, null! ), + new Among ( "ir\u00E1s", -1, 1, null! ), + new Among ( "eu", -1, 1, null! ), + new Among ( "iu", -1, 1, null! ), + new Among ( "ou", -1, 1, null! ), + new Among ( "ar\u00E1", -1, 1, null! ), + new Among ( "er\u00E1", -1, 1, null! ), + new Among ( "ir\u00E1", -1, 1, null! ) }; private readonly static Among[] a_7 = { - new Among ( "a", -1, 1, null ), - new Among ( "i", -1, 1, null ), - new Among ( "o", -1, 1, null ), - new Among ( "os", -1, 1, null ), - new Among ( "\u00E1", -1, 1, null ), - new Among ( "\u00ED", -1, 1, null ), - new Among ( "\u00F3", -1, 1, null ) + new Among ( "a", -1, 1, null! ), + new Among ( "i", -1, 1, null! ), + new Among ( "o", -1, 1, null! ), + new Among ( "os", -1, 1, null! ), + new Among ( "\u00E1", -1, 1, null! ), + new Among ( "\u00ED", -1, 1, null! ), + new Among ( "\u00F3", -1, 1, null! ) }; private readonly static Among[] a_8 = { - new Among ( "e", -1, 1, null ), - new Among ( "\u00E7", -1, 2, null ), - new Among ( "\u00E9", -1, 1, null ), - new Among ( "\u00EA", -1, 1, null ) + new Among ( "e", -1, 1, null! ), + new Among ( "\u00E7", -1, 2, null! ), + new Among ( "\u00E9", -1, 1, null! ), + new Among ( "\u00EA", -1, 1, null! ) }; private static readonly char[] g_v = {(char)17, (char)65, (char)16, (char)0, (char)0, (char)0, (char)0, diff --git a/ZeroLevel/Services/Semantic/Snowball/RomanianStemmer.cs b/ZeroLevel/Services/Semantic/Snowball/RomanianStemmer.cs index 72570ce..98f7b1a 100644 --- a/ZeroLevel/Services/Semantic/Snowball/RomanianStemmer.cs +++ b/ZeroLevel/Services/Semantic/Snowball/RomanianStemmer.cs @@ -15,247 +15,247 @@ namespace Iveonik.Stemmers private readonly static RomanianStemmer methodObject = new RomanianStemmer(); private readonly static Among[] a_0 = { - new Among ( "", -1, 3, null ), - new Among ( "I", 0, 1, null ), - new Among ( "U", 0, 2, null ) + new Among ( "", -1, 3, null! ), + new Among ( "I", 0, 1, null! ), + new Among ( "U", 0, 2, null! ) }; private readonly static Among[] a_1 = { - new Among ( "ea", -1, 3, null ), - new Among ( "a\u0163ia", -1, 7, null ), - new Among ( "aua", -1, 2, null ), - new Among ( "iua", -1, 4, null ), - new Among ( "a\u0163ie", -1, 7, null ), - new Among ( "ele", -1, 3, null ), - new Among ( "ile", -1, 5, null ), - new Among ( "iile", 6, 4, null ), - new Among ( "iei", -1, 4, null ), - new Among ( "atei", -1, 6, null ), - new Among ( "ii", -1, 4, null ), - new Among ( "ului", -1, 1, null ), - new Among ( "ul", -1, 1, null ), - new Among ( "elor", -1, 3, null ), - new Among ( "ilor", -1, 4, null ), - new Among ( "iilor", 14, 4, null ) + new Among ( "ea", -1, 3, null! ), + new Among ( "a\u0163ia", -1, 7, null! ), + new Among ( "aua", -1, 2, null! ), + new Among ( "iua", -1, 4, null! ), + new Among ( "a\u0163ie", -1, 7, null! ), + new Among ( "ele", -1, 3, null! ), + new Among ( "ile", -1, 5, null! ), + new Among ( "iile", 6, 4, null! ), + new Among ( "iei", -1, 4, null! ), + new Among ( "atei", -1, 6, null! ), + new Among ( "ii", -1, 4, null! ), + new Among ( "ului", -1, 1, null! ), + new Among ( "ul", -1, 1, null! ), + new Among ( "elor", -1, 3, null! ), + new Among ( "ilor", -1, 4, null! ), + new Among ( "iilor", 14, 4, null! ) }; private readonly static Among[] a_2 = { - new Among ( "icala", -1, 4, null ), - new Among ( "iciva", -1, 4, null ), - new Among ( "ativa", -1, 5, null ), - new Among ( "itiva", -1, 6, null ), - new Among ( "icale", -1, 4, null ), - new Among ( "a\u0163iune", -1, 5, null ), - new Among ( "i\u0163iune", -1, 6, null ), - new Among ( "atoare", -1, 5, null ), - new Among ( "itoare", -1, 6, null ), - new Among ( "\u0103toare", -1, 5, null ), - new Among ( "icitate", -1, 4, null ), - new Among ( "abilitate", -1, 1, null ), - new Among ( "ibilitate", -1, 2, null ), - new Among ( "ivitate", -1, 3, null ), - new Among ( "icive", -1, 4, null ), - new Among ( "ative", -1, 5, null ), - new Among ( "itive", -1, 6, null ), - new Among ( "icali", -1, 4, null ), - new Among ( "atori", -1, 5, null ), - new Among ( "icatori", 18, 4, null ), - new Among ( "itori", -1, 6, null ), - new Among ( "\u0103tori", -1, 5, null ), - new Among ( "icitati", -1, 4, null ), - new Among ( "abilitati", -1, 1, null ), - new Among ( "ivitati", -1, 3, null ), - new Among ( "icivi", -1, 4, null ), - new Among ( "ativi", -1, 5, null ), - new Among ( "itivi", -1, 6, null ), - new Among ( "icit\u0103i", -1, 4, null ), - new Among ( "abilit\u0103i", -1, 1, null ), - new Among ( "ivit\u0103i", -1, 3, null ), - new Among ( "icit\u0103\u0163i", -1, 4, null ), - new Among ( "abilit\u0103\u0163i", -1, 1, null ), - new Among ( "ivit\u0103\u0163i", -1, 3, null ), - new Among ( "ical", -1, 4, null ), - new Among ( "ator", -1, 5, null ), - new Among ( "icator", 35, 4, null ), - new Among ( "itor", -1, 6, null ), - new Among ( "\u0103tor", -1, 5, null ), - new Among ( "iciv", -1, 4, null ), - new Among ( "ativ", -1, 5, null ), - new Among ( "itiv", -1, 6, null ), - new Among ( "ical\u0103", -1, 4, null ), - new Among ( "iciv\u0103", -1, 4, null ), - new Among ( "ativ\u0103", -1, 5, null ), - new Among ( "itiv\u0103", -1, 6, null ) + new Among ( "icala", -1, 4, null! ), + new Among ( "iciva", -1, 4, null! ), + new Among ( "ativa", -1, 5, null! ), + new Among ( "itiva", -1, 6, null! ), + new Among ( "icale", -1, 4, null! ), + new Among ( "a\u0163iune", -1, 5, null! ), + new Among ( "i\u0163iune", -1, 6, null! ), + new Among ( "atoare", -1, 5, null! ), + new Among ( "itoare", -1, 6, null! ), + new Among ( "\u0103toare", -1, 5, null! ), + new Among ( "icitate", -1, 4, null! ), + new Among ( "abilitate", -1, 1, null! ), + new Among ( "ibilitate", -1, 2, null! ), + new Among ( "ivitate", -1, 3, null! ), + new Among ( "icive", -1, 4, null! ), + new Among ( "ative", -1, 5, null! ), + new Among ( "itive", -1, 6, null! ), + new Among ( "icali", -1, 4, null! ), + new Among ( "atori", -1, 5, null! ), + new Among ( "icatori", 18, 4, null! ), + new Among ( "itori", -1, 6, null! ), + new Among ( "\u0103tori", -1, 5, null! ), + new Among ( "icitati", -1, 4, null! ), + new Among ( "abilitati", -1, 1, null! ), + new Among ( "ivitati", -1, 3, null! ), + new Among ( "icivi", -1, 4, null! ), + new Among ( "ativi", -1, 5, null! ), + new Among ( "itivi", -1, 6, null! ), + new Among ( "icit\u0103i", -1, 4, null! ), + new Among ( "abilit\u0103i", -1, 1, null! ), + new Among ( "ivit\u0103i", -1, 3, null! ), + new Among ( "icit\u0103\u0163i", -1, 4, null! ), + new Among ( "abilit\u0103\u0163i", -1, 1, null! ), + new Among ( "ivit\u0103\u0163i", -1, 3, null! ), + new Among ( "ical", -1, 4, null! ), + new Among ( "ator", -1, 5, null! ), + new Among ( "icator", 35, 4, null! ), + new Among ( "itor", -1, 6, null! ), + new Among ( "\u0103tor", -1, 5, null! ), + new Among ( "iciv", -1, 4, null! ), + new Among ( "ativ", -1, 5, null! ), + new Among ( "itiv", -1, 6, null! ), + new Among ( "ical\u0103", -1, 4, null! ), + new Among ( "iciv\u0103", -1, 4, null! ), + new Among ( "ativ\u0103", -1, 5, null! ), + new Among ( "itiv\u0103", -1, 6, null! ) }; private readonly static Among[] a_3 = { - new Among ( "ica", -1, 1, null ), - new Among ( "abila", -1, 1, null ), - new Among ( "ibila", -1, 1, null ), - new Among ( "oasa", -1, 1, null ), - new Among ( "ata", -1, 1, null ), - new Among ( "ita", -1, 1, null ), - new Among ( "anta", -1, 1, null ), - new Among ( "ista", -1, 3, null ), - new Among ( "uta", -1, 1, null ), - new Among ( "iva", -1, 1, null ), - new Among ( "ic", -1, 1, null ), - new Among ( "ice", -1, 1, null ), - new Among ( "abile", -1, 1, null ), - new Among ( "ibile", -1, 1, null ), - new Among ( "isme", -1, 3, null ), - new Among ( "iune", -1, 2, null ), - new Among ( "oase", -1, 1, null ), - new Among ( "ate", -1, 1, null ), - new Among ( "itate", 17, 1, null ), - new Among ( "ite", -1, 1, null ), - new Among ( "ante", -1, 1, null ), - new Among ( "iste", -1, 3, null ), - new Among ( "ute", -1, 1, null ), - new Among ( "ive", -1, 1, null ), - new Among ( "ici", -1, 1, null ), - new Among ( "abili", -1, 1, null ), - new Among ( "ibili", -1, 1, null ), - new Among ( "iuni", -1, 2, null ), - new Among ( "atori", -1, 1, null ), - new Among ( "osi", -1, 1, null ), - new Among ( "ati", -1, 1, null ), - new Among ( "itati", 30, 1, null ), - new Among ( "iti", -1, 1, null ), - new Among ( "anti", -1, 1, null ), - new Among ( "isti", -1, 3, null ), - new Among ( "uti", -1, 1, null ), - new Among ( "i\u015Fti", -1, 3, null ), - new Among ( "ivi", -1, 1, null ), - new Among ( "it\u0103i", -1, 1, null ), - new Among ( "o\u015Fi", -1, 1, null ), - new Among ( "it\u0103\u0163i", -1, 1, null ), - new Among ( "abil", -1, 1, null ), - new Among ( "ibil", -1, 1, null ), - new Among ( "ism", -1, 3, null ), - new Among ( "ator", -1, 1, null ), - new Among ( "os", -1, 1, null ), - new Among ( "at", -1, 1, null ), - new Among ( "it", -1, 1, null ), - new Among ( "ant", -1, 1, null ), - new Among ( "ist", -1, 3, null ), - new Among ( "ut", -1, 1, null ), - new Among ( "iv", -1, 1, null ), - new Among ( "ic\u0103", -1, 1, null ), - new Among ( "abil\u0103", -1, 1, null ), - new Among ( "ibil\u0103", -1, 1, null ), - new Among ( "oas\u0103", -1, 1, null ), - new Among ( "at\u0103", -1, 1, null ), - new Among ( "it\u0103", -1, 1, null ), - new Among ( "ant\u0103", -1, 1, null ), - new Among ( "ist\u0103", -1, 3, null ), - new Among ( "ut\u0103", -1, 1, null ), - new Among ( "iv\u0103", -1, 1, null ) + new Among ( "ica", -1, 1, null! ), + new Among ( "abila", -1, 1, null! ), + new Among ( "ibila", -1, 1, null! ), + new Among ( "oasa", -1, 1, null! ), + new Among ( "ata", -1, 1, null! ), + new Among ( "ita", -1, 1, null! ), + new Among ( "anta", -1, 1, null! ), + new Among ( "ista", -1, 3, null! ), + new Among ( "uta", -1, 1, null! ), + new Among ( "iva", -1, 1, null! ), + new Among ( "ic", -1, 1, null! ), + new Among ( "ice", -1, 1, null! ), + new Among ( "abile", -1, 1, null! ), + new Among ( "ibile", -1, 1, null! ), + new Among ( "isme", -1, 3, null! ), + new Among ( "iune", -1, 2, null! ), + new Among ( "oase", -1, 1, null! ), + new Among ( "ate", -1, 1, null! ), + new Among ( "itate", 17, 1, null! ), + new Among ( "ite", -1, 1, null! ), + new Among ( "ante", -1, 1, null! ), + new Among ( "iste", -1, 3, null! ), + new Among ( "ute", -1, 1, null! ), + new Among ( "ive", -1, 1, null! ), + new Among ( "ici", -1, 1, null! ), + new Among ( "abili", -1, 1, null! ), + new Among ( "ibili", -1, 1, null! ), + new Among ( "iuni", -1, 2, null! ), + new Among ( "atori", -1, 1, null! ), + new Among ( "osi", -1, 1, null! ), + new Among ( "ati", -1, 1, null! ), + new Among ( "itati", 30, 1, null! ), + new Among ( "iti", -1, 1, null! ), + new Among ( "anti", -1, 1, null! ), + new Among ( "isti", -1, 3, null! ), + new Among ( "uti", -1, 1, null! ), + new Among ( "i\u015Fti", -1, 3, null! ), + new Among ( "ivi", -1, 1, null! ), + new Among ( "it\u0103i", -1, 1, null! ), + new Among ( "o\u015Fi", -1, 1, null! ), + new Among ( "it\u0103\u0163i", -1, 1, null! ), + new Among ( "abil", -1, 1, null! ), + new Among ( "ibil", -1, 1, null! ), + new Among ( "ism", -1, 3, null! ), + new Among ( "ator", -1, 1, null! ), + new Among ( "os", -1, 1, null! ), + new Among ( "at", -1, 1, null! ), + new Among ( "it", -1, 1, null! ), + new Among ( "ant", -1, 1, null! ), + new Among ( "ist", -1, 3, null! ), + new Among ( "ut", -1, 1, null! ), + new Among ( "iv", -1, 1, null! ), + new Among ( "ic\u0103", -1, 1, null! ), + new Among ( "abil\u0103", -1, 1, null! ), + new Among ( "ibil\u0103", -1, 1, null! ), + new Among ( "oas\u0103", -1, 1, null! ), + new Among ( "at\u0103", -1, 1, null! ), + new Among ( "it\u0103", -1, 1, null! ), + new Among ( "ant\u0103", -1, 1, null! ), + new Among ( "ist\u0103", -1, 3, null! ), + new Among ( "ut\u0103", -1, 1, null! ), + new Among ( "iv\u0103", -1, 1, null! ) }; private readonly static Among[] a_4 = { - new Among ( "ea", -1, 1, null ), - new Among ( "ia", -1, 1, null ), - new Among ( "esc", -1, 1, null ), - new Among ( "\u0103sc", -1, 1, null ), - new Among ( "ind", -1, 1, null ), - new Among ( "\u00E2nd", -1, 1, null ), - new Among ( "are", -1, 1, null ), - new Among ( "ere", -1, 1, null ), - new Among ( "ire", -1, 1, null ), - new Among ( "\u00E2re", -1, 1, null ), - new Among ( "se", -1, 2, null ), - new Among ( "ase", 10, 1, null ), - new Among ( "sese", 10, 2, null ), - new Among ( "ise", 10, 1, null ), - new Among ( "use", 10, 1, null ), - new Among ( "\u00E2se", 10, 1, null ), - new Among ( "e\u015Fte", -1, 1, null ), - new Among ( "\u0103\u015Fte", -1, 1, null ), - new Among ( "eze", -1, 1, null ), - new Among ( "ai", -1, 1, null ), - new Among ( "eai", 19, 1, null ), - new Among ( "iai", 19, 1, null ), - new Among ( "sei", -1, 2, null ), - new Among ( "e\u015Fti", -1, 1, null ), - new Among ( "\u0103\u015Fti", -1, 1, null ), - new Among ( "ui", -1, 1, null ), - new Among ( "ezi", -1, 1, null ), - new Among ( "\u00E2i", -1, 1, null ), - new Among ( "a\u015Fi", -1, 1, null ), - new Among ( "se\u015Fi", -1, 2, null ), - new Among ( "ase\u015Fi", 29, 1, null ), - new Among ( "sese\u015Fi", 29, 2, null ), - new Among ( "ise\u015Fi", 29, 1, null ), - new Among ( "use\u015Fi", 29, 1, null ), - new Among ( "\u00E2se\u015Fi", 29, 1, null ), - new Among ( "i\u015Fi", -1, 1, null ), - new Among ( "u\u015Fi", -1, 1, null ), - new Among ( "\u00E2\u015Fi", -1, 1, null ), - new Among ( "a\u0163i", -1, 2, null ), - new Among ( "ea\u0163i", 38, 1, null ), - new Among ( "ia\u0163i", 38, 1, null ), - new Among ( "e\u0163i", -1, 2, null ), - new Among ( "i\u0163i", -1, 2, null ), - new Among ( "\u00E2\u0163i", -1, 2, null ), - new Among ( "ar\u0103\u0163i", -1, 1, null ), - new Among ( "ser\u0103\u0163i", -1, 2, null ), - new Among ( "aser\u0103\u0163i", 45, 1, null ), - new Among ( "seser\u0103\u0163i", 45, 2, null ), - new Among ( "iser\u0103\u0163i", 45, 1, null ), - new Among ( "user\u0103\u0163i", 45, 1, null ), - new Among ( "\u00E2ser\u0103\u0163i", 45, 1, null ), - new Among ( "ir\u0103\u0163i", -1, 1, null ), - new Among ( "ur\u0103\u0163i", -1, 1, null ), - new Among ( "\u00E2r\u0103\u0163i", -1, 1, null ), - new Among ( "am", -1, 1, null ), - new Among ( "eam", 54, 1, null ), - new Among ( "iam", 54, 1, null ), - new Among ( "em", -1, 2, null ), - new Among ( "asem", 57, 1, null ), - new Among ( "sesem", 57, 2, null ), - new Among ( "isem", 57, 1, null ), - new Among ( "usem", 57, 1, null ), - new Among ( "\u00E2sem", 57, 1, null ), - new Among ( "im", -1, 2, null ), - new Among ( "\u00E2m", -1, 2, null ), - new Among ( "\u0103m", -1, 2, null ), - new Among ( "ar\u0103m", 65, 1, null ), - new Among ( "ser\u0103m", 65, 2, null ), - new Among ( "aser\u0103m", 67, 1, null ), - new Among ( "seser\u0103m", 67, 2, null ), - new Among ( "iser\u0103m", 67, 1, null ), - new Among ( "user\u0103m", 67, 1, null ), - new Among ( "\u00E2ser\u0103m", 67, 1, null ), - new Among ( "ir\u0103m", 65, 1, null ), - new Among ( "ur\u0103m", 65, 1, null ), - new Among ( "\u00E2r\u0103m", 65, 1, null ), - new Among ( "au", -1, 1, null ), - new Among ( "eau", 76, 1, null ), - new Among ( "iau", 76, 1, null ), - new Among ( "indu", -1, 1, null ), - new Among ( "\u00E2ndu", -1, 1, null ), - new Among ( "ez", -1, 1, null ), - new Among ( "easc\u0103", -1, 1, null ), - new Among ( "ar\u0103", -1, 1, null ), - new Among ( "ser\u0103", -1, 2, null ), - new Among ( "aser\u0103", 84, 1, null ), - new Among ( "seser\u0103", 84, 2, null ), - new Among ( "iser\u0103", 84, 1, null ), - new Among ( "user\u0103", 84, 1, null ), - new Among ( "\u00E2ser\u0103", 84, 1, null ), - new Among ( "ir\u0103", -1, 1, null ), - new Among ( "ur\u0103", -1, 1, null ), - new Among ( "\u00E2r\u0103", -1, 1, null ), - new Among ( "eaz\u0103", -1, 1, null ) + new Among ( "ea", -1, 1, null! ), + new Among ( "ia", -1, 1, null! ), + new Among ( "esc", -1, 1, null! ), + new Among ( "\u0103sc", -1, 1, null! ), + new Among ( "ind", -1, 1, null! ), + new Among ( "\u00E2nd", -1, 1, null! ), + new Among ( "are", -1, 1, null! ), + new Among ( "ere", -1, 1, null! ), + new Among ( "ire", -1, 1, null! ), + new Among ( "\u00E2re", -1, 1, null! ), + new Among ( "se", -1, 2, null! ), + new Among ( "ase", 10, 1, null! ), + new Among ( "sese", 10, 2, null! ), + new Among ( "ise", 10, 1, null! ), + new Among ( "use", 10, 1, null! ), + new Among ( "\u00E2se", 10, 1, null! ), + new Among ( "e\u015Fte", -1, 1, null! ), + new Among ( "\u0103\u015Fte", -1, 1, null! ), + new Among ( "eze", -1, 1, null! ), + new Among ( "ai", -1, 1, null! ), + new Among ( "eai", 19, 1, null! ), + new Among ( "iai", 19, 1, null! ), + new Among ( "sei", -1, 2, null! ), + new Among ( "e\u015Fti", -1, 1, null! ), + new Among ( "\u0103\u015Fti", -1, 1, null! ), + new Among ( "ui", -1, 1, null! ), + new Among ( "ezi", -1, 1, null! ), + new Among ( "\u00E2i", -1, 1, null! ), + new Among ( "a\u015Fi", -1, 1, null! ), + new Among ( "se\u015Fi", -1, 2, null! ), + new Among ( "ase\u015Fi", 29, 1, null! ), + new Among ( "sese\u015Fi", 29, 2, null! ), + new Among ( "ise\u015Fi", 29, 1, null! ), + new Among ( "use\u015Fi", 29, 1, null! ), + new Among ( "\u00E2se\u015Fi", 29, 1, null! ), + new Among ( "i\u015Fi", -1, 1, null! ), + new Among ( "u\u015Fi", -1, 1, null! ), + new Among ( "\u00E2\u015Fi", -1, 1, null! ), + new Among ( "a\u0163i", -1, 2, null! ), + new Among ( "ea\u0163i", 38, 1, null! ), + new Among ( "ia\u0163i", 38, 1, null! ), + new Among ( "e\u0163i", -1, 2, null! ), + new Among ( "i\u0163i", -1, 2, null! ), + new Among ( "\u00E2\u0163i", -1, 2, null! ), + new Among ( "ar\u0103\u0163i", -1, 1, null! ), + new Among ( "ser\u0103\u0163i", -1, 2, null! ), + new Among ( "aser\u0103\u0163i", 45, 1, null! ), + new Among ( "seser\u0103\u0163i", 45, 2, null! ), + new Among ( "iser\u0103\u0163i", 45, 1, null! ), + new Among ( "user\u0103\u0163i", 45, 1, null! ), + new Among ( "\u00E2ser\u0103\u0163i", 45, 1, null! ), + new Among ( "ir\u0103\u0163i", -1, 1, null! ), + new Among ( "ur\u0103\u0163i", -1, 1, null! ), + new Among ( "\u00E2r\u0103\u0163i", -1, 1, null! ), + new Among ( "am", -1, 1, null! ), + new Among ( "eam", 54, 1, null! ), + new Among ( "iam", 54, 1, null! ), + new Among ( "em", -1, 2, null! ), + new Among ( "asem", 57, 1, null! ), + new Among ( "sesem", 57, 2, null! ), + new Among ( "isem", 57, 1, null! ), + new Among ( "usem", 57, 1, null! ), + new Among ( "\u00E2sem", 57, 1, null! ), + new Among ( "im", -1, 2, null! ), + new Among ( "\u00E2m", -1, 2, null! ), + new Among ( "\u0103m", -1, 2, null! ), + new Among ( "ar\u0103m", 65, 1, null! ), + new Among ( "ser\u0103m", 65, 2, null! ), + new Among ( "aser\u0103m", 67, 1, null! ), + new Among ( "seser\u0103m", 67, 2, null! ), + new Among ( "iser\u0103m", 67, 1, null! ), + new Among ( "user\u0103m", 67, 1, null! ), + new Among ( "\u00E2ser\u0103m", 67, 1, null! ), + new Among ( "ir\u0103m", 65, 1, null! ), + new Among ( "ur\u0103m", 65, 1, null! ), + new Among ( "\u00E2r\u0103m", 65, 1, null! ), + new Among ( "au", -1, 1, null! ), + new Among ( "eau", 76, 1, null! ), + new Among ( "iau", 76, 1, null! ), + new Among ( "indu", -1, 1, null! ), + new Among ( "\u00E2ndu", -1, 1, null! ), + new Among ( "ez", -1, 1, null! ), + new Among ( "easc\u0103", -1, 1, null! ), + new Among ( "ar\u0103", -1, 1, null! ), + new Among ( "ser\u0103", -1, 2, null! ), + new Among ( "aser\u0103", 84, 1, null! ), + new Among ( "seser\u0103", 84, 2, null! ), + new Among ( "iser\u0103", 84, 1, null! ), + new Among ( "user\u0103", 84, 1, null! ), + new Among ( "\u00E2ser\u0103", 84, 1, null! ), + new Among ( "ir\u0103", -1, 1, null! ), + new Among ( "ur\u0103", -1, 1, null! ), + new Among ( "\u00E2r\u0103", -1, 1, null! ), + new Among ( "eaz\u0103", -1, 1, null! ) }; private readonly static Among[] a_5 = { - new Among ( "a", -1, 1, null ), - new Among ( "e", -1, 1, null ), - new Among ( "ie", 1, 1, null ), - new Among ( "i", -1, 1, null ), - new Among ( "\u0103", -1, 1, null ) + new Among ( "a", -1, 1, null! ), + new Among ( "e", -1, 1, null! ), + new Among ( "ie", 1, 1, null! ), + new Among ( "i", -1, 1, null! ), + new Among ( "\u0103", -1, 1, null! ) }; private static readonly char[] g_v = {(char)17, (char)65, (char)16, (char)0, (char)0, (char)0, diff --git a/ZeroLevel/Services/Semantic/Snowball/RussianStemmer.cs b/ZeroLevel/Services/Semantic/Snowball/RussianStemmer.cs index 0a1089a..0931b2b 100644 --- a/ZeroLevel/Services/Semantic/Snowball/RussianStemmer.cs +++ b/ZeroLevel/Services/Semantic/Snowball/RussianStemmer.cs @@ -16,167 +16,167 @@ namespace Iveonik.Stemmers private readonly static Among[] a_0 = { - new Among ( "\u0432", -1, 1, null ), - new Among ( "\u0438\u0432", 0, 2, null ), - new Among ( "\u044B\u0432", 0, 2, null ), - new Among ( "\u0432\u0448\u0438", -1, 1, null ), - new Among ( "\u0438\u0432\u0448\u0438", 3, 2, null ), - new Among ( "\u044B\u0432\u0448\u0438", 3, 2, null ), - new Among ( "\u0432\u0448\u0438\u0441\u044C", -1, 1, null ), - new Among ( "\u0438\u0432\u0448\u0438\u0441\u044C", 6, 2, null ), - new Among ( "\u044B\u0432\u0448\u0438\u0441\u044C", 6, 2, null ) + new Among ( "\u0432", -1, 1, null! ), + new Among ( "\u0438\u0432", 0, 2, null! ), + new Among ( "\u044B\u0432", 0, 2, null! ), + new Among ( "\u0432\u0448\u0438", -1, 1, null! ), + new Among ( "\u0438\u0432\u0448\u0438", 3, 2, null! ), + new Among ( "\u044B\u0432\u0448\u0438", 3, 2, null! ), + new Among ( "\u0432\u0448\u0438\u0441\u044C", -1, 1, null! ), + new Among ( "\u0438\u0432\u0448\u0438\u0441\u044C", 6, 2, null! ), + new Among ( "\u044B\u0432\u0448\u0438\u0441\u044C", 6, 2, null! ) }; private readonly static Among[] a_1 = { - new Among ( "\u0435\u0435", -1, 1, null ), - new Among ( "\u0438\u0435", -1, 1, null ), - new Among ( "\u043E\u0435", -1, 1, null ), - new Among ( "\u044B\u0435", -1, 1, null ), - new Among ( "\u0438\u043C\u0438", -1, 1, null ), - new Among ( "\u044B\u043C\u0438", -1, 1, null ), - new Among ( "\u0435\u0439", -1, 1, null ), - new Among ( "\u0438\u0439", -1, 1, null ), - new Among ( "\u043E\u0439", -1, 1, null ), - new Among ( "\u044B\u0439", -1, 1, null ), - new Among ( "\u0435\u043C", -1, 1, null ), - new Among ( "\u0438\u043C", -1, 1, null ), - new Among ( "\u043E\u043C", -1, 1, null ), - new Among ( "\u044B\u043C", -1, 1, null ), - new Among ( "\u0435\u0433\u043E", -1, 1, null ), - new Among ( "\u043E\u0433\u043E", -1, 1, null ), - new Among ( "\u0435\u043C\u0443", -1, 1, null ), - new Among ( "\u043E\u043C\u0443", -1, 1, null ), - new Among ( "\u0438\u0445", -1, 1, null ), - new Among ( "\u044B\u0445", -1, 1, null ), - new Among ( "\u0435\u044E", -1, 1, null ), - new Among ( "\u043E\u044E", -1, 1, null ), - new Among ( "\u0443\u044E", -1, 1, null ), - new Among ( "\u044E\u044E", -1, 1, null ), - new Among ( "\u0430\u044F", -1, 1, null ), - new Among ( "\u044F\u044F", -1, 1, null ) + new Among ( "\u0435\u0435", -1, 1, null! ), + new Among ( "\u0438\u0435", -1, 1, null! ), + new Among ( "\u043E\u0435", -1, 1, null! ), + new Among ( "\u044B\u0435", -1, 1, null! ), + new Among ( "\u0438\u043C\u0438", -1, 1, null! ), + new Among ( "\u044B\u043C\u0438", -1, 1, null! ), + new Among ( "\u0435\u0439", -1, 1, null! ), + new Among ( "\u0438\u0439", -1, 1, null! ), + new Among ( "\u043E\u0439", -1, 1, null! ), + new Among ( "\u044B\u0439", -1, 1, null! ), + new Among ( "\u0435\u043C", -1, 1, null! ), + new Among ( "\u0438\u043C", -1, 1, null! ), + new Among ( "\u043E\u043C", -1, 1, null! ), + new Among ( "\u044B\u043C", -1, 1, null! ), + new Among ( "\u0435\u0433\u043E", -1, 1, null! ), + new Among ( "\u043E\u0433\u043E", -1, 1, null! ), + new Among ( "\u0435\u043C\u0443", -1, 1, null! ), + new Among ( "\u043E\u043C\u0443", -1, 1, null! ), + new Among ( "\u0438\u0445", -1, 1, null! ), + new Among ( "\u044B\u0445", -1, 1, null! ), + new Among ( "\u0435\u044E", -1, 1, null! ), + new Among ( "\u043E\u044E", -1, 1, null! ), + new Among ( "\u0443\u044E", -1, 1, null! ), + new Among ( "\u044E\u044E", -1, 1, null! ), + new Among ( "\u0430\u044F", -1, 1, null! ), + new Among ( "\u044F\u044F", -1, 1, null! ) }; private readonly static Among[] a_2 = { - new Among ( "\u0435\u043C", -1, 1, null ), - new Among ( "\u043D\u043D", -1, 1, null ), - new Among ( "\u0432\u0448", -1, 1, null ), - new Among ( "\u0438\u0432\u0448", 2, 2, null ), - new Among ( "\u044B\u0432\u0448", 2, 2, null ), - new Among ( "\u0449", -1, 1, null ), - new Among ( "\u044E\u0449", 5, 1, null ), - new Among ( "\u0443\u044E\u0449", 6, 2, null ) + new Among ( "\u0435\u043C", -1, 1, null! ), + new Among ( "\u043D\u043D", -1, 1, null! ), + new Among ( "\u0432\u0448", -1, 1, null! ), + new Among ( "\u0438\u0432\u0448", 2, 2, null! ), + new Among ( "\u044B\u0432\u0448", 2, 2, null! ), + new Among ( "\u0449", -1, 1, null! ), + new Among ( "\u044E\u0449", 5, 1, null! ), + new Among ( "\u0443\u044E\u0449", 6, 2, null! ) }; private readonly static Among[] a_3 = { - new Among ( "\u0441\u044C", -1, 1, null ), - new Among ( "\u0441\u044F", -1, 1, null ) + new Among ( "\u0441\u044C", -1, 1, null! ), + new Among ( "\u0441\u044F", -1, 1, null! ) }; private readonly static Among[] a_4 = { - new Among ( "\u043B\u0430", -1, 1, null ), - new Among ( "\u0438\u043B\u0430", 0, 2, null ), - new Among ( "\u044B\u043B\u0430", 0, 2, null ), - new Among ( "\u043D\u0430", -1, 1, null ), - new Among ( "\u0435\u043D\u0430", 3, 2, null ), - new Among ( "\u0435\u0442\u0435", -1, 1, null ), - new Among ( "\u0438\u0442\u0435", -1, 2, null ), - new Among ( "\u0439\u0442\u0435", -1, 1, null ), - new Among ( "\u0435\u0439\u0442\u0435", 7, 2, null ), - new Among ( "\u0443\u0439\u0442\u0435", 7, 2, null ), - new Among ( "\u043B\u0438", -1, 1, null ), - new Among ( "\u0438\u043B\u0438", 10, 2, null ), - new Among ( "\u044B\u043B\u0438", 10, 2, null ), - new Among ( "\u0439", -1, 1, null ), - new Among ( "\u0435\u0439", 13, 2, null ), - new Among ( "\u0443\u0439", 13, 2, null ), - new Among ( "\u043B", -1, 1, null ), - new Among ( "\u0438\u043B", 16, 2, null ), - new Among ( "\u044B\u043B", 16, 2, null ), - new Among ( "\u0435\u043C", -1, 1, null ), - new Among ( "\u0438\u043C", -1, 2, null ), - new Among ( "\u044B\u043C", -1, 2, null ), - new Among ( "\u043D", -1, 1, null ), - new Among ( "\u0435\u043D", 22, 2, null ), - new Among ( "\u043B\u043E", -1, 1, null ), - new Among ( "\u0438\u043B\u043E", 24, 2, null ), - new Among ( "\u044B\u043B\u043E", 24, 2, null ), - new Among ( "\u043D\u043E", -1, 1, null ), - new Among ( "\u0435\u043D\u043E", 27, 2, null ), - new Among ( "\u043D\u043D\u043E", 27, 1, null ), - new Among ( "\u0435\u0442", -1, 1, null ), - new Among ( "\u0443\u0435\u0442", 30, 2, null ), - new Among ( "\u0438\u0442", -1, 2, null ), - new Among ( "\u044B\u0442", -1, 2, null ), - new Among ( "\u044E\u0442", -1, 1, null ), - new Among ( "\u0443\u044E\u0442", 34, 2, null ), - new Among ( "\u044F\u0442", -1, 2, null ), - new Among ( "\u043D\u044B", -1, 1, null ), - new Among ( "\u0435\u043D\u044B", 37, 2, null ), - new Among ( "\u0442\u044C", -1, 1, null ), - new Among ( "\u0438\u0442\u044C", 39, 2, null ), - new Among ( "\u044B\u0442\u044C", 39, 2, null ), - new Among ( "\u0435\u0448\u044C", -1, 1, null ), - new Among ( "\u0438\u0448\u044C", -1, 2, null ), - new Among ( "\u044E", -1, 2, null ), - new Among ( "\u0443\u044E", 44, 2, null ) + new Among ( "\u043B\u0430", -1, 1, null! ), + new Among ( "\u0438\u043B\u0430", 0, 2, null! ), + new Among ( "\u044B\u043B\u0430", 0, 2, null! ), + new Among ( "\u043D\u0430", -1, 1, null! ), + new Among ( "\u0435\u043D\u0430", 3, 2, null! ), + new Among ( "\u0435\u0442\u0435", -1, 1, null! ), + new Among ( "\u0438\u0442\u0435", -1, 2, null! ), + new Among ( "\u0439\u0442\u0435", -1, 1, null! ), + new Among ( "\u0435\u0439\u0442\u0435", 7, 2, null! ), + new Among ( "\u0443\u0439\u0442\u0435", 7, 2, null! ), + new Among ( "\u043B\u0438", -1, 1, null! ), + new Among ( "\u0438\u043B\u0438", 10, 2, null! ), + new Among ( "\u044B\u043B\u0438", 10, 2, null! ), + new Among ( "\u0439", -1, 1, null! ), + new Among ( "\u0435\u0439", 13, 2, null! ), + new Among ( "\u0443\u0439", 13, 2, null! ), + new Among ( "\u043B", -1, 1, null! ), + new Among ( "\u0438\u043B", 16, 2, null! ), + new Among ( "\u044B\u043B", 16, 2, null! ), + new Among ( "\u0435\u043C", -1, 1, null! ), + new Among ( "\u0438\u043C", -1, 2, null! ), + new Among ( "\u044B\u043C", -1, 2, null! ), + new Among ( "\u043D", -1, 1, null! ), + new Among ( "\u0435\u043D", 22, 2, null! ), + new Among ( "\u043B\u043E", -1, 1, null! ), + new Among ( "\u0438\u043B\u043E", 24, 2, null! ), + new Among ( "\u044B\u043B\u043E", 24, 2, null! ), + new Among ( "\u043D\u043E", -1, 1, null! ), + new Among ( "\u0435\u043D\u043E", 27, 2, null! ), + new Among ( "\u043D\u043D\u043E", 27, 1, null! ), + new Among ( "\u0435\u0442", -1, 1, null! ), + new Among ( "\u0443\u0435\u0442", 30, 2, null! ), + new Among ( "\u0438\u0442", -1, 2, null! ), + new Among ( "\u044B\u0442", -1, 2, null! ), + new Among ( "\u044E\u0442", -1, 1, null! ), + new Among ( "\u0443\u044E\u0442", 34, 2, null! ), + new Among ( "\u044F\u0442", -1, 2, null! ), + new Among ( "\u043D\u044B", -1, 1, null! ), + new Among ( "\u0435\u043D\u044B", 37, 2, null! ), + new Among ( "\u0442\u044C", -1, 1, null! ), + new Among ( "\u0438\u0442\u044C", 39, 2, null! ), + new Among ( "\u044B\u0442\u044C", 39, 2, null! ), + new Among ( "\u0435\u0448\u044C", -1, 1, null! ), + new Among ( "\u0438\u0448\u044C", -1, 2, null! ), + new Among ( "\u044E", -1, 2, null! ), + new Among ( "\u0443\u044E", 44, 2, null! ) }; private readonly static Among[] a_5 = { - new Among ( "\u0430", -1, 1, null ), - new Among ( "\u0435\u0432", -1, 1, null ), - new Among ( "\u043E\u0432", -1, 1, null ), - new Among ( "\u0435", -1, 1, null ), - new Among ( "\u0438\u0435", 3, 1, null ), - new Among ( "\u044C\u0435", 3, 1, null ), - new Among ( "\u0438", -1, 1, null ), - new Among ( "\u0435\u0438", 6, 1, null ), - new Among ( "\u0438\u0438", 6, 1, null ), - new Among ( "\u0430\u043C\u0438", 6, 1, null ), - new Among ( "\u044F\u043C\u0438", 6, 1, null ), - new Among ( "\u0438\u044F\u043C\u0438", 10, 1, null ), - new Among ( "\u0439", -1, 1, null ), - new Among ( "\u0435\u0439", 12, 1, null ), - new Among ( "\u0438\u0435\u0439", 13, 1, null ), - new Among ( "\u0438\u0439", 12, 1, null ), - new Among ( "\u043E\u0439", 12, 1, null ), - new Among ( "\u0430\u043C", -1, 1, null ), - new Among ( "\u0435\u043C", -1, 1, null ), - new Among ( "\u0438\u0435\u043C", 18, 1, null ), - new Among ( "\u043E\u043C", -1, 1, null ), - new Among ( "\u044F\u043C", -1, 1, null ), - new Among ( "\u0438\u044F\u043C", 21, 1, null ), - new Among ( "\u043E", -1, 1, null ), - new Among ( "\u0443", -1, 1, null ), - new Among ( "\u0430\u0445", -1, 1, null ), - new Among ( "\u044F\u0445", -1, 1, null ), - new Among ( "\u0438\u044F\u0445", 26, 1, null ), - new Among ( "\u044B", -1, 1, null ), - new Among ( "\u044C", -1, 1, null ), - new Among ( "\u044E", -1, 1, null ), - new Among ( "\u0438\u044E", 30, 1, null ), - new Among ( "\u044C\u044E", 30, 1, null ), - new Among ( "\u044F", -1, 1, null ), - new Among ( "\u0438\u044F", 33, 1, null ), - new Among ( "\u044C\u044F", 33, 1, null ) + new Among ( "\u0430", -1, 1, null! ), + new Among ( "\u0435\u0432", -1, 1, null! ), + new Among ( "\u043E\u0432", -1, 1, null! ), + new Among ( "\u0435", -1, 1, null! ), + new Among ( "\u0438\u0435", 3, 1, null! ), + new Among ( "\u044C\u0435", 3, 1, null! ), + new Among ( "\u0438", -1, 1, null! ), + new Among ( "\u0435\u0438", 6, 1, null! ), + new Among ( "\u0438\u0438", 6, 1, null! ), + new Among ( "\u0430\u043C\u0438", 6, 1, null! ), + new Among ( "\u044F\u043C\u0438", 6, 1, null! ), + new Among ( "\u0438\u044F\u043C\u0438", 10, 1, null! ), + new Among ( "\u0439", -1, 1, null! ), + new Among ( "\u0435\u0439", 12, 1, null! ), + new Among ( "\u0438\u0435\u0439", 13, 1, null! ), + new Among ( "\u0438\u0439", 12, 1, null! ), + new Among ( "\u043E\u0439", 12, 1, null! ), + new Among ( "\u0430\u043C", -1, 1, null! ), + new Among ( "\u0435\u043C", -1, 1, null! ), + new Among ( "\u0438\u0435\u043C", 18, 1, null! ), + new Among ( "\u043E\u043C", -1, 1, null! ), + new Among ( "\u044F\u043C", -1, 1, null! ), + new Among ( "\u0438\u044F\u043C", 21, 1, null! ), + new Among ( "\u043E", -1, 1, null! ), + new Among ( "\u0443", -1, 1, null! ), + new Among ( "\u0430\u0445", -1, 1, null! ), + new Among ( "\u044F\u0445", -1, 1, null! ), + new Among ( "\u0438\u044F\u0445", 26, 1, null! ), + new Among ( "\u044B", -1, 1, null! ), + new Among ( "\u044C", -1, 1, null! ), + new Among ( "\u044E", -1, 1, null! ), + new Among ( "\u0438\u044E", 30, 1, null! ), + new Among ( "\u044C\u044E", 30, 1, null! ), + new Among ( "\u044F", -1, 1, null! ), + new Among ( "\u0438\u044F", 33, 1, null! ), + new Among ( "\u044C\u044F", 33, 1, null! ) }; private readonly static Among[] a_6 = { - new Among ( "\u043E\u0441\u0442", -1, 1, null ), - new Among ( "\u043E\u0441\u0442\u044C", -1, 1, null ) + new Among ( "\u043E\u0441\u0442", -1, 1, null! ), + new Among ( "\u043E\u0441\u0442\u044C", -1, 1, null! ) }; private readonly static Among[] a_7 = { - new Among ( "\u0435\u0439\u0448\u0435", -1, 1, null ), - new Among ( "\u043D", -1, 2, null ), - new Among ( "\u0435\u0439\u0448", -1, 1, null ), - new Among ( "\u044C", -1, 3, null ) + new Among ( "\u0435\u0439\u0448\u0435", -1, 1, null! ), + new Among ( "\u043D", -1, 2, null! ), + new Among ( "\u0435\u0439\u0448", -1, 1, null! ), + new Among ( "\u044C", -1, 3, null! ) }; private static readonly char[] g_v = { (char)33, (char)65, (char)8, (char)232 }; diff --git a/ZeroLevel/Services/Semantic/Snowball/SpanishStemmer.cs b/ZeroLevel/Services/Semantic/Snowball/SpanishStemmer.cs index 073abb7..401c616 100644 --- a/ZeroLevel/Services/Semantic/Snowball/SpanishStemmer.cs +++ b/ZeroLevel/Services/Semantic/Snowball/SpanishStemmer.cs @@ -16,244 +16,244 @@ namespace Iveonik.Stemmers private readonly static Among[] a_0 = { - new Among ( "", -1, 6, null ), - new Among ( "\u00E1", 0, 1, null ), - new Among ( "\u00E9", 0, 2, null ), - new Among ( "\u00ED", 0, 3, null ), - new Among ( "\u00F3", 0, 4, null ), - new Among ( "\u00FA", 0, 5, null ) + new Among ( "", -1, 6, null! ), + new Among ( "\u00E1", 0, 1, null! ), + new Among ( "\u00E9", 0, 2, null! ), + new Among ( "\u00ED", 0, 3, null! ), + new Among ( "\u00F3", 0, 4, null! ), + new Among ( "\u00FA", 0, 5, null! ) }; private readonly static Among[] a_1 = { - new Among ( "la", -1, -1, null ), - new Among ( "sela", 0, -1, null ), - new Among ( "le", -1, -1, null ), - new Among ( "me", -1, -1, null ), - new Among ( "se", -1, -1, null ), - new Among ( "lo", -1, -1, null ), - new Among ( "selo", 5, -1, null ), - new Among ( "las", -1, -1, null ), - new Among ( "selas", 7, -1, null ), - new Among ( "les", -1, -1, null ), - new Among ( "los", -1, -1, null ), - new Among ( "selos", 10, -1, null ), - new Among ( "nos", -1, -1, null ) + new Among ( "la", -1, -1, null! ), + new Among ( "sela", 0, -1, null! ), + new Among ( "le", -1, -1, null! ), + new Among ( "me", -1, -1, null! ), + new Among ( "se", -1, -1, null! ), + new Among ( "lo", -1, -1, null! ), + new Among ( "selo", 5, -1, null! ), + new Among ( "las", -1, -1, null! ), + new Among ( "selas", 7, -1, null! ), + new Among ( "les", -1, -1, null! ), + new Among ( "los", -1, -1, null! ), + new Among ( "selos", 10, -1, null! ), + new Among ( "nos", -1, -1, null! ) }; private readonly static Among[] a_2 = { - new Among ( "ando", -1, 6, null ), - new Among ( "iendo", -1, 6, null ), - new Among ( "yendo", -1, 7, null ), - new Among ( "\u00E1ndo", -1, 2, null ), - new Among ( "i\u00E9ndo", -1, 1, null ), - new Among ( "ar", -1, 6, null ), - new Among ( "er", -1, 6, null ), - new Among ( "ir", -1, 6, null ), - new Among ( "\u00E1r", -1, 3, null ), - new Among ( "\u00E9r", -1, 4, null ), - new Among ( "\u00EDr", -1, 5, null ) + new Among ( "ando", -1, 6, null! ), + new Among ( "iendo", -1, 6, null! ), + new Among ( "yendo", -1, 7, null! ), + new Among ( "\u00E1ndo", -1, 2, null! ), + new Among ( "i\u00E9ndo", -1, 1, null! ), + new Among ( "ar", -1, 6, null! ), + new Among ( "er", -1, 6, null! ), + new Among ( "ir", -1, 6, null! ), + new Among ( "\u00E1r", -1, 3, null! ), + new Among ( "\u00E9r", -1, 4, null! ), + new Among ( "\u00EDr", -1, 5, null! ) }; private readonly static Among[] a_3 = { - new Among ( "ic", -1, -1, null ), - new Among ( "ad", -1, -1, null ), - new Among ( "os", -1, -1, null ), - new Among ( "iv", -1, 1, null ) + new Among ( "ic", -1, -1, null! ), + new Among ( "ad", -1, -1, null! ), + new Among ( "os", -1, -1, null! ), + new Among ( "iv", -1, 1, null! ) }; private readonly static Among[] a_4 = { - new Among ( "able", -1, 1, null ), - new Among ( "ible", -1, 1, null ), - new Among ( "ante", -1, 1, null ) + new Among ( "able", -1, 1, null! ), + new Among ( "ible", -1, 1, null! ), + new Among ( "ante", -1, 1, null! ) }; private readonly static Among[] a_5 = { - new Among ( "ic", -1, 1, null ), - new Among ( "abil", -1, 1, null ), - new Among ( "iv", -1, 1, null ) + new Among ( "ic", -1, 1, null! ), + new Among ( "abil", -1, 1, null! ), + new Among ( "iv", -1, 1, null! ) }; private readonly static Among[] a_6 = { - new Among ( "ica", -1, 1, null ), - new Among ( "ancia", -1, 2, null ), - new Among ( "encia", -1, 5, null ), - new Among ( "adora", -1, 2, null ), - new Among ( "osa", -1, 1, null ), - new Among ( "ista", -1, 1, null ), - new Among ( "iva", -1, 9, null ), - new Among ( "anza", -1, 1, null ), - new Among ( "log\u00EDa", -1, 3, null ), - new Among ( "idad", -1, 8, null ), - new Among ( "able", -1, 1, null ), - new Among ( "ible", -1, 1, null ), - new Among ( "ante", -1, 2, null ), - new Among ( "mente", -1, 7, null ), - new Among ( "amente", 13, 6, null ), - new Among ( "aci\u00F3n", -1, 2, null ), - new Among ( "uci\u00F3n", -1, 4, null ), - new Among ( "ico", -1, 1, null ), - new Among ( "ismo", -1, 1, null ), - new Among ( "oso", -1, 1, null ), - new Among ( "amiento", -1, 1, null ), - new Among ( "imiento", -1, 1, null ), - new Among ( "ivo", -1, 9, null ), - new Among ( "ador", -1, 2, null ), - new Among ( "icas", -1, 1, null ), - new Among ( "ancias", -1, 2, null ), - new Among ( "encias", -1, 5, null ), - new Among ( "adoras", -1, 2, null ), - new Among ( "osas", -1, 1, null ), - new Among ( "istas", -1, 1, null ), - new Among ( "ivas", -1, 9, null ), - new Among ( "anzas", -1, 1, null ), - new Among ( "log\u00EDas", -1, 3, null ), - new Among ( "idades", -1, 8, null ), - new Among ( "ables", -1, 1, null ), - new Among ( "ibles", -1, 1, null ), - new Among ( "aciones", -1, 2, null ), - new Among ( "uciones", -1, 4, null ), - new Among ( "adores", -1, 2, null ), - new Among ( "antes", -1, 2, null ), - new Among ( "icos", -1, 1, null ), - new Among ( "ismos", -1, 1, null ), - new Among ( "osos", -1, 1, null ), - new Among ( "amientos", -1, 1, null ), - new Among ( "imientos", -1, 1, null ), - new Among ( "ivos", -1, 9, null ) + new Among ( "ica", -1, 1, null! ), + new Among ( "ancia", -1, 2, null! ), + new Among ( "encia", -1, 5, null! ), + new Among ( "adora", -1, 2, null! ), + new Among ( "osa", -1, 1, null! ), + new Among ( "ista", -1, 1, null! ), + new Among ( "iva", -1, 9, null! ), + new Among ( "anza", -1, 1, null! ), + new Among ( "log\u00EDa", -1, 3, null! ), + new Among ( "idad", -1, 8, null! ), + new Among ( "able", -1, 1, null! ), + new Among ( "ible", -1, 1, null! ), + new Among ( "ante", -1, 2, null! ), + new Among ( "mente", -1, 7, null! ), + new Among ( "amente", 13, 6, null! ), + new Among ( "aci\u00F3n", -1, 2, null! ), + new Among ( "uci\u00F3n", -1, 4, null! ), + new Among ( "ico", -1, 1, null! ), + new Among ( "ismo", -1, 1, null! ), + new Among ( "oso", -1, 1, null! ), + new Among ( "amiento", -1, 1, null! ), + new Among ( "imiento", -1, 1, null! ), + new Among ( "ivo", -1, 9, null! ), + new Among ( "ador", -1, 2, null! ), + new Among ( "icas", -1, 1, null! ), + new Among ( "ancias", -1, 2, null! ), + new Among ( "encias", -1, 5, null! ), + new Among ( "adoras", -1, 2, null! ), + new Among ( "osas", -1, 1, null! ), + new Among ( "istas", -1, 1, null! ), + new Among ( "ivas", -1, 9, null! ), + new Among ( "anzas", -1, 1, null! ), + new Among ( "log\u00EDas", -1, 3, null! ), + new Among ( "idades", -1, 8, null! ), + new Among ( "ables", -1, 1, null! ), + new Among ( "ibles", -1, 1, null! ), + new Among ( "aciones", -1, 2, null! ), + new Among ( "uciones", -1, 4, null! ), + new Among ( "adores", -1, 2, null! ), + new Among ( "antes", -1, 2, null! ), + new Among ( "icos", -1, 1, null! ), + new Among ( "ismos", -1, 1, null! ), + new Among ( "osos", -1, 1, null! ), + new Among ( "amientos", -1, 1, null! ), + new Among ( "imientos", -1, 1, null! ), + new Among ( "ivos", -1, 9, null! ) }; private readonly static Among[] a_7 = { - new Among ( "ya", -1, 1, null ), - new Among ( "ye", -1, 1, null ), - new Among ( "yan", -1, 1, null ), - new Among ( "yen", -1, 1, null ), - new Among ( "yeron", -1, 1, null ), - new Among ( "yendo", -1, 1, null ), - new Among ( "yo", -1, 1, null ), - new Among ( "yas", -1, 1, null ), - new Among ( "yes", -1, 1, null ), - new Among ( "yais", -1, 1, null ), - new Among ( "yamos", -1, 1, null ), - new Among ( "y\u00F3", -1, 1, null ) + new Among ( "ya", -1, 1, null! ), + new Among ( "ye", -1, 1, null! ), + new Among ( "yan", -1, 1, null! ), + new Among ( "yen", -1, 1, null! ), + new Among ( "yeron", -1, 1, null! ), + new Among ( "yendo", -1, 1, null! ), + new Among ( "yo", -1, 1, null! ), + new Among ( "yas", -1, 1, null! ), + new Among ( "yes", -1, 1, null! ), + new Among ( "yais", -1, 1, null! ), + new Among ( "yamos", -1, 1, null! ), + new Among ( "y\u00F3", -1, 1, null! ) }; private readonly static Among[] a_8 = { - new Among ( "aba", -1, 2, null ), - new Among ( "ada", -1, 2, null ), - new Among ( "ida", -1, 2, null ), - new Among ( "ara", -1, 2, null ), - new Among ( "iera", -1, 2, null ), - new Among ( "\u00EDa", -1, 2, null ), - new Among ( "ar\u00EDa", 5, 2, null ), - new Among ( "er\u00EDa", 5, 2, null ), - new Among ( "ir\u00EDa", 5, 2, null ), - new Among ( "ad", -1, 2, null ), - new Among ( "ed", -1, 2, null ), - new Among ( "id", -1, 2, null ), - new Among ( "ase", -1, 2, null ), - new Among ( "iese", -1, 2, null ), - new Among ( "aste", -1, 2, null ), - new Among ( "iste", -1, 2, null ), - new Among ( "an", -1, 2, null ), - new Among ( "aban", 16, 2, null ), - new Among ( "aran", 16, 2, null ), - new Among ( "ieran", 16, 2, null ), - new Among ( "\u00EDan", 16, 2, null ), - new Among ( "ar\u00EDan", 20, 2, null ), - new Among ( "er\u00EDan", 20, 2, null ), - new Among ( "ir\u00EDan", 20, 2, null ), - new Among ( "en", -1, 1, null ), - new Among ( "asen", 24, 2, null ), - new Among ( "iesen", 24, 2, null ), - new Among ( "aron", -1, 2, null ), - new Among ( "ieron", -1, 2, null ), - new Among ( "ar\u00E1n", -1, 2, null ), - new Among ( "er\u00E1n", -1, 2, null ), - new Among ( "ir\u00E1n", -1, 2, null ), - new Among ( "ado", -1, 2, null ), - new Among ( "ido", -1, 2, null ), - new Among ( "ando", -1, 2, null ), - new Among ( "iendo", -1, 2, null ), - new Among ( "ar", -1, 2, null ), - new Among ( "er", -1, 2, null ), - new Among ( "ir", -1, 2, null ), - new Among ( "as", -1, 2, null ), - new Among ( "abas", 39, 2, null ), - new Among ( "adas", 39, 2, null ), - new Among ( "idas", 39, 2, null ), - new Among ( "aras", 39, 2, null ), - new Among ( "ieras", 39, 2, null ), - new Among ( "\u00EDas", 39, 2, null ), - new Among ( "ar\u00EDas", 45, 2, null ), - new Among ( "er\u00EDas", 45, 2, null ), - new Among ( "ir\u00EDas", 45, 2, null ), - new Among ( "es", -1, 1, null ), - new Among ( "ases", 49, 2, null ), - new Among ( "ieses", 49, 2, null ), - new Among ( "abais", -1, 2, null ), - new Among ( "arais", -1, 2, null ), - new Among ( "ierais", -1, 2, null ), - new Among ( "\u00EDais", -1, 2, null ), - new Among ( "ar\u00EDais", 55, 2, null ), - new Among ( "er\u00EDais", 55, 2, null ), - new Among ( "ir\u00EDais", 55, 2, null ), - new Among ( "aseis", -1, 2, null ), - new Among ( "ieseis", -1, 2, null ), - new Among ( "asteis", -1, 2, null ), - new Among ( "isteis", -1, 2, null ), - new Among ( "\u00E1is", -1, 2, null ), - new Among ( "\u00E9is", -1, 1, null ), - new Among ( "ar\u00E9is", 64, 2, null ), - new Among ( "er\u00E9is", 64, 2, null ), - new Among ( "ir\u00E9is", 64, 2, null ), - new Among ( "ados", -1, 2, null ), - new Among ( "idos", -1, 2, null ), - new Among ( "amos", -1, 2, null ), - new Among ( "\u00E1bamos", 70, 2, null ), - new Among ( "\u00E1ramos", 70, 2, null ), - new Among ( "i\u00E9ramos", 70, 2, null ), - new Among ( "\u00EDamos", 70, 2, null ), - new Among ( "ar\u00EDamos", 74, 2, null ), - new Among ( "er\u00EDamos", 74, 2, null ), - new Among ( "ir\u00EDamos", 74, 2, null ), - new Among ( "emos", -1, 1, null ), - new Among ( "aremos", 78, 2, null ), - new Among ( "eremos", 78, 2, null ), - new Among ( "iremos", 78, 2, null ), - new Among ( "\u00E1semos", 78, 2, null ), - new Among ( "i\u00E9semos", 78, 2, null ), - new Among ( "imos", -1, 2, null ), - new Among ( "ar\u00E1s", -1, 2, null ), - new Among ( "er\u00E1s", -1, 2, null ), - new Among ( "ir\u00E1s", -1, 2, null ), - new Among ( "\u00EDs", -1, 2, null ), - new Among ( "ar\u00E1", -1, 2, null ), - new Among ( "er\u00E1", -1, 2, null ), - new Among ( "ir\u00E1", -1, 2, null ), - new Among ( "ar\u00E9", -1, 2, null ), - new Among ( "er\u00E9", -1, 2, null ), - new Among ( "ir\u00E9", -1, 2, null ), - new Among ( "i\u00F3", -1, 2, null ) + new Among ( "aba", -1, 2, null! ), + new Among ( "ada", -1, 2, null! ), + new Among ( "ida", -1, 2, null! ), + new Among ( "ara", -1, 2, null! ), + new Among ( "iera", -1, 2, null! ), + new Among ( "\u00EDa", -1, 2, null! ), + new Among ( "ar\u00EDa", 5, 2, null! ), + new Among ( "er\u00EDa", 5, 2, null! ), + new Among ( "ir\u00EDa", 5, 2, null! ), + new Among ( "ad", -1, 2, null! ), + new Among ( "ed", -1, 2, null! ), + new Among ( "id", -1, 2, null! ), + new Among ( "ase", -1, 2, null! ), + new Among ( "iese", -1, 2, null! ), + new Among ( "aste", -1, 2, null! ), + new Among ( "iste", -1, 2, null! ), + new Among ( "an", -1, 2, null! ), + new Among ( "aban", 16, 2, null! ), + new Among ( "aran", 16, 2, null! ), + new Among ( "ieran", 16, 2, null! ), + new Among ( "\u00EDan", 16, 2, null! ), + new Among ( "ar\u00EDan", 20, 2, null! ), + new Among ( "er\u00EDan", 20, 2, null! ), + new Among ( "ir\u00EDan", 20, 2, null! ), + new Among ( "en", -1, 1, null! ), + new Among ( "asen", 24, 2, null! ), + new Among ( "iesen", 24, 2, null! ), + new Among ( "aron", -1, 2, null! ), + new Among ( "ieron", -1, 2, null! ), + new Among ( "ar\u00E1n", -1, 2, null! ), + new Among ( "er\u00E1n", -1, 2, null! ), + new Among ( "ir\u00E1n", -1, 2, null! ), + new Among ( "ado", -1, 2, null! ), + new Among ( "ido", -1, 2, null! ), + new Among ( "ando", -1, 2, null! ), + new Among ( "iendo", -1, 2, null! ), + new Among ( "ar", -1, 2, null! ), + new Among ( "er", -1, 2, null! ), + new Among ( "ir", -1, 2, null! ), + new Among ( "as", -1, 2, null! ), + new Among ( "abas", 39, 2, null! ), + new Among ( "adas", 39, 2, null! ), + new Among ( "idas", 39, 2, null! ), + new Among ( "aras", 39, 2, null! ), + new Among ( "ieras", 39, 2, null! ), + new Among ( "\u00EDas", 39, 2, null! ), + new Among ( "ar\u00EDas", 45, 2, null! ), + new Among ( "er\u00EDas", 45, 2, null! ), + new Among ( "ir\u00EDas", 45, 2, null! ), + new Among ( "es", -1, 1, null! ), + new Among ( "ases", 49, 2, null! ), + new Among ( "ieses", 49, 2, null! ), + new Among ( "abais", -1, 2, null! ), + new Among ( "arais", -1, 2, null! ), + new Among ( "ierais", -1, 2, null! ), + new Among ( "\u00EDais", -1, 2, null! ), + new Among ( "ar\u00EDais", 55, 2, null! ), + new Among ( "er\u00EDais", 55, 2, null! ), + new Among ( "ir\u00EDais", 55, 2, null! ), + new Among ( "aseis", -1, 2, null! ), + new Among ( "ieseis", -1, 2, null! ), + new Among ( "asteis", -1, 2, null! ), + new Among ( "isteis", -1, 2, null! ), + new Among ( "\u00E1is", -1, 2, null! ), + new Among ( "\u00E9is", -1, 1, null! ), + new Among ( "ar\u00E9is", 64, 2, null! ), + new Among ( "er\u00E9is", 64, 2, null! ), + new Among ( "ir\u00E9is", 64, 2, null! ), + new Among ( "ados", -1, 2, null! ), + new Among ( "idos", -1, 2, null! ), + new Among ( "amos", -1, 2, null! ), + new Among ( "\u00E1bamos", 70, 2, null! ), + new Among ( "\u00E1ramos", 70, 2, null! ), + new Among ( "i\u00E9ramos", 70, 2, null! ), + new Among ( "\u00EDamos", 70, 2, null! ), + new Among ( "ar\u00EDamos", 74, 2, null! ), + new Among ( "er\u00EDamos", 74, 2, null! ), + new Among ( "ir\u00EDamos", 74, 2, null! ), + new Among ( "emos", -1, 1, null! ), + new Among ( "aremos", 78, 2, null! ), + new Among ( "eremos", 78, 2, null! ), + new Among ( "iremos", 78, 2, null! ), + new Among ( "\u00E1semos", 78, 2, null! ), + new Among ( "i\u00E9semos", 78, 2, null! ), + new Among ( "imos", -1, 2, null! ), + new Among ( "ar\u00E1s", -1, 2, null! ), + new Among ( "er\u00E1s", -1, 2, null! ), + new Among ( "ir\u00E1s", -1, 2, null! ), + new Among ( "\u00EDs", -1, 2, null! ), + new Among ( "ar\u00E1", -1, 2, null! ), + new Among ( "er\u00E1", -1, 2, null! ), + new Among ( "ir\u00E1", -1, 2, null! ), + new Among ( "ar\u00E9", -1, 2, null! ), + new Among ( "er\u00E9", -1, 2, null! ), + new Among ( "ir\u00E9", -1, 2, null! ), + new Among ( "i\u00F3", -1, 2, null! ) }; private readonly static Among[] a_9 = { - new Among ( "a", -1, 1, null ), - new Among ( "e", -1, 2, null ), - new Among ( "o", -1, 1, null ), - new Among ( "os", -1, 1, null ), - new Among ( "\u00E1", -1, 1, null ), - new Among ( "\u00E9", -1, 2, null ), - new Among ( "\u00ED", -1, 1, null ), - new Among ( "\u00F3", -1, 1, null ) + new Among ( "a", -1, 1, null! ), + new Among ( "e", -1, 2, null! ), + new Among ( "o", -1, 1, null! ), + new Among ( "os", -1, 1, null! ), + new Among ( "\u00E1", -1, 1, null! ), + new Among ( "\u00E9", -1, 2, null! ), + new Among ( "\u00ED", -1, 1, null! ), + new Among ( "\u00F3", -1, 1, null! ) }; private static readonly char[] g_v = { (char)17, (char)65, (char)16, (char)0, (char)0, (char)0, (char)0, diff --git a/ZeroLevel/Services/Semantic/Snowball/StemmerOperations.cs b/ZeroLevel/Services/Semantic/Snowball/StemmerOperations.cs index 57396c692c515b8a858ea7060f7ac62061d090cd..8e52b0ee94f257896a67cdd5ecde6e5e209cb481 100644 GIT binary patch delta 35 ncmbQUly$*U)(z`i85JiV6c*lmz_m*h!km1-)ob&z=x^Tu0NW2m delta 31 lcmZ3mly%Nh)(z`iCm#|Pnw${rwVB7wK@`N(); } @@ -42,7 +42,7 @@ namespace ZeroLevel.Services.Semantic { writer.WriteBoolean(false); } - if (this.Children == null) + if (this.Children == null!) { writer.WriteInt32(0); } @@ -62,7 +62,7 @@ namespace ZeroLevel.Services.Semantic } else { - if (this.Children == null) + if (this.Children == null!) { this.Children = new Dictionary(); } @@ -72,7 +72,7 @@ namespace ZeroLevel.Services.Semantic } return Children[word[index]].Append(word, index + 1); } - return null; + return null!; } internal uint? GetKey(string word, int index) { @@ -81,7 +81,7 @@ namespace ZeroLevel.Services.Semantic if (word.Length == index + 1) return this.Children[word[index]].Value; return this.Children[word[index]].GetKey(word, index + 1); } - return null; + return null!; } internal void RebuildReverseIndex(TrieNode parent, char key, Dictionary index) @@ -92,7 +92,7 @@ namespace ZeroLevel.Services.Semantic { index.Add(this.Value.Value, this); } - if (this.Children != null) + if (this.Children != null!) { foreach (var child in this.Children) { @@ -104,8 +104,8 @@ namespace ZeroLevel.Services.Semantic internal void DestroyReverseIndex() { this.Parent = null!; - this.Key = null; - if (this.Children != null) + this.Key = null!; + if (this.Children != null!) { foreach (var child in this.Children) { @@ -154,7 +154,7 @@ namespace ZeroLevel.Services.Semantic { if (word.Length == 0) return; var node = _root.Append(word, 0); - if (node != null) + if (node != null!) { node.Value = (uint)Interlocked.Increment(ref _word_index); if (_use_reverse_index) @@ -166,8 +166,8 @@ namespace ZeroLevel.Services.Semantic public uint? Key(string word) { - if (word?.Length == 0) return null; - return _root.GetKey(word, 0); + if (word?.Length == 0) return null!; + return _root.GetKey(word!, 0); } public string Word(uint key) @@ -180,7 +180,7 @@ namespace ZeroLevel.Services.Semantic return new string(Backward(node).Reverse().ToArray()); } } - return null; + return null!; } private IEnumerable Backward(TrieNode node) @@ -191,7 +191,7 @@ namespace ZeroLevel.Services.Semantic { yield return node.Key!.Value; node = node.Parent; - } while (node.Parent != null); + } while (node.Parent != null!); } } @@ -220,7 +220,7 @@ namespace ZeroLevel.Services.Semantic { if (this._use_reverse_index) { - if (_reverse_index == null) + if (_reverse_index == null!) { _reverse_index = new Dictionary(); } @@ -230,7 +230,7 @@ namespace ZeroLevel.Services.Semantic private void DestroyReverseIndex() { - if (_reverse_index != null) + if (_reverse_index != null!) { _reverse_index.Clear(); _reverse_index = null!; diff --git a/ZeroLevel/Services/Serialization/MemoryStreamReader.cs b/ZeroLevel/Services/Serialization/MemoryStreamReader.cs index d5c90ea..634d429 100644 --- a/ZeroLevel/Services/Serialization/MemoryStreamReader.cs +++ b/ZeroLevel/Services/Serialization/MemoryStreamReader.cs @@ -33,28 +33,28 @@ namespace ZeroLevel.Services.Serialization public MemoryStreamReader(byte[] data) { - if (data == null) + if (data == null!) throw new ArgumentNullException(nameof(data)); _accessor = new StreamVewAccessor(new MemoryStream(data)); } public MemoryStreamReader(Stream stream) { - if (stream == null) + if (stream == null!) throw new ArgumentNullException(nameof(stream)); _accessor = new StreamVewAccessor(stream); } public MemoryStreamReader(MemoryStreamReader reader) { - if (reader == null) + if (reader == null!) throw new ArgumentNullException(nameof(reader)); _accessor = reader._accessor; } public MemoryStreamReader(IViewAccessor accessor) { - if (accessor == null) + if (accessor == null!) throw new ArgumentNullException(nameof(accessor)); _accessor = accessor; } @@ -172,7 +172,7 @@ namespace ZeroLevel.Services.Serialization public string ReadString() { var length = BitConverter.ToInt32(ReadBuffer(4), 0); - if (length == 0) return null; + if (length == 0) return null!; var buffer = ReadBuffer(length); return Encoding.UTF8.GetString(buffer); } @@ -211,7 +211,7 @@ namespace ZeroLevel.Services.Serialization { if (CheckOutOfRange(count)) { - buffer = null; + buffer = null!; return false; } try @@ -231,7 +231,7 @@ namespace ZeroLevel.Services.Serialization catch (Exception ex) { Log.SystemError(ex, $"[MemoryStreamReader.TryReadBuffer] Fault read {count} bytes"); - buffer = null; + buffer = null!; return false; } return true; @@ -244,7 +244,7 @@ namespace ZeroLevel.Services.Serialization public DateTime? ReadDateTime() { var is_null = ReadByte(); - if (is_null == 0) return null; + if (is_null == 0) return null!; var buffer = ReadBuffer(8); long deserialized = BitConverter.ToInt64(buffer, 0); return DateTime.FromBinary(deserialized); @@ -258,7 +258,7 @@ namespace ZeroLevel.Services.Serialization var addr = ReadBytes(); return new IPAddress(addr); } - return null; + return null!; } public IPEndPoint ReadIPEndpoint() @@ -270,7 +270,7 @@ namespace ZeroLevel.Services.Serialization var port = ReadInt32(); return new IPEndPoint(addr, port); } - return null; + return null!; } /// @@ -516,7 +516,7 @@ namespace ZeroLevel.Services.Serialization public T Read() where T : IBinarySerializable { byte type = ReadByte(); - if (type == 0) return default(T); + if (type == 0) return default(T)!; var item = (T)Activator.CreateInstance(); item.Deserialize(this); return item; @@ -529,7 +529,7 @@ namespace ZeroLevel.Services.Serialization b = buffer[0]; return true; } - b = default; + b = default!; return false; } @@ -539,7 +539,7 @@ namespace ZeroLevel.Services.Serialization { if (type == 0) { - item = default(T); + item = default(T)!; return true; } try @@ -554,14 +554,14 @@ namespace ZeroLevel.Services.Serialization Log.SystemError(ex, "[MemoryStreamReader.TryRead]"); } } - item = default; + item = default!; return false; } public T Read(object arg) where T : IBinarySerializable { byte type = ReadByte(); - if (type == 0) return default(T); + if (type == 0) return default(T)!; var item = (T)Activator.CreateInstance(typeof(T), arg); item.Deserialize(this); return item; @@ -602,7 +602,7 @@ namespace ZeroLevel.Services.Serialization { if (CheckOutOfRange(count)) { - buffer = null; + buffer = null!; return false; } try @@ -622,7 +622,7 @@ namespace ZeroLevel.Services.Serialization catch (Exception ex) { Log.SystemError(ex, $"[MemoryStreamReader.TryReadBufferAsync] Fault read {count} bytes"); - buffer = null; + buffer = null!; return false; } return true; @@ -737,7 +737,7 @@ namespace ZeroLevel.Services.Serialization public async Task ReadStringAsync() { var length = BitConverter.ToInt32(await ReadBufferAsync(4), 0); - if (length == 0) return null; + if (length == 0) return null!; var buffer = await ReadBufferAsync(length); return Encoding.UTF8.GetString(buffer); } @@ -758,7 +758,7 @@ namespace ZeroLevel.Services.Serialization public async Task ReadDateTimeAsync() { var is_null = ReadByte(); - if (is_null == 0) return null; + if (is_null == 0) return null!; var buffer = await ReadBufferAsync(8); long deserialized = BitConverter.ToInt64(buffer, 0); return DateTime.FromBinary(deserialized); @@ -771,7 +771,7 @@ namespace ZeroLevel.Services.Serialization var addr = await ReadBytesAsync(); return new IPAddress(addr); } - return null; + return null!; } public async Task ReadIPEndpointAsync() @@ -783,7 +783,7 @@ namespace ZeroLevel.Services.Serialization var port = await ReadInt32Async(); return new IPEndPoint(addr, port); } - return null; + return null!; } #region Extensions @@ -1002,7 +1002,7 @@ namespace ZeroLevel.Services.Serialization public async Task ReadAsync() where T : IAsyncBinarySerializable { byte type = await ReadByteAsync(); - if (type == 0) return default(T); + if (type == 0) return default(T)!; var item = (T)Activator.CreateInstance(); await item.DeserializeAsync(this); return item; @@ -1011,7 +1011,7 @@ namespace ZeroLevel.Services.Serialization public async Task ReadAsync(object arg) where T : IAsyncBinarySerializable { byte type = ReadByte(); - if (type == 0) return default(T); + if (type == 0) return default(T)!; var item = (T)Activator.CreateInstance(typeof(T), arg); await item.DeserializeAsync(this); return item; diff --git a/ZeroLevel/Services/Serialization/MemoryStreamWriter.cs b/ZeroLevel/Services/Serialization/MemoryStreamWriter.cs index 3b776d0..673c207 100644 --- a/ZeroLevel/Services/Serialization/MemoryStreamWriter.cs +++ b/ZeroLevel/Services/Serialization/MemoryStreamWriter.cs @@ -98,7 +98,7 @@ namespace ZeroLevel.Services.Serialization /// public void WriteBytes(byte[] val) { - if (val == null) + if (val == null!) { WriteInt32(0); } @@ -113,7 +113,7 @@ namespace ZeroLevel.Services.Serialization /// public void WriteString(string line) { - if (line == null) + if (line == null!) { WriteInt32(0); } @@ -131,7 +131,7 @@ namespace ZeroLevel.Services.Serialization /// public void WriteDateTime(DateTime? datetime) { - if (datetime == null) + if (datetime == null!) { WriteByte(0); } @@ -146,7 +146,7 @@ namespace ZeroLevel.Services.Serialization public void WriteIP(IPAddress ip) { - if (ip == null) + if (ip == null!) { WriteByte(0); } @@ -159,7 +159,7 @@ namespace ZeroLevel.Services.Serialization public void WriteIPEndpoint(IPEndPoint endpoint) { - if (endpoint == null) + if (endpoint == null!) { WriteByte(0); } @@ -235,7 +235,7 @@ namespace ZeroLevel.Services.Serialization where T : IBinarySerializable { WriteInt32(collection?.Count() ?? 0); - if (collection != null) + if (collection != null!) { foreach (var item in collection) { @@ -246,7 +246,7 @@ namespace ZeroLevel.Services.Serialization public void WriteCollection(IEnumerable collection, Action writeAction) { - if (collection != null) + if (collection != null!) { MockCount(); int count = 0; @@ -310,7 +310,7 @@ namespace ZeroLevel.Services.Serialization public void WriteArray(T[] array) where T : IBinarySerializable { - if (array != null) + if (array != null!) { WriteInt32(array.Length); for (int i = 0; i < array.Length; i++) @@ -326,7 +326,7 @@ namespace ZeroLevel.Services.Serialization public void WriteArray(T[] array, Action writeAction) { - if (array != null) + if (array != null!) { WriteInt32(array.Length); for (int i = 0; i < array.Length; i++) @@ -390,7 +390,7 @@ namespace ZeroLevel.Services.Serialization public void Write(T item) where T : IBinarySerializable { - if (item != null) + if (item != null!) { WriteByte(1); item.Serialize(this); @@ -404,7 +404,7 @@ namespace ZeroLevel.Services.Serialization public void WriteDictionary(IDictionary collection) { WriteInt32(collection?.Count() ?? 0); - if (collection != null) + if (collection != null!) { foreach (var item in collection) { @@ -417,7 +417,7 @@ namespace ZeroLevel.Services.Serialization public void WriteDictionary(ConcurrentDictionary collection) { WriteInt32(collection?.Count() ?? 0); - if (collection != null) + if (collection != null!) { foreach (var item in collection) { @@ -455,7 +455,7 @@ namespace ZeroLevel.Services.Serialization /// public async Task WriteBytesAsync(byte[] val) { - if (val == null) + if (val == null!) { await WriteInt32Async(0); } @@ -468,7 +468,7 @@ namespace ZeroLevel.Services.Serialization public async Task WriteRawBytesAsyncNoLength(byte[] val) { - if (val == null) + if (val == null!) { throw new ArgumentNullException(nameof(val)); } @@ -503,7 +503,7 @@ namespace ZeroLevel.Services.Serialization /// public async Task WriteStringAsync(string line) { - if (line == null) + if (line == null!) { await WriteInt32Async(0); } @@ -521,7 +521,7 @@ namespace ZeroLevel.Services.Serialization /// public async Task WriteDateTimeAsync(DateTime? datetime) { - if (datetime == null) + if (datetime == null!) { WriteByte(0); } @@ -536,7 +536,7 @@ namespace ZeroLevel.Services.Serialization public async Task WriteIPAsync(IPAddress ip) { - if (ip == null) + if (ip == null!) { WriteByte(0); } @@ -549,7 +549,7 @@ namespace ZeroLevel.Services.Serialization public async Task WriteIPEndpointAsync(IPEndPoint endpoint) { - if (endpoint == null) + if (endpoint == null!) { WriteByte(0); } @@ -626,7 +626,7 @@ namespace ZeroLevel.Services.Serialization /// private async Task OptimizedWriteCollectionByChunksAsync(IEnumerable collection, Action saveAction, Func asyncSaveAction, int chunk_size) { - if (collection != null) + if (collection != null!) { if (_stream.CanSeek == false) { @@ -679,7 +679,7 @@ namespace ZeroLevel.Services.Serialization public async Task WriteCollectionAsync(IEnumerable collection) where T : IAsyncBinarySerializable { - if (collection != null) + if (collection != null!) { MockCount(); int count = 0; @@ -698,11 +698,11 @@ namespace ZeroLevel.Services.Serialization public async Task WriteCollectionAsync(IEnumerable collection) { - if (collection != null) + if (collection != null!) { MockCount(); int count = 0; - if (collection != null) + if (collection != null!) { foreach (var item in collection) { @@ -748,7 +748,7 @@ namespace ZeroLevel.Services.Serialization public async Task WriteCollectionAsync(IEnumerable collection) { - if (collection != null) + if (collection != null!) { if (_stream.CanSeek == false) { @@ -803,7 +803,7 @@ namespace ZeroLevel.Services.Serialization public async Task WriteCollectionAsync(IEnumerable collection) { - if (collection != null) + if (collection != null!) { if (_stream.CanSeek == false) { @@ -857,7 +857,7 @@ namespace ZeroLevel.Services.Serialization public async Task WriteCollectionAsync(IEnumerable collection) { - if (collection != null) + if (collection != null!) { if (_stream.CanSeek == false) { @@ -909,7 +909,7 @@ namespace ZeroLevel.Services.Serialization /// private async Task OptimizedWriteArrayByChunksAsync(T[] array, Action saveAction, int chunk_size) { - if (array != null) + if (array != null!) { WriteInt32(array.Length); @@ -948,7 +948,7 @@ namespace ZeroLevel.Services.Serialization public async Task WriteArrayAsync(T[] array) where T : IAsyncBinarySerializable { - if (array != null) + if (array != null!) { await WriteInt32Async(array.Length); for (int i = 0; i < array.Length; i++) @@ -964,7 +964,7 @@ namespace ZeroLevel.Services.Serialization public async Task WriteArrayAsync(string[] array) { - if (array != null) + if (array != null!) { if (_stream is MemoryStream) { @@ -1019,7 +1019,7 @@ namespace ZeroLevel.Services.Serialization public async Task WriteArrayAsync(bool[] array) { - if (array != null) + if (array != null!) { WriteInt32(array.Length); @@ -1058,7 +1058,7 @@ namespace ZeroLevel.Services.Serialization public async Task WriteArrayAsync(byte[] array) { - if (array != null) + if (array != null!) { WriteInt32(array.Length); @@ -1097,7 +1097,7 @@ namespace ZeroLevel.Services.Serialization public async Task WriteArrayAsync(byte[][] array) { - if (array != null) + if (array != null!) { WriteInt32(array.Length); if (_stream is MemoryStream) @@ -1135,7 +1135,7 @@ namespace ZeroLevel.Services.Serialization public async Task WriteAsync(T item) where T : IAsyncBinarySerializable { - if (item != null) + if (item != null!) { WriteByte(1); await item.SerializeAsync(this); @@ -1148,7 +1148,7 @@ namespace ZeroLevel.Services.Serialization public async Task WriteDictionaryAsync(IDictionary collection) { - if (collection != null) + if (collection != null!) { WriteInt32(collection.Count); foreach (var item in collection) @@ -1165,7 +1165,7 @@ namespace ZeroLevel.Services.Serialization public async Task WriteDictionaryAsync(ConcurrentDictionary collection) { - if (collection != null) + if (collection != null!) { WriteInt32(collection.Count); foreach (var item in collection) diff --git a/ZeroLevel/Services/Serialization/MessageSerializer.cs b/ZeroLevel/Services/Serialization/MessageSerializer.cs index ca60f00..de23c24 100644 --- a/ZeroLevel/Services/Serialization/MessageSerializer.cs +++ b/ZeroLevel/Services/Serialization/MessageSerializer.cs @@ -11,7 +11,7 @@ namespace ZeroLevel.Services.Serialization public static byte[] Serialize(T obj) where T : IBinarySerializable { - if (obj == null) return null; + if (obj == null!) return null!; using (var writer = new MemoryStreamWriter()) { obj.Serialize(writer); @@ -22,7 +22,7 @@ namespace ZeroLevel.Services.Serialization public static byte[] Serialize(IEnumerable items) where T : IBinarySerializable { - if (items == null) return null; + if (items == null!) return null!; using (var writer = new MemoryStreamWriter()) { writer.WriteCollection(items); @@ -35,7 +35,7 @@ namespace ZeroLevel.Services.Serialization var t = typeof(T); if (t.IsAssignableTo(typeof(IBinarySerializable))) { - return (w, o) => ((IBinarySerializable)o).Serialize(w); + return (w, o) => (o as IBinarySerializable)?.Serialize(w); } return (w, o) => PrimitiveTypeSerializer.Serialize(w, o); } @@ -66,7 +66,7 @@ namespace ZeroLevel.Services.Serialization catch (Exception ex) { Log.SystemError(ex, $"[MessageSerializer.TryObjectDeserialize] Fault deserialize type {typeof(T).Name}"); - output = default; + output = default!; } return false; } @@ -81,7 +81,7 @@ namespace ZeroLevel.Services.Serialization catch (Exception ex) { Log.SystemError(ex, $"[MessageSerializer.TryPrimitiveTypeDeserialize] Fault deserialize type {typeof(T).Name}"); - output = default; + output = default!; } return false; } @@ -90,10 +90,10 @@ namespace ZeroLevel.Services.Serialization { if (null == obj) { - return null; + return null!; } var direct_seriazlizable = (obj as IBinarySerializable); - if (direct_seriazlizable != null) + if (direct_seriazlizable != null!) { using (var writer = new MemoryStreamWriter()) { @@ -111,7 +111,7 @@ namespace ZeroLevel.Services.Serialization public static void SerializeCompatible(this MemoryStreamWriter writer, object obj) { var direct_seriazlizable = (obj as IBinarySerializable); - if (direct_seriazlizable != null) + if (direct_seriazlizable != null!) { direct_seriazlizable.Serialize(writer); } @@ -125,10 +125,10 @@ namespace ZeroLevel.Services.Serialization { if (null == obj) { - return null; + return null!; } var direct_seriazlizable = (obj as IBinarySerializable); - if (direct_seriazlizable != null) + if (direct_seriazlizable != null!) { using (var writer = new MemoryStreamWriter()) { @@ -146,7 +146,7 @@ namespace ZeroLevel.Services.Serialization public static T Deserialize(byte[] data) where T : IBinarySerializable { - if (data == null || data.Length == 0) return default(T); + if (data == null || data.Length == 0) return default(T)!; using (var reader = new MemoryStreamReader(data)) { var result = Activator.CreateInstance(); @@ -157,7 +157,7 @@ namespace ZeroLevel.Services.Serialization public static object Deserialize(Type type, byte[] data) { - if (data == null || data.Length == 0) return null; + if (data == null || data.Length == 0) return null!; using (var reader = new MemoryStreamReader(data)) { var result = (IBinarySerializable)Activator.CreateInstance(type); @@ -169,7 +169,7 @@ namespace ZeroLevel.Services.Serialization public static List DeserializeCollection(byte[] data) where T : IBinarySerializable { - List collection = null; + List collection = null!; if (data != null && data.Length > 0) { using (var reader = new MemoryStreamReader(data)) @@ -313,7 +313,7 @@ namespace ZeroLevel.Services.Serialization public static void Serialize(Stream stream, T obj) where T : IBinarySerializable { - if (obj == null) return; + if (obj == null!) return; using (var writer = new MemoryStreamWriter(stream)) { obj.Serialize(writer); @@ -323,7 +323,7 @@ namespace ZeroLevel.Services.Serialization public static void Serialize(Stream stream, IEnumerable items) where T : IBinarySerializable { - if (items == null) return; + if (items == null!) return; using (var writer = new MemoryStreamWriter(stream)) { writer.WriteCollection(items); @@ -337,7 +337,7 @@ namespace ZeroLevel.Services.Serialization return; } var direct_seriazlizable = (obj as IBinarySerializable); - if (direct_seriazlizable != null) + if (direct_seriazlizable != null!) { using (var writer = new MemoryStreamWriter(stream)) { @@ -360,7 +360,7 @@ namespace ZeroLevel.Services.Serialization return; } var direct_seriazlizable = (obj as IBinarySerializable); - if (direct_seriazlizable != null) + if (direct_seriazlizable != null!) { using (var writer = new MemoryStreamWriter(stream)) { @@ -379,7 +379,7 @@ namespace ZeroLevel.Services.Serialization public static T Deserialize(Stream stream) where T : IBinarySerializable { - if (stream == null) return default(T); + if (stream == null!) return default(T)!; using (var reader = new MemoryStreamReader(stream)) { var result = Activator.CreateInstance(); @@ -390,7 +390,7 @@ namespace ZeroLevel.Services.Serialization public static object Deserialize(Type type, Stream stream) { - if (stream == null) return null; + if (stream == null!) return null!; using (var reader = new MemoryStreamReader(stream)) { var result = (IBinarySerializable)Activator.CreateInstance(type); @@ -402,8 +402,8 @@ namespace ZeroLevel.Services.Serialization public static List DeserializeCollection(Stream stream) where T : IBinarySerializable { - List collection = null; - if (stream != null) + List collection = null!; + if (stream != null!) { using (var reader = new MemoryStreamReader(stream)) { @@ -426,7 +426,7 @@ namespace ZeroLevel.Services.Serialization public static IEnumerable DeserializeCollectionLazy(Stream stream) where T : IBinarySerializable { - if (stream != null) + if (stream != null!) { using (var reader = new MemoryStreamReader(stream)) { @@ -446,12 +446,12 @@ namespace ZeroLevel.Services.Serialization public static T DeserializeCompatible(Stream stream) { - if (stream == null) return default(T); + if (stream == null!) return default(T)!; if (typeof(IBinarySerializable).IsAssignableFrom(typeof(T))) { using (var reader = new MemoryStreamReader(stream)) { - var direct = (IBinarySerializable)Activator.CreateInstance(); + var direct = (IBinarySerializable)Activator.CreateInstance()!; direct.Deserialize(reader); return (T)direct; } @@ -464,7 +464,7 @@ namespace ZeroLevel.Services.Serialization public static object DeserializeCompatible(Type type, Stream stream) { - if (stream == null) return null; + if (stream == null!) return null!; if (typeof(IBinarySerializable).IsAssignableFrom(type)) { using (var reader = new MemoryStreamReader(stream)) diff --git a/ZeroLevel/Services/Serialization/PrimitiveTypeSerializer.cs b/ZeroLevel/Services/Serialization/PrimitiveTypeSerializer.cs index 287bb5b..e2253fd 100644 --- a/ZeroLevel/Services/Serialization/PrimitiveTypeSerializer.cs +++ b/ZeroLevel/Services/Serialization/PrimitiveTypeSerializer.cs @@ -35,7 +35,7 @@ namespace ZeroLevel.Services.Serialization public void Write(IBinaryWriter writer, T value) { - Invoker.Invoke(writer, WriteId, new object[] { value }); + Invoker.Invoke(writer, WriteId, new object[] { value! }); } public void WriteObject(IBinaryWriter writer, object value) diff --git a/ZeroLevel/Services/Shedulling/DateTimeSheduller.cs b/ZeroLevel/Services/Shedulling/DateTimeSheduller.cs index 16c291b..ded79fe 100644 --- a/ZeroLevel/Services/Shedulling/DateTimeSheduller.cs +++ b/ZeroLevel/Services/Shedulling/DateTimeSheduller.cs @@ -7,7 +7,7 @@ namespace ZeroLevel.Services.Shedulling : IExpirationSheduller { private Timer _timer; - private ExpiredObject _head = null; + private ExpiredObject _head = null!; private readonly object _rw_lock = new object(); private volatile bool _stopped = false; @@ -23,7 +23,7 @@ namespace ZeroLevel.Services.Shedulling private void TimerCallbackHandler(object state) { // POP - ExpiredObject result = null; + ExpiredObject result = null!; lock (_rw_lock) { if (null != _head) @@ -39,7 +39,7 @@ namespace ZeroLevel.Services.Shedulling ResetTimer(); } } - if (result != null) + if (result != null!) { try { @@ -54,7 +54,7 @@ namespace ZeroLevel.Services.Shedulling internal long Push(ExpiredObject insert) { - if (insert == null) + if (insert == null!) throw new ArgumentNullException(nameof(insert)); lock (_rw_lock) { @@ -74,7 +74,7 @@ namespace ZeroLevel.Services.Shedulling cursor = _head; reset = true; } - ExpiredObject prev = null; + ExpiredObject prev = null!; do { if ((cursor.ExpirationDate - insert.ExpirationDate).Ticks > 0) @@ -94,11 +94,11 @@ namespace ZeroLevel.Services.Shedulling } prev = cursor; cursor = cursor.Next; - if (cursor == null) + if (cursor == null!) { prev.Next = insert; } - } while (cursor != null); + } while (cursor != null!); if (reset) { ResetTimer(); @@ -112,11 +112,11 @@ namespace ZeroLevel.Services.Shedulling { lock (_rw_lock) { - if (_head != null) + if (_head != null!) { ExpiredObject previous, current; FindTaskByKeyWithPreviousTask(key, out previous, out current); - if (current != null) + if (current != null!) { if (_head.Key == current.Key) { @@ -174,7 +174,7 @@ namespace ZeroLevel.Services.Shedulling lock (_rw_lock) { DisableTimer(); - _head = null; + _head = null!; } } @@ -186,13 +186,13 @@ namespace ZeroLevel.Services.Shedulling { if (_head.Key == key) { - previous = null; + previous = null!; current = _head; return; } var cursor = _head.Next; var prev = _head; - while (cursor != null) + while (cursor != null!) { if (cursor.Key == key) { @@ -203,8 +203,8 @@ namespace ZeroLevel.Services.Shedulling prev = cursor; cursor = cursor.Next; } - previous = null; - current = null; + previous = null!; + current = null!; return; } @@ -213,7 +213,7 @@ namespace ZeroLevel.Services.Shedulling private void ResetTimer() { - if (_timer != null) + if (_timer != null!) { if (null != _head && _stopped == false) { @@ -228,7 +228,7 @@ namespace ZeroLevel.Services.Shedulling lock (_rw_lock) { ResetTimer(); - _head = null; + _head = null!; } }, Next = _head @@ -266,13 +266,13 @@ namespace ZeroLevel.Services.Shedulling { if (disposing) { - if (_timer != null) + if (_timer != null!) { Clean(); if (null != _timer) { _timer.Dispose(); - _timer = null; + _timer = null!; } } } diff --git a/ZeroLevel/Services/Shedulling/ExpiredObject.cs b/ZeroLevel/Services/Shedulling/ExpiredObject.cs index b1533c3..7cc6802 100644 --- a/ZeroLevel/Services/Shedulling/ExpiredObject.cs +++ b/ZeroLevel/Services/Shedulling/ExpiredObject.cs @@ -31,7 +31,7 @@ namespace ZeroLevel.Services.Shedulling public ExpiredObject Reset(DateTime nextDate) { ExpirationDate = nextDate; - Next = null; + Next = null!; return this; } diff --git a/ZeroLevel/Services/Shedulling/ISheduller.cs b/ZeroLevel/Services/Shedulling/ISheduller.cs index b19c385..d1423c4 100644 --- a/ZeroLevel/Services/Shedulling/ISheduller.cs +++ b/ZeroLevel/Services/Shedulling/ISheduller.cs @@ -79,7 +79,7 @@ namespace ZeroLevel.Services.Shedulling long RemindEvery(TimeSpan first, TimeSpan next, Action callback, bool breakWherError = false); - long RemindWhile(TimeSpan period, Func callback, Action continueWith = null, + long RemindWhile(TimeSpan period, Func callback, Action continueWith = null!, bool breakWherError = false); #endregion Repitable behaviour diff --git a/ZeroLevel/Services/Shedulling/Sheduller.cs b/ZeroLevel/Services/Shedulling/Sheduller.cs index a82b22e..2b4bb34 100644 --- a/ZeroLevel/Services/Shedulling/Sheduller.cs +++ b/ZeroLevel/Services/Shedulling/Sheduller.cs @@ -31,11 +31,11 @@ namespace ZeroLevel { get { - if (__instanse == null) + if (__instanse == null!) { lock (_create_lock) { - if (__instanse == null) + if (__instanse == null!) { __instanse = Sheduller.Create(); } @@ -54,12 +54,12 @@ namespace ZeroLevel #region Sync default instance api - public static long RemindWhile(TimeSpan timespan, Func callback, Action continueWith = null) + public static long RemindWhile(TimeSpan timespan, Func callback, Action continueWith = null!) { return DefaultInstance.RemindWhile(timespan, callback, continueWith); } - public static long RemindWhile(TimeSpan timespan, Func callback, Action continueWith = null) + public static long RemindWhile(TimeSpan timespan, Func callback, Action continueWith = null!) { return DefaultInstance.RemindWhile(timespan, _ => callback(), continueWith); } diff --git a/ZeroLevel/Services/Shedulling/ShedullerImpl.cs b/ZeroLevel/Services/Shedulling/ShedullerImpl.cs index b8a30e5..04de86f 100644 --- a/ZeroLevel/Services/Shedulling/ShedullerImpl.cs +++ b/ZeroLevel/Services/Shedulling/ShedullerImpl.cs @@ -234,7 +234,7 @@ namespace ZeroLevel.Services.Shedulling public long RemindWhile(TimeSpan period, Func callback, - Action continueWith = null, + Action continueWith = null!, bool breakWherError = false) { var obj = new ExpiredObject { ExpirationDate = DateTime.Now.AddMilliseconds(period.TotalMilliseconds) }; @@ -255,7 +255,7 @@ namespace ZeroLevel.Services.Shedulling if (success) { Remove(obj.Key); - if (continueWith != null) + if (continueWith != null!) continueWith(); } else diff --git a/ZeroLevel/Services/Specification/Building/SpecificationConstructorParametersResolver.cs b/ZeroLevel/Services/Specification/Building/SpecificationConstructorParametersResolver.cs index 712dacc..0f8f168 100644 --- a/ZeroLevel/Services/Specification/Building/SpecificationConstructorParametersResolver.cs +++ b/ZeroLevel/Services/Specification/Building/SpecificationConstructorParametersResolver.cs @@ -21,7 +21,7 @@ namespace ZeroLevel.Contracts.Specification.Building { if (_enum.ContainsKey(name)) return _enum[name]; - return null; + return null!; } } @@ -99,7 +99,7 @@ namespace ZeroLevel.Contracts.Specification.Building return _enums[filterType][paramName].Names; } } - return null; + return null!; } public static ITree GetTree(Type filterType, string paramName) @@ -111,7 +111,7 @@ namespace ZeroLevel.Contracts.Specification.Building return _trees[filterType][paramName]; } } - return null; + return null!; } public static object GetEnumInstance(Type filterType, string paramName, string name) @@ -123,7 +123,7 @@ namespace ZeroLevel.Contracts.Specification.Building return _enums[filterType][paramName].GetInstance(name); } } - return null; + return null!; } } } \ No newline at end of file diff --git a/ZeroLevel/Services/Specification/CurrySpecification.cs b/ZeroLevel/Services/Specification/CurrySpecification.cs index 5e671f6..4eb4331 100644 --- a/ZeroLevel/Services/Specification/CurrySpecification.cs +++ b/ZeroLevel/Services/Specification/CurrySpecification.cs @@ -15,7 +15,7 @@ namespace ZeroLevel.Specification public override bool IsSatisfiedBy(T o) { - return _selector(o).Equals(_value); + return _selector(o)?.Equals(_value) ?? false; } } } \ No newline at end of file diff --git a/ZeroLevel/Services/Specification/ExpressionSpecification.cs b/ZeroLevel/Services/Specification/ExpressionSpecification.cs index 481eccb..c854f85 100644 --- a/ZeroLevel/Services/Specification/ExpressionSpecification.cs +++ b/ZeroLevel/Services/Specification/ExpressionSpecification.cs @@ -12,7 +12,7 @@ namespace ZeroLevel.Specification public ExpressionSpecification(Func expression) { - if (expression == null) + if (expression == null!) throw new ArgumentNullException(); else this._expression = expression; diff --git a/ZeroLevel/Services/Specification/PredicateBuilder.cs b/ZeroLevel/Services/Specification/PredicateBuilder.cs index 8d2a678..d5cca5f 100644 --- a/ZeroLevel/Services/Specification/PredicateBuilder.cs +++ b/ZeroLevel/Services/Specification/PredicateBuilder.cs @@ -33,10 +33,11 @@ namespace ZeroLevel.Specification /// public static Expression> CreateFromFunc(Func predicate) { + if (predicate == null) throw new ArgumentNullException(nameof(predicate)); var method = predicate.Method; var parameters = method.GetParameters().Select(p => Expression.Variable(p.ParameterType)).ToArray(); - var target = predicate?.Target; - var call = Expression.Call(predicate.Method.IsStatic ? null : Expression.New(target.GetType()), + var target = predicate.Target; + var call = Expression.Call(method.IsStatic ? null : Expression.New(target.GetType()), method, parameters); return Expression.Lambda>(call, parameters); diff --git a/ZeroLevel/Services/Specification/Services/SpecificationBuilder.cs b/ZeroLevel/Services/Specification/Services/SpecificationBuilder.cs index 08c2e91..ea8043d 100644 --- a/ZeroLevel/Services/Specification/Services/SpecificationBuilder.cs +++ b/ZeroLevel/Services/Specification/Services/SpecificationBuilder.cs @@ -74,7 +74,7 @@ namespace ZeroLevel.Specification } else { - parameters[i] = SpecificationConstructorParametersResolver.GetEnumInstance(_instanceType, _values[i].ParameterName, _values[i].Value as string); + parameters[i] = SpecificationConstructorParametersResolver.GetEnumInstance(_instanceType, _values[i].ParameterName, (_values[i].Value as string)!); } break; diff --git a/ZeroLevel/Services/Text/PlainTextTables/TextTableData.cs b/ZeroLevel/Services/Text/PlainTextTables/TextTableData.cs index 6821fa4..e46df72 100644 --- a/ZeroLevel/Services/Text/PlainTextTables/TextTableData.cs +++ b/ZeroLevel/Services/Text/PlainTextTables/TextTableData.cs @@ -96,7 +96,7 @@ namespace ZeroLevel.Services.PlainTextTables /// public void SetColumnsHeaders(string[] headers) { - if (headers == null) + if (headers == null!) { throw new ArgumentNullException(nameof(headers)); } @@ -116,7 +116,7 @@ namespace ZeroLevel.Services.PlainTextTables /// public void AppendRow(string[] cells) { - if (cells == null) + if (cells == null!) { throw new ArgumentNullException(nameof(cells)); } diff --git a/ZeroLevel/Services/Text/PlainTextTables/TextTableRender.cs b/ZeroLevel/Services/Text/PlainTextTables/TextTableRender.cs index d52fccf..d1af7b5 100644 --- a/ZeroLevel/Services/Text/PlainTextTables/TextTableRender.cs +++ b/ZeroLevel/Services/Text/PlainTextTables/TextTableRender.cs @@ -139,7 +139,7 @@ namespace ZeroLevel.Services.PlainTextTables /// private static IEnumerable Split(string str, int chunkSize, int leftPad, int rightPad) { - if (str == null) return new string[1] { string.Empty }; + if (str == null!) return new string[1] { string.Empty }; while ((chunkSize - (leftPad + rightPad)) < 5 && (leftPad > 0 || rightPad > 0)) { if (leftPad > 0) diff --git a/ZeroLevel/Services/Text/SuffixAutomata.cs b/ZeroLevel/Services/Text/SuffixAutomata.cs index 80fd5c8..c2157ae 100644 --- a/ZeroLevel/Services/Text/SuffixAutomata.cs +++ b/ZeroLevel/Services/Text/SuffixAutomata.cs @@ -97,7 +97,7 @@ namespace ZeroLevel.Services.Text var max = candidates.Max(s => s?.Length ?? 0); return candidates.FirstOrDefault(c => c != null && c.Length == max); } - return null; + return null!; /* int v = 0, l = 0, best = 0, bestpos = 0; for (int i = 0; i < (int)t.Length; ++i) @@ -122,7 +122,7 @@ namespace ZeroLevel.Services.Text var length = best; if (start >= 0 && start < t.Length && (start + length) <= t.Length) return t.Substring(start, length); - return null; + return null!; */ } @@ -153,7 +153,7 @@ namespace ZeroLevel.Services.Text var length = best; if (start >= 0 && start < t.Length && (start + length) <= t.Length) return t.Substring(start, length); - return null; + return null!; } } } diff --git a/ZeroLevel/Services/Trees/Tree.cs b/ZeroLevel/Services/Trees/Tree.cs index dfc8913..3963a54 100644 --- a/ZeroLevel/Services/Trees/Tree.cs +++ b/ZeroLevel/Services/Trees/Tree.cs @@ -12,7 +12,7 @@ namespace ZeroLevel.Services.Trees public Tree(ITree other) { - if (other == null) + if (other == null!) throw new ArgumentNullException(nameof(other)); this._rootNodes = other.RootNodes.Select(a => (ITreeNode)a.Clone()).ToList(); } diff --git a/ZeroLevel/Services/Trees/TreeNode.cs b/ZeroLevel/Services/Trees/TreeNode.cs index f6873ab..6e46877 100644 --- a/ZeroLevel/Services/Trees/TreeNode.cs +++ b/ZeroLevel/Services/Trees/TreeNode.cs @@ -20,7 +20,7 @@ namespace ZeroLevel.Services.Trees public TreeNode(TreeNode other) { - if (other == null) + if (other == null!) { throw new ArgumentNullException(nameof(other)); } diff --git a/ZeroLevel/Services/Trees/TreesVisitor.cs b/ZeroLevel/Services/Trees/TreesVisitor.cs index 5b5bf36..d1f63f0 100644 --- a/ZeroLevel/Services/Trees/TreesVisitor.cs +++ b/ZeroLevel/Services/Trees/TreesVisitor.cs @@ -15,9 +15,9 @@ namespace ZeroLevel.Services.Trees /// Array of tree branches public static List ExtractBranches(T root, Func> childrenExtractor) { - if (root == null) + if (root == null!) throw new ArgumentNullException(nameof(root)); - if (childrenExtractor == null) + if (childrenExtractor == null!) throw new ArgumentNullException(nameof(childrenExtractor)); var result = new List(); TraversTreeBrunches(root, childrenExtractor, brunch => @@ -40,11 +40,11 @@ namespace ZeroLevel.Services.Trees Func> childrenExtractor, Func codeExtractor) { - if (root == null) + if (root == null!) throw new ArgumentNullException(nameof(root)); - if (childrenExtractor == null) + if (childrenExtractor == null!) throw new ArgumentNullException(nameof(childrenExtractor)); - if (codeExtractor == null) + if (codeExtractor == null!) throw new ArgumentNullException(nameof(codeExtractor)); var result = new List(); TraversTreeBrunches(root, childrenExtractor, brunch => @@ -61,11 +61,11 @@ namespace ZeroLevel.Services.Trees Func> childrenExtractor, Action> handler) { - if (root == null) + if (root == null!) throw new ArgumentNullException(nameof(root)); - if (childrenExtractor == null) + if (childrenExtractor == null!) throw new ArgumentNullException(nameof(childrenExtractor)); - if (handler == null) + if (handler == null!) throw new ArgumentNullException(nameof(handler)); var brunch = new List(); brunch.Add(root); @@ -77,7 +77,7 @@ namespace ZeroLevel.Services.Trees private static void TraversNode(T node, List brunch, Func> childrenExtractor, Action> handler) { - if (node == null) + if (node == null!) { handler(brunch); return; diff --git a/ZeroLevel/Services/Utils/Multiprocessor.cs b/ZeroLevel/Services/Utils/Multiprocessor.cs index cb769b2..81d0f7f 100644 --- a/ZeroLevel/Services/Utils/Multiprocessor.cs +++ b/ZeroLevel/Services/Utils/Multiprocessor.cs @@ -81,7 +81,7 @@ namespace ZeroLevel.Utils { _is_disposed = true; _queue.Dispose(); - _threads = null; + _threads = null!; } } } diff --git a/ZeroLevel/Services/Web/HtmlUtility.cs b/ZeroLevel/Services/Web/HtmlUtility.cs index 5c5318f..cd66971 100644 --- a/ZeroLevel/Services/Web/HtmlUtility.cs +++ b/ZeroLevel/Services/Web/HtmlUtility.cs @@ -12,7 +12,7 @@ namespace ZeroLevel.Services.Web { public readonly char Value; public readonly SymToken Preview; - private SymToken _lazyNext = null; + private SymToken _lazyNext = null!; private readonly int _index; private readonly string _line; @@ -22,11 +22,11 @@ namespace ZeroLevel.Services.Web { if (_line.Length == 0 || _index == _line.Length - 1) { - return null; + return null!; } else { - if (_lazyNext == null) + if (_lazyNext == null!) { _lazyNext = new SymToken(_line, _index + 1, this); } @@ -70,11 +70,11 @@ namespace ZeroLevel.Services.Web { if (false == string.IsNullOrEmpty(line)) { - Token = new SymToken(line, 0, null); + Token = new SymToken(line, 0, null!); } else { - Token = null; + Token = null!; } } @@ -82,7 +82,7 @@ namespace ZeroLevel.Services.Web { get { - if (Token.Preview != null) + if (Token.Preview != null!) { return Token.Preview.Value; } @@ -94,7 +94,7 @@ namespace ZeroLevel.Services.Web { get { - if (Token != null) + if (Token != null!) { return Token.Value; } @@ -106,7 +106,7 @@ namespace ZeroLevel.Services.Web { get { - if (Token.Next != null) + if (Token.Next != null!) { return Token.Next.Value; } @@ -130,7 +130,7 @@ namespace ZeroLevel.Services.Web public bool MoveNext() { - if (Token != null) + if (Token != null!) { Token = Token.Next; return true; @@ -142,7 +142,7 @@ namespace ZeroLevel.Services.Web { get { - return Token == null; + return Token == null!; } } } diff --git a/ZeroLevel/Services/Web/UrlBuilder.cs b/ZeroLevel/Services/Web/UrlBuilder.cs index 1bc9e0a..8191a38 100644 --- a/ZeroLevel/Services/Web/UrlBuilder.cs +++ b/ZeroLevel/Services/Web/UrlBuilder.cs @@ -65,7 +65,7 @@ namespace ZeroLevel.Services.Web stringBuilder.Append("?"); foreach (var pair in parameters) { - if (pair.Value == null) + if (pair.Value == null!) { stringBuilder.Append(pair.Value); } diff --git a/ZeroLevel/Services/Web/UrlUtility.cs b/ZeroLevel/Services/Web/UrlUtility.cs index 4cf18cc..70f1697 100644 --- a/ZeroLevel/Services/Web/UrlUtility.cs +++ b/ZeroLevel/Services/Web/UrlUtility.cs @@ -15,11 +15,11 @@ namespace ZeroLevel.Services.Web public static IDictionary ParseQueryString(string query, Encoding encoding) { - if (query == null) + if (query == null!) { - return null; + return null!; } - if (encoding == null) + if (encoding == null!) { encoding = Encoding.Default; } @@ -32,15 +32,15 @@ namespace ZeroLevel.Services.Web public static string UrlEncode(string str) { - return str == null ? null : UrlEncode(str, Encoding.UTF8); + return (str == null ? null : UrlEncode(str, Encoding.UTF8))!; } // URL encodes a path portion of a URL string and returns the encoded string. public static string UrlPathEncode(string str) { - if (str == null) + if (str == null!) { - return null; + return null!; } // recurse in case there is a query string var i = str.IndexOf('?'); @@ -54,12 +54,12 @@ namespace ZeroLevel.Services.Web public static string UrlEncode(string str, Encoding encoding) { - return str == null ? null : Encoding.ASCII.GetString(UrlEncodeToBytes(str, encoding)); + return (str == null ? null : Encoding.ASCII.GetString(UrlEncodeToBytes(str, encoding)))!; } public static string UrlEncodeUnicode(string str) { - return str == null ? null : UrlEncodeUnicodeStringToStringInternal(str, false); + return (str == null ? null : UrlEncodeUnicodeStringToStringInternal(str, false))!; } /// @@ -67,7 +67,7 @@ namespace ZeroLevel.Services.Web /// public static string Combine(params string[] parts) { - if (parts == null) + if (parts == null!) throw new ArgumentNullException(nameof(parts)); string result = ""; @@ -179,7 +179,7 @@ namespace ZeroLevel.Services.Web { return str; } - if (e == null) + if (e == null!) { e = Encoding.UTF8; } @@ -195,14 +195,14 @@ namespace ZeroLevel.Services.Web { str = str.Replace(" ", "%20"); } - return str; + return str!; } public static byte[] UrlEncodeToBytes(string str, Encoding e) { - if (str == null) + if (str == null!) { - return null; + return null!; } var bytes = e.GetBytes(str); return UrlEncodeBytesToBytesInternal(bytes, 0, bytes.Length, false); @@ -210,7 +210,7 @@ namespace ZeroLevel.Services.Web public static string UrlDecode(string str, Encoding e) { - return str == null ? null : UrlDecodeStringFromStringInternal(str, e); + return (str == null ? null : UrlDecodeStringFromStringInternal(str, e))!; } // Implementation for encoding @@ -452,7 +452,7 @@ namespace ZeroLevel.Services.Web internal void AddByte(byte b) { - if (_byteBuffer == null) + if (_byteBuffer == null!) { _byteBuffer = new byte[_bufferSize]; } diff --git a/ZeroLevel/Services/Windows/WindowsLibraryLoader.cs b/ZeroLevel/Services/Windows/WindowsLibraryLoader.cs index 96b6f51..b1525ce 100644 --- a/ZeroLevel/Services/Windows/WindowsLibraryLoader.cs +++ b/ZeroLevel/Services/Windows/WindowsLibraryLoader.cs @@ -118,7 +118,7 @@ namespace ZeroLevel.Services.Windows private string GetPlatformName(string processorArchitecture) { if (String.IsNullOrEmpty(processorArchitecture)) - return null; + return null!; string platformName; if (this._ProcessorArchitecturePlatforms.TryGetValue(processorArchitecture, out platformName)) @@ -126,7 +126,7 @@ namespace ZeroLevel.Services.Windows return platformName; } - return null; + return null!; } public void LoadLibraries(IEnumerable dlls) diff --git a/ZeroLevel/ZeroLevel.csproj b/ZeroLevel/ZeroLevel.csproj index a1106e8..ba44fd7 100644 --- a/ZeroLevel/ZeroLevel.csproj +++ b/ZeroLevel/ZeroLevel.csproj @@ -7,15 +7,15 @@ lz.ico True ZeroLevel - 4.0.0.0 + $(AssemblyVersion) 4.0.0.0 - latest $(AssemblyVersion) + latest Ogoun Basic Toolkit. © ogoun https://github.com/ogoun/Zero - lz.ico + lz.png https://github.com/ogoun/Zero git @@ -37,6 +37,10 @@ True \ + + True + \ + diff --git a/ZeroLevel/lz.ico b/ZeroLevel/lz.ico deleted file mode 100644 index 5bed89690b3b2bcc827f18b3d48014067b1f0b7e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 82239 zcmXtA1yq%5)+VJ}=}u{+yQEY~3{tuTM3C+-X%GQv5fqWWl+xWu3({TEo&P@nT65>l znj6mXeBZm@y`S13AtA$m5Pu*ekt4CoAtRB(Uq@)FE8}5PV#8nJJyKE7Li}6Ae=+aC z{}{acW{HGEk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