diff --git a/Capnp.Net.Runtime/AnyPointer.cs b/Capnp.Net.Runtime/AnyPointer.cs index 80138b4..95ee638 100644 --- a/Capnp.Net.Runtime/AnyPointer.cs +++ b/Capnp.Net.Runtime/AnyPointer.cs @@ -1,5 +1,4 @@ -#nullable enable -namespace Capnp +namespace Capnp { /// /// Generic implementation, based on a wrapper around . @@ -29,5 +28,4 @@ namespace Capnp Reserializing.DeepCopy(State, state); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Capnp.Net.Runtime.csproj b/Capnp.Net.Runtime/Capnp.Net.Runtime.csproj index 82ca384..7aabace 100644 --- a/Capnp.Net.Runtime/Capnp.Net.Runtime.csproj +++ b/Capnp.Net.Runtime/Capnp.Net.Runtime.csproj @@ -4,6 +4,8 @@ netstandard2.0;netcoreapp2.1;netcoreapp3.0 Capnp 8.0 + Enable + CS8600;CS8602;CS8603 Capnp.Net.Runtime Capnp.Net.Runtime true diff --git a/Capnp.Net.Runtime/CapnpSerializable.cs b/Capnp.Net.Runtime/CapnpSerializable.cs index 1afa8d6..520e737 100644 --- a/Capnp.Net.Runtime/CapnpSerializable.cs +++ b/Capnp.Net.Runtime/CapnpSerializable.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Reflection; using System.Runtime.CompilerServices; -#nullable enable namespace Capnp { /// @@ -171,5 +170,4 @@ namespace Capnp return (T?)GetSerializer(typeof(T))(state); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/DeserializationException.cs b/Capnp.Net.Runtime/DeserializationException.cs index e2d8c31..6275002 100644 --- a/Capnp.Net.Runtime/DeserializationException.cs +++ b/Capnp.Net.Runtime/DeserializationException.cs @@ -1,6 +1,5 @@ using System; -#nullable enable namespace Capnp { /// @@ -23,5 +22,4 @@ namespace Capnp { } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/DeserializerState.cs b/Capnp.Net.Runtime/DeserializerState.cs index f879870..89cd0c4 100644 --- a/Capnp.Net.Runtime/DeserializerState.cs +++ b/Capnp.Net.Runtime/DeserializerState.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; -using System.Diagnostics; -#nullable enable namespace Capnp { /// @@ -695,8 +693,7 @@ namespace Capnp if (Caps == null) throw new InvalidOperationException("Capability table not set. This is a bug."); - return Rpc.CapabilityReflection.CreateProxy(Caps[(int)CapabilityIndex]) as T; + return (Rpc.CapabilityReflection.CreateProxy(Caps[(int)CapabilityIndex]) as T)!; } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/DynamicSerializerState.cs b/Capnp.Net.Runtime/DynamicSerializerState.cs index 5faa19d..2bf2be2 100644 --- a/Capnp.Net.Runtime/DynamicSerializerState.cs +++ b/Capnp.Net.Runtime/DynamicSerializerState.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; -#nullable enable namespace Capnp { /// @@ -226,5 +225,4 @@ namespace Capnp } } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/EmptyList.cs b/Capnp.Net.Runtime/EmptyList.cs index dbdba4e..0c1ebc6 100644 --- a/Capnp.Net.Runtime/EmptyList.cs +++ b/Capnp.Net.Runtime/EmptyList.cs @@ -3,7 +3,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -#nullable enable namespace Capnp { /// @@ -36,5 +35,4 @@ namespace Capnp return GetEnumerator(); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/EmptyListDeserializer.cs b/Capnp.Net.Runtime/EmptyListDeserializer.cs index d731892..76ee7d1 100644 --- a/Capnp.Net.Runtime/EmptyListDeserializer.cs +++ b/Capnp.Net.Runtime/EmptyListDeserializer.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; -#nullable enable namespace Capnp { /// @@ -86,5 +85,4 @@ namespace Capnp /// public override IReadOnlyList CastUShort() => new EmptyList(); } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/FramePump.cs b/Capnp.Net.Runtime/FramePump.cs index d92317f..0ff6791 100644 --- a/Capnp.Net.Runtime/FramePump.cs +++ b/Capnp.Net.Runtime/FramePump.cs @@ -2,14 +2,11 @@ using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; -using System.Net.Sockets; using System.Runtime.InteropServices; using System.Text; using System.Threading; -#nullable enable namespace Capnp { /// @@ -196,5 +193,4 @@ namespace Capnp _tracers.Add(tracer); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/FrameTracing/IFrameTracer.cs b/Capnp.Net.Runtime/FrameTracing/IFrameTracer.cs index 5172dfb..3255b29 100644 --- a/Capnp.Net.Runtime/FrameTracing/IFrameTracer.cs +++ b/Capnp.Net.Runtime/FrameTracing/IFrameTracer.cs @@ -1,6 +1,5 @@ using System; -#nullable enable namespace Capnp.FrameTracing { /// @@ -32,4 +31,3 @@ namespace Capnp.FrameTracing void TraceFrame(FrameDirection direction, WireFrame frame); } } -#nullable restore \ No newline at end of file diff --git a/Capnp.Net.Runtime/FrameTracing/RpcFrameTracer.cs b/Capnp.Net.Runtime/FrameTracing/RpcFrameTracer.cs index 2c85285..fdd4ac2 100644 --- a/Capnp.Net.Runtime/FrameTracing/RpcFrameTracer.cs +++ b/Capnp.Net.Runtime/FrameTracing/RpcFrameTracer.cs @@ -6,7 +6,6 @@ using System.IO; using System.Linq; using System.Threading; -#nullable enable namespace Capnp.FrameTracing { /// @@ -245,5 +244,4 @@ namespace Capnp.FrameTracing } } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Framing.cs b/Capnp.Net.Runtime/Framing.cs index fd6fb04..89e86a0 100644 --- a/Capnp.Net.Runtime/Framing.cs +++ b/Capnp.Net.Runtime/Framing.cs @@ -3,7 +3,6 @@ using System.IO; using System.Runtime.InteropServices; using System.Text; -#nullable enable namespace Capnp { /// @@ -107,5 +106,4 @@ namespace Capnp } } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ICapnpSerializable.cs b/Capnp.Net.Runtime/ICapnpSerializable.cs index 029c393..0a5adfd 100644 --- a/Capnp.Net.Runtime/ICapnpSerializable.cs +++ b/Capnp.Net.Runtime/ICapnpSerializable.cs @@ -1,5 +1,4 @@ -#nullable enable -namespace Capnp +namespace Capnp { /// /// This interface is intended to be implemented by schema-generated domain classes which support deserialization from @@ -19,5 +18,4 @@ namespace Capnp /// Source deserializer state void Deserialize(DeserializerState state); } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ISegmentAllocator.cs b/Capnp.Net.Runtime/ISegmentAllocator.cs index 96f615a..80ddf0d 100644 --- a/Capnp.Net.Runtime/ISegmentAllocator.cs +++ b/Capnp.Net.Runtime/ISegmentAllocator.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; -#nullable enable namespace Capnp { /// @@ -27,5 +26,4 @@ namespace Capnp /// Whether allocation was successful bool Allocate(uint nwords, uint preferredSegment, out SegmentSlice slice, bool forcePreferredSegment); } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/IStructDeserializer.cs b/Capnp.Net.Runtime/IStructDeserializer.cs index cec7283..a851ed0 100644 --- a/Capnp.Net.Runtime/IStructDeserializer.cs +++ b/Capnp.Net.Runtime/IStructDeserializer.cs @@ -1,6 +1,5 @@ using System; -#nullable enable namespace Capnp { /// @@ -20,5 +19,4 @@ namespace Capnp /// this state does not represent a struct ulong StructReadData(ulong bitOffset, int bitCount); } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/IStructSerializer.cs b/Capnp.Net.Runtime/IStructSerializer.cs index 14a321b..83ebd30 100644 --- a/Capnp.Net.Runtime/IStructSerializer.cs +++ b/Capnp.Net.Runtime/IStructSerializer.cs @@ -1,6 +1,5 @@ using System; -#nullable enable namespace Capnp { /// @@ -25,5 +24,4 @@ namespace Capnp /// Span StructDataSection { get; } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ListDeserializer.cs b/Capnp.Net.Runtime/ListDeserializer.cs index d9a8d1a..8db896b 100644 --- a/Capnp.Net.Runtime/ListDeserializer.cs +++ b/Capnp.Net.Runtime/ListDeserializer.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; -#nullable enable namespace Capnp { /// @@ -401,5 +400,4 @@ namespace Capnp return Cast(sd => sd.ReadDataDouble(0)); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ListKind.cs b/Capnp.Net.Runtime/ListKind.cs index 91e856e..9e39ec4 100644 --- a/Capnp.Net.Runtime/ListKind.cs +++ b/Capnp.Net.Runtime/ListKind.cs @@ -1,5 +1,4 @@ -#nullable enable -namespace Capnp +namespace Capnp { /// /// Enumerates the list element categories which are defined by Cap'n Proto. @@ -46,5 +45,4 @@ namespace Capnp /// ListOfStructs = 7 } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ListOfBitsDeserializer.cs b/Capnp.Net.Runtime/ListOfBitsDeserializer.cs index ff5bf5f..0e5ff07 100644 --- a/Capnp.Net.Runtime/ListOfBitsDeserializer.cs +++ b/Capnp.Net.Runtime/ListOfBitsDeserializer.cs @@ -2,7 +2,6 @@ using System.Collections; using System.Collections.Generic; -#nullable enable namespace Capnp { /// @@ -77,5 +76,4 @@ namespace Capnp throw new NotSupportedException("Cannot cast a list of bits to anything else"); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ListOfBitsSerializer.cs b/Capnp.Net.Runtime/ListOfBitsSerializer.cs index b22b1cc..0719d32 100644 --- a/Capnp.Net.Runtime/ListOfBitsSerializer.cs +++ b/Capnp.Net.Runtime/ListOfBitsSerializer.cs @@ -3,7 +3,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -#nullable enable namespace Capnp { /// @@ -96,5 +95,4 @@ namespace Capnp IEnumerator IEnumerable.GetEnumerator() => this.ToArray().GetEnumerator(); } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ListOfCapsDeserializer.cs b/Capnp.Net.Runtime/ListOfCapsDeserializer.cs index c546e13..22a9ac9 100644 --- a/Capnp.Net.Runtime/ListOfCapsDeserializer.cs +++ b/Capnp.Net.Runtime/ListOfCapsDeserializer.cs @@ -1,9 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Text; -#nullable enable namespace Capnp { /// @@ -70,5 +68,4 @@ namespace Capnp return GetEnumerator(); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ListOfCapsSerializer.cs b/Capnp.Net.Runtime/ListOfCapsSerializer.cs index fcaeb57..7cc94e0 100644 --- a/Capnp.Net.Runtime/ListOfCapsSerializer.cs +++ b/Capnp.Net.Runtime/ListOfCapsSerializer.cs @@ -2,7 +2,6 @@ using System.Collections; using System.Collections.Generic; -#nullable enable namespace Capnp { /// @@ -108,5 +107,4 @@ namespace Capnp return GetEnumerator(); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ListOfEmptyDeserializer.cs b/Capnp.Net.Runtime/ListOfEmptyDeserializer.cs index 9ca54af..9b6ed42 100644 --- a/Capnp.Net.Runtime/ListOfEmptyDeserializer.cs +++ b/Capnp.Net.Runtime/ListOfEmptyDeserializer.cs @@ -3,7 +3,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -#nullable enable namespace Capnp { /// @@ -64,5 +63,4 @@ namespace Capnp return GetEnumerator(); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ListOfEmptySerializer.cs b/Capnp.Net.Runtime/ListOfEmptySerializer.cs index 8ebb0cf..b6aa31f 100644 --- a/Capnp.Net.Runtime/ListOfEmptySerializer.cs +++ b/Capnp.Net.Runtime/ListOfEmptySerializer.cs @@ -1,6 +1,5 @@ using System; -#nullable enable namespace Capnp { /// @@ -31,5 +30,4 @@ namespace Capnp SetListOfValues(0, count); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ListOfPointersDeserializer.cs b/Capnp.Net.Runtime/ListOfPointersDeserializer.cs index e20e737..520e0e7 100644 --- a/Capnp.Net.Runtime/ListOfPointersDeserializer.cs +++ b/Capnp.Net.Runtime/ListOfPointersDeserializer.cs @@ -2,7 +2,6 @@ using System.Collections; using System.Collections.Generic; -#nullable enable namespace Capnp { /// @@ -89,5 +88,4 @@ namespace Capnp return this.LazyListSelect(d => d.RequireCapList()); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ListOfPointersSerializer.cs b/Capnp.Net.Runtime/ListOfPointersSerializer.cs index 5bf014f..66fc61c 100644 --- a/Capnp.Net.Runtime/ListOfPointersSerializer.cs +++ b/Capnp.Net.Runtime/ListOfPointersSerializer.cs @@ -1,10 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Linq; -using System.Text; -#nullable enable namespace Capnp { /// @@ -115,5 +112,4 @@ namespace Capnp return GetEnumerator(); } } -} -#nullable enable \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ListOfPrimitivesDeserializer.cs b/Capnp.Net.Runtime/ListOfPrimitivesDeserializer.cs index ce8dbad..1cb357a 100644 --- a/Capnp.Net.Runtime/ListOfPrimitivesDeserializer.cs +++ b/Capnp.Net.Runtime/ListOfPrimitivesDeserializer.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Runtime.InteropServices; using System.Text; -#nullable enable namespace Capnp { /// @@ -232,5 +231,4 @@ namespace Capnp return GetEnumerator(); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ListOfPrimitivesSerializer.cs b/Capnp.Net.Runtime/ListOfPrimitivesSerializer.cs index 2a4a52e..5258543 100644 --- a/Capnp.Net.Runtime/ListOfPrimitivesSerializer.cs +++ b/Capnp.Net.Runtime/ListOfPrimitivesSerializer.cs @@ -2,9 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; -using System.Text; -#nullable enable namespace Capnp { /// @@ -94,5 +92,4 @@ namespace Capnp IEnumerator IEnumerable.GetEnumerator() => Data.ToArray().GetEnumerator(); } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ListOfStructsDeserializer.cs b/Capnp.Net.Runtime/ListOfStructsDeserializer.cs index dfdc97e..57794e3 100644 --- a/Capnp.Net.Runtime/ListOfStructsDeserializer.cs +++ b/Capnp.Net.Runtime/ListOfStructsDeserializer.cs @@ -1,9 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Linq; -#nullable enable namespace Capnp { /// @@ -79,5 +77,4 @@ namespace Capnp return GetEnumerator(); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ListOfStructsSerializer.cs b/Capnp.Net.Runtime/ListOfStructsSerializer.cs index 04cbc01..be7c00e 100644 --- a/Capnp.Net.Runtime/ListOfStructsSerializer.cs +++ b/Capnp.Net.Runtime/ListOfStructsSerializer.cs @@ -3,7 +3,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -#nullable enable namespace Capnp { /// @@ -93,5 +92,4 @@ namespace Capnp return GetEnumerator(); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ListOfTextSerializer.cs b/Capnp.Net.Runtime/ListOfTextSerializer.cs index 2ebe4fa..d737c45 100644 --- a/Capnp.Net.Runtime/ListOfTextSerializer.cs +++ b/Capnp.Net.Runtime/ListOfTextSerializer.cs @@ -2,7 +2,6 @@ using System.Collections; using System.Collections.Generic; -#nullable enable namespace Capnp { /// @@ -109,6 +108,4 @@ namespace Capnp return GetEnumerator(); } } -} - -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Logging.cs b/Capnp.Net.Runtime/Logging.cs index 4842d32..ce79635 100644 --- a/Capnp.Net.Runtime/Logging.cs +++ b/Capnp.Net.Runtime/Logging.cs @@ -1,7 +1,5 @@ -using System; -using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging; -#nullable enable namespace Capnp { /// @@ -21,5 +19,4 @@ namespace Capnp /// The logger instance public static ILogger CreateLogger() => LoggerFactory.CreateLogger(); } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/MessageBuilder.cs b/Capnp.Net.Runtime/MessageBuilder.cs index b1719da..9a5d826 100644 --- a/Capnp.Net.Runtime/MessageBuilder.cs +++ b/Capnp.Net.Runtime/MessageBuilder.cs @@ -1,9 +1,6 @@ using System; using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Text; -#nullable enable namespace Capnp { /// @@ -101,5 +98,4 @@ namespace Capnp public ISegmentAllocator Allocator => _allocator; internal List? Caps => _capTable; } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ObjectKind.cs b/Capnp.Net.Runtime/ObjectKind.cs index 3456130..bdabf6f 100644 --- a/Capnp.Net.Runtime/ObjectKind.cs +++ b/Capnp.Net.Runtime/ObjectKind.cs @@ -1,6 +1,5 @@ using System; -#nullable enable namespace Capnp { /// @@ -71,5 +70,4 @@ namespace Capnp /// Value = 16 } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/PrimitiveCoder.cs b/Capnp.Net.Runtime/PrimitiveCoder.cs index dcb7516..9feee41 100644 --- a/Capnp.Net.Runtime/PrimitiveCoder.cs +++ b/Capnp.Net.Runtime/PrimitiveCoder.cs @@ -1,8 +1,5 @@ using System; -using System.Collections.Generic; -using System.Text; -#nullable enable namespace Capnp { class PrimitiveCoder @@ -45,5 +42,4 @@ namespace Capnp throw new NotSupportedException("Generic type argument is not a supported primitive type, no coder defined"); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/ReadOnlyListExtensions.cs b/Capnp.Net.Runtime/ReadOnlyListExtensions.cs index f259e95..96ba7e5 100644 --- a/Capnp.Net.Runtime/ReadOnlyListExtensions.cs +++ b/Capnp.Net.Runtime/ReadOnlyListExtensions.cs @@ -2,9 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using System.Text; -#nullable enable namespace Capnp { /// @@ -71,5 +69,4 @@ namespace Capnp return source.Select(selector).ToList().AsReadOnly(); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Reserializing.cs b/Capnp.Net.Runtime/Reserializing.cs index 3beacd4..2ad6a87 100644 --- a/Capnp.Net.Runtime/Reserializing.cs +++ b/Capnp.Net.Runtime/Reserializing.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; -using System.Text; -#nullable enable namespace Capnp { /// @@ -103,5 +101,4 @@ namespace Capnp to.InheritFrom(ds); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/AnswerOrCounterquestion.cs b/Capnp.Net.Runtime/Rpc/AnswerOrCounterquestion.cs index 893f1d7..05cfc70 100644 --- a/Capnp.Net.Runtime/Rpc/AnswerOrCounterquestion.cs +++ b/Capnp.Net.Runtime/Rpc/AnswerOrCounterquestion.cs @@ -1,5 +1,4 @@ -#nullable enable -namespace Capnp.Rpc +namespace Capnp.Rpc { /// /// Helper struct to support tail calls @@ -41,5 +40,4 @@ namespace Capnp.Rpc /// public PendingQuestion? Counterquestion => _obj as PendingQuestion; } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/BareProxy.cs b/Capnp.Net.Runtime/Rpc/BareProxy.cs index d690411..5f9dca5 100644 --- a/Capnp.Net.Runtime/Rpc/BareProxy.cs +++ b/Capnp.Net.Runtime/Rpc/BareProxy.cs @@ -1,5 +1,4 @@ -#nullable enable -namespace Capnp.Rpc +namespace Capnp.Rpc { /// /// Generic Proxy implementation which exposes the (usually protected) Call method. @@ -50,5 +49,4 @@ namespace Capnp.Rpc return base.Call(interfaceId, methodId, args, default); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/CapabilityReflection.cs b/Capnp.Net.Runtime/Rpc/CapabilityReflection.cs index 1eb323c..42ae7ca 100644 --- a/Capnp.Net.Runtime/Rpc/CapabilityReflection.cs +++ b/Capnp.Net.Runtime/Rpc/CapabilityReflection.cs @@ -1,9 +1,7 @@ using System; -using System.Diagnostics; using System.Linq; using System.Runtime.CompilerServices; -#nullable enable namespace Capnp.Rpc { /// @@ -286,5 +284,4 @@ namespace Capnp.Rpc return proxy; } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/ConnectionState.cs b/Capnp.Net.Runtime/Rpc/ConnectionState.cs index b7ff923..4453ba8 100644 --- a/Capnp.Net.Runtime/Rpc/ConnectionState.cs +++ b/Capnp.Net.Runtime/Rpc/ConnectionState.cs @@ -1,5 +1,4 @@ -#nullable enable -namespace Capnp.Rpc +namespace Capnp.Rpc { /// /// State of an RPC connection @@ -22,5 +21,4 @@ namespace Capnp.Rpc /// Down } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/ConsumedCapability.cs b/Capnp.Net.Runtime/Rpc/ConsumedCapability.cs index 0f048de..d628571 100644 --- a/Capnp.Net.Runtime/Rpc/ConsumedCapability.cs +++ b/Capnp.Net.Runtime/Rpc/ConsumedCapability.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -#nullable enable -namespace Capnp.Rpc +namespace Capnp.Rpc { /// /// Base class for a low-level capability at consumer side. It is created by the . An application does not directly interact with it @@ -31,5 +26,4 @@ namespace Capnp.Rpc public int CreatorLineNumber { get; set; } #endif } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/IConnection.cs b/Capnp.Net.Runtime/Rpc/IConnection.cs index d7b8381..6ca724e 100644 --- a/Capnp.Net.Runtime/Rpc/IConnection.cs +++ b/Capnp.Net.Runtime/Rpc/IConnection.cs @@ -1,7 +1,6 @@ using Capnp.FrameTracing; using System; -#nullable enable namespace Capnp.Rpc { /// @@ -58,5 +57,4 @@ namespace Capnp.Rpc /// void Close(); } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/IEndpoint.cs b/Capnp.Net.Runtime/Rpc/IEndpoint.cs index 6112dbb..267cafa 100644 --- a/Capnp.Net.Runtime/Rpc/IEndpoint.cs +++ b/Capnp.Net.Runtime/Rpc/IEndpoint.cs @@ -1,5 +1,4 @@ -#nullable enable -namespace Capnp.Rpc +namespace Capnp.Rpc { /// /// A uni-directional endpoint, used in conjunction with the . @@ -16,5 +15,4 @@ namespace Capnp.Rpc /// void Dismiss(); } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/IMonoSkeleton.cs b/Capnp.Net.Runtime/Rpc/IMonoSkeleton.cs index 14972de..66c6f52 100644 --- a/Capnp.Net.Runtime/Rpc/IMonoSkeleton.cs +++ b/Capnp.Net.Runtime/Rpc/IMonoSkeleton.cs @@ -1,5 +1,4 @@ -#nullable enable -namespace Capnp.Rpc +namespace Capnp.Rpc { /// /// A mono skeleton (as opposed to ) is a skeleton which implements one particular RPC interface. @@ -11,5 +10,4 @@ namespace Capnp.Rpc /// ulong InterfaceId { get; } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/IPromisedAnswer.cs b/Capnp.Net.Runtime/Rpc/IPromisedAnswer.cs index df1e3ad..250aa18 100644 --- a/Capnp.Net.Runtime/Rpc/IPromisedAnswer.cs +++ b/Capnp.Net.Runtime/Rpc/IPromisedAnswer.cs @@ -1,7 +1,6 @@ using System; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { /// @@ -25,5 +24,4 @@ namespace Capnp.Rpc /// Pipelined low-level capability ConsumedCapability? Access(MemberAccessPath access); } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/IProvidedCapability.cs b/Capnp.Net.Runtime/Rpc/IProvidedCapability.cs index aa4c6b2..93fd94b 100644 --- a/Capnp.Net.Runtime/Rpc/IProvidedCapability.cs +++ b/Capnp.Net.Runtime/Rpc/IProvidedCapability.cs @@ -2,7 +2,6 @@ using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { @@ -22,5 +21,4 @@ namespace Capnp.Rpc Task Invoke(ulong interfaceId, ushort methodId, DeserializerState args, CancellationToken cancellationToken = default); } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/IResolvingCapability.cs b/Capnp.Net.Runtime/Rpc/IResolvingCapability.cs index 877298a..36f8bf0 100644 --- a/Capnp.Net.Runtime/Rpc/IResolvingCapability.cs +++ b/Capnp.Net.Runtime/Rpc/IResolvingCapability.cs @@ -1,6 +1,5 @@ using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { /// @@ -13,5 +12,4 @@ namespace Capnp.Rpc /// Task WhenResolved { get; } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/IRpcEndpoint.cs b/Capnp.Net.Runtime/Rpc/IRpcEndpoint.cs index 192daa1..339ec26 100644 --- a/Capnp.Net.Runtime/Rpc/IRpcEndpoint.cs +++ b/Capnp.Net.Runtime/Rpc/IRpcEndpoint.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; -using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { internal interface IRpcEndpoint @@ -19,5 +16,4 @@ namespace Capnp.Rpc Task RequestSenderLoopback(Action writer); void DeleteQuestion(PendingQuestion question); } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/Impatient.cs b/Capnp.Net.Runtime/Rpc/Impatient.cs index 84a76fe..1a0a81e 100644 --- a/Capnp.Net.Runtime/Rpc/Impatient.cs +++ b/Capnp.Net.Runtime/Rpc/Impatient.cs @@ -3,7 +3,6 @@ using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { /// @@ -252,5 +251,4 @@ namespace Capnp.Rpc return MaybeTailCall(task, (ValueTuple t) => func(t.Item1, t.Item2, t.Item3, t.Item4, t.Item5, t.Item6, t.Item7)); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/ImportedCapability.cs b/Capnp.Net.Runtime/Rpc/ImportedCapability.cs index 2227264..9645022 100644 --- a/Capnp.Net.Runtime/Rpc/ImportedCapability.cs +++ b/Capnp.Net.Runtime/Rpc/ImportedCapability.cs @@ -1,7 +1,4 @@ -using System.Threading.Tasks; - -#nullable enable -namespace Capnp.Rpc +namespace Capnp.Rpc { /// /// Low-level capability which as imported from a remote peer. @@ -52,5 +49,4 @@ namespace Capnp.Rpc } } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/Interception/CallContext.cs b/Capnp.Net.Runtime/Rpc/Interception/CallContext.cs index 914bf87..c8ea190 100644 --- a/Capnp.Net.Runtime/Rpc/Interception/CallContext.cs +++ b/Capnp.Net.Runtime/Rpc/Interception/CallContext.cs @@ -1,11 +1,7 @@ using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Text; using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc.Interception { @@ -357,4 +353,3 @@ namespace Capnp.Rpc.Interception } } } -#nullable restore \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/Interception/CensorCapability.cs b/Capnp.Net.Runtime/Rpc/Interception/CensorCapability.cs index be3950c..89573ba 100644 --- a/Capnp.Net.Runtime/Rpc/Interception/CensorCapability.cs +++ b/Capnp.Net.Runtime/Rpc/Interception/CensorCapability.cs @@ -1,5 +1,4 @@ -#nullable enable -namespace Capnp.Rpc.Interception +namespace Capnp.Rpc.Interception { class CensorCapability : RefCountingCapability { @@ -42,5 +41,4 @@ namespace Capnp.Rpc.Interception { } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/Interception/IInterceptionPolicy.cs b/Capnp.Net.Runtime/Rpc/Interception/IInterceptionPolicy.cs index 79ae1bb..8aa3ed5 100644 --- a/Capnp.Net.Runtime/Rpc/Interception/IInterceptionPolicy.cs +++ b/Capnp.Net.Runtime/Rpc/Interception/IInterceptionPolicy.cs @@ -1,6 +1,5 @@ using System; -#nullable enable namespace Capnp.Rpc.Interception { /// @@ -21,5 +20,4 @@ namespace Capnp.Rpc.Interception /// void OnReturnFromBob(CallContext callContext); } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/Interception/InterceptionState.cs b/Capnp.Net.Runtime/Rpc/Interception/InterceptionState.cs index 26d2fd8..a02cfa9 100644 --- a/Capnp.Net.Runtime/Rpc/Interception/InterceptionState.cs +++ b/Capnp.Net.Runtime/Rpc/Interception/InterceptionState.cs @@ -1,5 +1,4 @@ -#nullable enable -namespace Capnp.Rpc.Interception +namespace Capnp.Rpc.Interception { /// /// The state of an intercepted call from Alice to Bob. @@ -26,5 +25,4 @@ namespace Capnp.Rpc.Interception /// ReturnedToAlice } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/Interception/Interceptor.cs b/Capnp.Net.Runtime/Rpc/Interception/Interceptor.cs index 47d826b..1413f6c 100644 --- a/Capnp.Net.Runtime/Rpc/Interception/Interceptor.cs +++ b/Capnp.Net.Runtime/Rpc/Interception/Interceptor.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; -#nullable enable namespace Capnp.Rpc.Interception { /// @@ -113,5 +112,4 @@ namespace Capnp.Rpc.Interception } } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/InvalidCapabilityInterfaceException.cs b/Capnp.Net.Runtime/Rpc/InvalidCapabilityInterfaceException.cs index b3ac8a5..b08aa3a 100644 --- a/Capnp.Net.Runtime/Rpc/InvalidCapabilityInterfaceException.cs +++ b/Capnp.Net.Runtime/Rpc/InvalidCapabilityInterfaceException.cs @@ -1,5 +1,4 @@ -#nullable enable -namespace Capnp.Rpc +namespace Capnp.Rpc { /// /// Will be thrown if a type did not qualify as capability interface. @@ -22,5 +21,4 @@ namespace Capnp.Rpc { } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/LazyCapability.cs b/Capnp.Net.Runtime/Rpc/LazyCapability.cs index c5df3f5..965d054 100644 --- a/Capnp.Net.Runtime/Rpc/LazyCapability.cs +++ b/Capnp.Net.Runtime/Rpc/LazyCapability.cs @@ -2,7 +2,6 @@ using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { class LazyCapability : RefCountingCapability, IResolvingCapability @@ -106,5 +105,4 @@ namespace Capnp.Rpc return new LocalAnswer(cts, CallImpl(interfaceId, methodId, args, cts.Token)); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/LocalAnswer.cs b/Capnp.Net.Runtime/Rpc/LocalAnswer.cs index 85c6865..8744cb6 100644 --- a/Capnp.Net.Runtime/Rpc/LocalAnswer.cs +++ b/Capnp.Net.Runtime/Rpc/LocalAnswer.cs @@ -2,7 +2,6 @@ using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { class LocalAnswer : IPromisedAnswer @@ -50,5 +49,4 @@ namespace Capnp.Rpc } } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/LocalAnswerCapability.cs b/Capnp.Net.Runtime/Rpc/LocalAnswerCapability.cs index a5c57fe..195d139 100644 --- a/Capnp.Net.Runtime/Rpc/LocalAnswerCapability.cs +++ b/Capnp.Net.Runtime/Rpc/LocalAnswerCapability.cs @@ -2,7 +2,6 @@ using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { class LocalAnswerCapability : RefCountingCapability, IResolvingCapability @@ -87,5 +86,4 @@ namespace Capnp.Rpc this.DisposeWhenResolved(); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/LocalCapability.cs b/Capnp.Net.Runtime/Rpc/LocalCapability.cs index 2dfbe0b..4bff9e6 100644 --- a/Capnp.Net.Runtime/Rpc/LocalCapability.cs +++ b/Capnp.Net.Runtime/Rpc/LocalCapability.cs @@ -1,10 +1,8 @@ using System; using System.Runtime.CompilerServices; -using System.Text; using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { class LocalCapability : ConsumedCapability @@ -69,5 +67,4 @@ namespace Capnp.Rpc { } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/MemberAccessPath.cs b/Capnp.Net.Runtime/Rpc/MemberAccessPath.cs index cb30670..4843c08 100644 --- a/Capnp.Net.Runtime/Rpc/MemberAccessPath.cs +++ b/Capnp.Net.Runtime/Rpc/MemberAccessPath.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; -#nullable enable namespace Capnp.Rpc { /// @@ -192,5 +191,4 @@ namespace Capnp.Rpc } } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/PendingAnswer.cs b/Capnp.Net.Runtime/Rpc/PendingAnswer.cs index 43803cd..6660725 100644 --- a/Capnp.Net.Runtime/Rpc/PendingAnswer.cs +++ b/Capnp.Net.Runtime/Rpc/PendingAnswer.cs @@ -1,9 +1,7 @@ using System; -using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { class PendingAnswer: IDisposable @@ -199,5 +197,4 @@ namespace Capnp.Rpc } } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/PendingQuestion.cs b/Capnp.Net.Runtime/Rpc/PendingQuestion.cs index 047dd60..227f189 100644 --- a/Capnp.Net.Runtime/Rpc/PendingQuestion.cs +++ b/Capnp.Net.Runtime/Rpc/PendingQuestion.cs @@ -1,10 +1,7 @@ using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { /// @@ -378,5 +375,4 @@ namespace Capnp.Rpc } #endregion } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/PolySkeleton.cs b/Capnp.Net.Runtime/Rpc/PolySkeleton.cs index 1d0a579..002a75f 100644 --- a/Capnp.Net.Runtime/Rpc/PolySkeleton.cs +++ b/Capnp.Net.Runtime/Rpc/PolySkeleton.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { /// @@ -71,5 +70,4 @@ namespace Capnp.Rpc } } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/PromisedCapability.cs b/Capnp.Net.Runtime/Rpc/PromisedCapability.cs index 87be8ea..083a13d 100644 --- a/Capnp.Net.Runtime/Rpc/PromisedCapability.cs +++ b/Capnp.Net.Runtime/Rpc/PromisedCapability.cs @@ -1,9 +1,7 @@ using System; using System.Diagnostics; -using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { class PromisedCapability : RemoteResolvingCapability @@ -258,5 +256,4 @@ namespace Capnp.Rpc return call; } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/Proxy.cs b/Capnp.Net.Runtime/Rpc/Proxy.cs index 9529522..ed0a976 100644 --- a/Capnp.Net.Runtime/Rpc/Proxy.cs +++ b/Capnp.Net.Runtime/Rpc/Proxy.cs @@ -1,9 +1,7 @@ -using Microsoft.Extensions.Logging; -using System; +using System; using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { /// @@ -239,5 +237,4 @@ namespace Capnp.Rpc public int CreatorLineNumber { get; set; } #endif } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/ProxyAttribute.cs b/Capnp.Net.Runtime/Rpc/ProxyAttribute.cs index 54e65d5..951581c 100644 --- a/Capnp.Net.Runtime/Rpc/ProxyAttribute.cs +++ b/Capnp.Net.Runtime/Rpc/ProxyAttribute.cs @@ -1,8 +1,5 @@ using System; -using System.Collections.Generic; -using System.Text; -#nullable enable namespace Capnp.Rpc { /// @@ -28,5 +25,4 @@ namespace Capnp.Rpc /// public Type ProxyClass { get; } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/RefCountingCapability.cs b/Capnp.Net.Runtime/Rpc/RefCountingCapability.cs index f578159..290cca4 100644 --- a/Capnp.Net.Runtime/Rpc/RefCountingCapability.cs +++ b/Capnp.Net.Runtime/Rpc/RefCountingCapability.cs @@ -1,8 +1,6 @@ using System; -using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { abstract class RefCountingCapability: ConsumedCapability @@ -112,5 +110,4 @@ namespace Capnp.Rpc } } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/RemoteAnswerCapability.cs b/Capnp.Net.Runtime/Rpc/RemoteAnswerCapability.cs index f9aec6c..e3269e6 100644 --- a/Capnp.Net.Runtime/Rpc/RemoteAnswerCapability.cs +++ b/Capnp.Net.Runtime/Rpc/RemoteAnswerCapability.cs @@ -1,9 +1,6 @@ -using Microsoft.Extensions.Logging; -using System; -using System.Diagnostics; +using System; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { class RemoteAnswerCapability : RemoteResolvingCapability @@ -259,5 +256,4 @@ namespace Capnp.Rpc this.DisposeWhenResolved(); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/RemoteCapability.cs b/Capnp.Net.Runtime/Rpc/RemoteCapability.cs index 6e4c4f6..f198b29 100644 --- a/Capnp.Net.Runtime/Rpc/RemoteCapability.cs +++ b/Capnp.Net.Runtime/Rpc/RemoteCapability.cs @@ -1,9 +1,6 @@ using System; using System.Diagnostics; -using System.Threading; -using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { @@ -41,5 +38,4 @@ namespace Capnp.Rpc return call; } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/RemoteResolvingCapability.cs b/Capnp.Net.Runtime/Rpc/RemoteResolvingCapability.cs index c939c80..225c8e1 100644 --- a/Capnp.Net.Runtime/Rpc/RemoteResolvingCapability.cs +++ b/Capnp.Net.Runtime/Rpc/RemoteResolvingCapability.cs @@ -3,7 +3,6 @@ using System; using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { abstract class RemoteResolvingCapability : RemoteCapability, IResolvingCapability @@ -127,5 +126,4 @@ namespace Capnp.Rpc } } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/ResolvingCapabilityExtensions.cs b/Capnp.Net.Runtime/Rpc/ResolvingCapabilityExtensions.cs index d865447..9b68f7e 100644 --- a/Capnp.Net.Runtime/Rpc/ResolvingCapabilityExtensions.cs +++ b/Capnp.Net.Runtime/Rpc/ResolvingCapabilityExtensions.cs @@ -1,5 +1,4 @@ -#nullable enable -namespace Capnp.Rpc +namespace Capnp.Rpc { static class ResolvingCapabilityExtensions { @@ -42,5 +41,4 @@ namespace Capnp.Rpc } } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/RpcEngine.cs b/Capnp.Net.Runtime/Rpc/RpcEngine.cs index 2b6da86..f9159b5 100644 --- a/Capnp.Net.Runtime/Rpc/RpcEngine.cs +++ b/Capnp.Net.Runtime/Rpc/RpcEngine.cs @@ -4,13 +4,9 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { /// @@ -1508,5 +1504,4 @@ namespace Capnp.Rpc } } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/RpcException.cs b/Capnp.Net.Runtime/Rpc/RpcException.cs index fb288e0..6c9a4ef 100644 --- a/Capnp.Net.Runtime/Rpc/RpcException.cs +++ b/Capnp.Net.Runtime/Rpc/RpcException.cs @@ -1,5 +1,4 @@ -#nullable enable -namespace Capnp.Rpc +namespace Capnp.Rpc { /// /// Thrown when an RPC-related error condition occurs. @@ -20,5 +19,4 @@ namespace Capnp.Rpc { } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/RpcUnimplementedException.cs b/Capnp.Net.Runtime/Rpc/RpcUnimplementedException.cs index 12f3895..6947741 100644 --- a/Capnp.Net.Runtime/Rpc/RpcUnimplementedException.cs +++ b/Capnp.Net.Runtime/Rpc/RpcUnimplementedException.cs @@ -1,8 +1,6 @@ -#nullable enable -namespace Capnp.Rpc +namespace Capnp.Rpc { class RpcUnimplementedException : System.Exception { } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/Skeleton.cs b/Capnp.Net.Runtime/Rpc/Skeleton.cs index 7bf7801..842bf06 100644 --- a/Capnp.Net.Runtime/Rpc/Skeleton.cs +++ b/Capnp.Net.Runtime/Rpc/Skeleton.cs @@ -1,12 +1,8 @@ -using Microsoft.Extensions.Logging; -using System; -using System.Diagnostics; +using System; using System.Runtime.CompilerServices; -using System.Text; using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { /// @@ -299,5 +295,4 @@ namespace Capnp.Rpc Impl = (T)impl; } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/SkeletonAttribute.cs b/Capnp.Net.Runtime/Rpc/SkeletonAttribute.cs index a5b0600..0b437b6 100644 --- a/Capnp.Net.Runtime/Rpc/SkeletonAttribute.cs +++ b/Capnp.Net.Runtime/Rpc/SkeletonAttribute.cs @@ -1,6 +1,5 @@ using System; -#nullable enable namespace Capnp.Rpc { /// @@ -32,5 +31,4 @@ namespace Capnp.Rpc /// public Type SkeletonClass { get; } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/TcpRpcClient.cs b/Capnp.Net.Runtime/Rpc/TcpRpcClient.cs index a35e7d7..48298f0 100644 --- a/Capnp.Net.Runtime/Rpc/TcpRpcClient.cs +++ b/Capnp.Net.Runtime/Rpc/TcpRpcClient.cs @@ -1,16 +1,11 @@ using Capnp.FrameTracing; using Microsoft.Extensions.Logging; using System; -using System.Collections.Generic; -using System.Diagnostics; using System.Net; using System.Net.Sockets; -using System.Runtime.CompilerServices; -using System.Text; using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { /// @@ -268,5 +263,4 @@ namespace Capnp.Rpc /// public bool IsWaitingForData => _pump?.IsWaitingForData ?? false; } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/TcpRpcServer.cs b/Capnp.Net.Runtime/Rpc/TcpRpcServer.cs index 9363505..5260515 100644 --- a/Capnp.Net.Runtime/Rpc/TcpRpcServer.cs +++ b/Capnp.Net.Runtime/Rpc/TcpRpcServer.cs @@ -6,7 +6,6 @@ using System.Net; using System.Net.Sockets; using System.Threading; -#nullable enable namespace Capnp.Rpc { /// @@ -321,5 +320,4 @@ namespace Capnp.Rpc /// public event Action? OnConnectionChanged; } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/Vine.cs b/Capnp.Net.Runtime/Rpc/Vine.cs index d9ce1d3..52f10c1 100644 --- a/Capnp.Net.Runtime/Rpc/Vine.cs +++ b/Capnp.Net.Runtime/Rpc/Vine.cs @@ -1,10 +1,7 @@ using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; -#nullable enable namespace Capnp.Rpc { class Vine : Skeleton @@ -70,5 +67,4 @@ namespace Capnp.Rpc base.Dispose(disposing); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/Rpc/rpc.cs b/Capnp.Net.Runtime/Rpc/rpc.cs index 61139b0..066bd98 100644 --- a/Capnp.Net.Runtime/Rpc/rpc.cs +++ b/Capnp.Net.Runtime/Rpc/rpc.cs @@ -1,4 +1,5 @@ #pragma warning disable CS1591 +#nullable disable using Capnp; using Capnp.Rpc; @@ -2640,4 +2641,6 @@ namespace Capnp.Rpc unimplemented } } -} \ No newline at end of file +} + +#nullable restore \ No newline at end of file diff --git a/Capnp.Net.Runtime/SecurityOptions.cs b/Capnp.Net.Runtime/SecurityOptions.cs index f12f8d3..92de4c5 100644 --- a/Capnp.Net.Runtime/SecurityOptions.cs +++ b/Capnp.Net.Runtime/SecurityOptions.cs @@ -1,5 +1,4 @@ -#nullable enable -namespace Capnp +namespace Capnp { /// /// Provides the security bounds for defeating amplification and stack overflow DoS attacks. @@ -16,5 +15,4 @@ namespace Capnp /// public static int RecursionLimit { get; set; } = 64; } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/SegmentAllocator.cs b/Capnp.Net.Runtime/SegmentAllocator.cs index f473ba2..eb591f5 100644 --- a/Capnp.Net.Runtime/SegmentAllocator.cs +++ b/Capnp.Net.Runtime/SegmentAllocator.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; -using System.Text; -#nullable enable namespace Capnp { /// @@ -145,5 +143,4 @@ namespace Capnp return true; } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/SegmentSlice.cs b/Capnp.Net.Runtime/SegmentSlice.cs index 6b3b403..8965fc5 100644 --- a/Capnp.Net.Runtime/SegmentSlice.cs +++ b/Capnp.Net.Runtime/SegmentSlice.cs @@ -1,7 +1,4 @@ -using System; - -#nullable enable -namespace Capnp +namespace Capnp { /// /// Helper struct to represent the tuple (segment index, offset) @@ -18,5 +15,4 @@ namespace Capnp /// public int Offset; } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/SerializerExtensions.cs b/Capnp.Net.Runtime/SerializerExtensions.cs index 7001ce3..84529f4 100644 --- a/Capnp.Net.Runtime/SerializerExtensions.cs +++ b/Capnp.Net.Runtime/SerializerExtensions.cs @@ -1,7 +1,6 @@ using System; using System.Runtime.InteropServices; -#nullable enable namespace Capnp { /// @@ -339,5 +338,4 @@ namespace Capnp WriteData(d, bitOffset, bits, defaultBits); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/SerializerState.cs b/Capnp.Net.Runtime/SerializerState.cs index 561d27b..ac502ca 100644 --- a/Capnp.Net.Runtime/SerializerState.cs +++ b/Capnp.Net.Runtime/SerializerState.cs @@ -1,10 +1,8 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Runtime.InteropServices; using System.Text; -#nullable enable namespace Capnp { /// @@ -1406,5 +1404,4 @@ namespace Capnp return new Rpc.BareProxy(cap); } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/TypeIdAttribute.cs b/Capnp.Net.Runtime/TypeIdAttribute.cs index c21e48c..8b6e2bb 100644 --- a/Capnp.Net.Runtime/TypeIdAttribute.cs +++ b/Capnp.Net.Runtime/TypeIdAttribute.cs @@ -1,6 +1,5 @@ using System; -#nullable enable namespace Capnp { /// @@ -25,5 +24,4 @@ namespace Capnp /// public ulong Id { get; } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/UtilityExtensions.cs b/Capnp.Net.Runtime/UtilityExtensions.cs index 964f89c..90a4acb 100644 --- a/Capnp.Net.Runtime/UtilityExtensions.cs +++ b/Capnp.Net.Runtime/UtilityExtensions.cs @@ -4,7 +4,6 @@ using System.Threading.Tasks; namespace Capnp { -#nullable enable internal static class UtilityExtensions { /// @@ -79,5 +78,4 @@ namespace Capnp public static float ReplacementInt32ToSingleBits(this int value) => BitConverter.Int32BitsToSingle(value); #endif } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/WireFrame.cs b/Capnp.Net.Runtime/WireFrame.cs index 2fbfb76..3705b0a 100644 --- a/Capnp.Net.Runtime/WireFrame.cs +++ b/Capnp.Net.Runtime/WireFrame.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; -#nullable enable namespace Capnp { /// @@ -22,5 +21,4 @@ namespace Capnp Segments = segments; } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file diff --git a/Capnp.Net.Runtime/WirePointer.cs b/Capnp.Net.Runtime/WirePointer.cs index d3117a8..197886e 100644 --- a/Capnp.Net.Runtime/WirePointer.cs +++ b/Capnp.Net.Runtime/WirePointer.cs @@ -1,8 +1,5 @@ using System; -using System.Collections.Generic; -using System.Text; -#nullable enable namespace Capnp { /// @@ -228,5 +225,4 @@ namespace Capnp _ptrData = ((ulong)index << 32) | (ulong)PointerKind.Other; } } -} -#nullable restore \ No newline at end of file +} \ No newline at end of file