Skip to content

Commit

Permalink
Update System.Formats.Nrbf ref sources and restore package description (
Browse files Browse the repository at this point in the history
dotnet#108430)

* Restore System.Formats.Nrbf package description alongside package README

* Add missing struct members to ref source

* Update ref to match dotnet msbuild /t:GenerateReferenceAssemblySource

* Remove 'EnableDefaultPackageReadmeFile' since 'true' is the default
  • Loading branch information
jeffhandley authored and lambdageek committed Oct 3, 2024
1 parent 704d4d9 commit fdb3354
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 36 deletions.
15 changes: 8 additions & 7 deletions src/libraries/System.Formats.Nrbf/ref/System.Formats.Nrbf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ namespace System.Formats.Nrbf
public abstract partial class ArrayRecord : System.Formats.Nrbf.SerializationRecord
{
internal ArrayRecord() { }
public virtual long FlattenedLength { get { throw null; } }
public override System.Formats.Nrbf.SerializationRecordId Id { get { throw null; } }
public abstract System.ReadOnlySpan<int> Lengths { get; }
public virtual long FlattenedLength { get; }
public int Rank { get { throw null; } }
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("The code for an array of the specified type might not be available.")]
[System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute("The code for an array of the specified type might not be available.")]
public System.Array GetArray(System.Type expectedArrayType, bool allowNulls = true) { throw null; }
}
public abstract partial class ClassRecord : System.Formats.Nrbf.SerializationRecord
Expand Down Expand Up @@ -46,11 +46,11 @@ internal ClassRecord() { }
}
public static partial class NrbfDecoder
{
public static System.Formats.Nrbf.SerializationRecord Decode(System.IO.Stream payload, out System.Collections.Generic.IReadOnlyDictionary<System.Formats.Nrbf.SerializationRecordId, System.Formats.Nrbf.SerializationRecord> recordMap, System.Formats.Nrbf.PayloadOptions options=null, bool leaveOpen=false) { throw null; }
public static System.Formats.Nrbf.SerializationRecord Decode(System.IO.Stream payload, System.Formats.Nrbf.PayloadOptions? options=null, bool leaveOpen=false) { throw null; }
public static System.Formats.Nrbf.ClassRecord DecodeClassRecord(System.IO.Stream payload, System.Formats.Nrbf.PayloadOptions? options=null, bool leaveOpen=false) { throw null; }
public static bool StartsWithPayloadHeader(System.ReadOnlySpan<byte> bytes) { throw null; }
public static System.Formats.Nrbf.SerializationRecord Decode(System.IO.Stream payload, out System.Collections.Generic.IReadOnlyDictionary<System.Formats.Nrbf.SerializationRecordId, System.Formats.Nrbf.SerializationRecord> recordMap, System.Formats.Nrbf.PayloadOptions? options = null, bool leaveOpen = false) { throw null; }
public static System.Formats.Nrbf.SerializationRecord Decode(System.IO.Stream payload, System.Formats.Nrbf.PayloadOptions? options = null, bool leaveOpen = false) { throw null; }
public static System.Formats.Nrbf.ClassRecord DecodeClassRecord(System.IO.Stream payload, System.Formats.Nrbf.PayloadOptions? options = null, bool leaveOpen = false) { throw null; }
public static bool StartsWithPayloadHeader(System.IO.Stream stream) { throw null; }
public static bool StartsWithPayloadHeader(System.ReadOnlySpan<byte> bytes) { throw null; }
}
public sealed partial class PayloadOptions
{
Expand All @@ -77,8 +77,9 @@ internal SerializationRecord() { }
public abstract System.Reflection.Metadata.TypeName TypeName { get; }
public bool TypeNameMatches(System.Type type) { throw null; }
}
public partial struct SerializationRecordId : System.IEquatable<System.Formats.Nrbf.SerializationRecordId>
public readonly partial struct SerializationRecordId : System.IEquatable<System.Formats.Nrbf.SerializationRecordId>
{
private readonly int _dummyPrimitive;
public bool Equals(System.Formats.Nrbf.SerializationRecordId other) { throw null; }
public override bool Equals(object? obj) { throw null; }
public override int GetHashCode() { throw null; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<EnableDefaultItems>true</EnableDefaultItems>
<CLSCompliant>false</CLSCompliant>
<IsPackable>true</IsPackable>
<PackageDescription>Provides a safe reader for .NET Remoting Binary Format (NRBF) payloads.</PackageDescription>

<!-- Disabling baseline validation since this is a brand new package.
Once this package has shipped a stable version, the following line
should be removed in order to re-enable validation. -->
<DisablePackageBaselineValidation>true</DisablePackageBaselineValidation>
<EnableDefaultPackageReadmeFile>true</EnableDefaultPackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonPath)System\Experimentals.cs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,19 @@ void System.Collections.IEnumerator.Reset() { }
void System.IDisposable.Dispose() { }
}
}
public sealed partial class AssemblyNameInfo
{
public AssemblyNameInfo(string name, System.Version? version = null, string? cultureName = null, System.Reflection.AssemblyNameFlags flags = System.Reflection.AssemblyNameFlags.None, System.Collections.Immutable.ImmutableArray<byte> publicKeyOrToken = default(System.Collections.Immutable.ImmutableArray<byte>)) { }
public string? CultureName { get { throw null; } }
public System.Reflection.AssemblyNameFlags Flags { get { throw null; } }
public string FullName { get { throw null; } }
public string Name { get { throw null; } }
public System.Collections.Immutable.ImmutableArray<byte> PublicKeyOrToken { get { throw null; } }
public System.Version? Version { get { throw null; } }
public static System.Reflection.Metadata.AssemblyNameInfo Parse(System.ReadOnlySpan<char> assemblyName) { throw null; }
public System.Reflection.AssemblyName ToAssemblyName() { throw null; }
public static bool TryParse(System.ReadOnlySpan<char> assemblyName, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Reflection.Metadata.AssemblyNameInfo? result) { throw null; }
}
public readonly partial struct AssemblyReference
{
private readonly object _dummy;
Expand Down Expand Up @@ -2408,25 +2421,11 @@ public readonly partial struct TypeLayout
public int PackingSize { get { throw null; } }
public int Size { get { throw null; } }
}
public sealed partial class AssemblyNameInfo
{
public AssemblyNameInfo(string name, System.Version? version = null, string? cultureName = null, System.Reflection.AssemblyNameFlags flags = AssemblyNameFlags.None,
Collections.Immutable.ImmutableArray<byte> publicKeyOrToken = default) { }
public string Name { get { throw null; } }
public string? CultureName { get { throw null; } }
public string FullName { get { throw null; } }
public System.Version? Version { get { throw null; } }
public System.Reflection.AssemblyNameFlags Flags { get { throw null; } }
public System.Collections.Immutable.ImmutableArray<byte> PublicKeyOrToken { get { throw null; } }
public static System.Reflection.Metadata.AssemblyNameInfo Parse(System.ReadOnlySpan<char> assemblyName) { throw null; }
public static bool TryParse(System.ReadOnlySpan<char> assemblyName, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Reflection.Metadata.AssemblyNameInfo? result) { throw null; }
public System.Reflection.AssemblyName ToAssemblyName() { throw null; }
}
public sealed partial class TypeName
{
internal TypeName() { }
public System.Reflection.Metadata.AssemblyNameInfo? AssemblyName { get { throw null; } }
public string AssemblyQualifiedName { get { throw null; } }
public AssemblyNameInfo? AssemblyName { get { throw null; } }
public System.Reflection.Metadata.TypeName DeclaringType { get { throw null; } }
public string FullName { get { throw null; } }
public bool IsArray { get { throw null; } }
Expand All @@ -2438,19 +2437,19 @@ internal TypeName() { }
public bool IsSZArray { get { throw null; } }
public bool IsVariableBoundArrayType { get { throw null; } }
public string Name { get { throw null; } }
public static System.Reflection.Metadata.TypeName Parse(System.ReadOnlySpan<char> typeName, System.Reflection.Metadata.TypeNameParseOptions? options = null) { throw null; }
public static bool TryParse(System.ReadOnlySpan<char> typeName, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Reflection.Metadata.TypeName? result, System.Reflection.Metadata.TypeNameParseOptions? options = null) { throw null; }
public int GetArrayRank() { throw null; }
public System.Reflection.Metadata.TypeName GetElementType() { throw null; }
public System.Collections.Immutable.ImmutableArray<System.Reflection.Metadata.TypeName> GetGenericArguments() { throw null; }
public System.Reflection.Metadata.TypeName GetGenericTypeDefinition() { throw null; }
public System.Reflection.Metadata.TypeName GetElementType() { throw null; }
public int GetNodeCount() { throw null; }
public System.Reflection.Metadata.TypeName MakeSZArrayTypeName() { throw null; }
public System.Reflection.Metadata.TypeName MakeArrayTypeName(int rank) { throw null; }
public System.Reflection.Metadata.TypeName MakeByRefTypeName() { throw null; }
public System.Reflection.Metadata.TypeName MakeGenericTypeName(System.Collections.Immutable.ImmutableArray<System.Reflection.Metadata.TypeName> typeArguments) { throw null; }
public System.Reflection.Metadata.TypeName MakePointerTypeName() { throw null; }
public System.Reflection.Metadata.TypeName WithAssemblyName(AssemblyNameInfo? assemblyName) { throw null; }
public System.Reflection.Metadata.TypeName MakeSZArrayTypeName() { throw null; }
public static System.Reflection.Metadata.TypeName Parse(System.ReadOnlySpan<char> typeName, System.Reflection.Metadata.TypeNameParseOptions? options = null) { throw null; }
public static bool TryParse(System.ReadOnlySpan<char> typeName, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Reflection.Metadata.TypeName? result, System.Reflection.Metadata.TypeNameParseOptions? options = null) { throw null; }
public System.Reflection.Metadata.TypeName WithAssemblyName(System.Reflection.Metadata.AssemblyNameInfo? assemblyName) { throw null; }
}
public sealed partial class TypeNameParseOptions
{
Expand Down Expand Up @@ -2675,11 +2674,11 @@ public readonly partial struct FieldTypeEncoder
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public FieldTypeEncoder(System.Reflection.Metadata.BlobBuilder builder) { throw null; }
public FieldTypeEncoder(System.Reflection.Metadata.BlobBuilder builder) { throw null; }
public System.Reflection.Metadata.BlobBuilder Builder { get { throw null; } }
public System.Reflection.Metadata.Ecma335.CustomModifiersEncoder CustomModifiers() { throw null; }
public System.Reflection.Metadata.Ecma335.SignatureTypeEncoder Type(bool isByRef = false) { throw null; }
public void TypedReference() { throw null; }
public void TypedReference() { }
}
public readonly partial struct FixedArgumentsEncoder
{
Expand Down Expand Up @@ -3120,8 +3119,10 @@ public void UInt64() { }
public void UIntPtr() { }
public void VoidPointer() { }
}
public readonly struct SwitchInstructionEncoder
public readonly partial struct SwitchInstructionEncoder
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public void Branch(System.Reflection.Metadata.Ecma335.LabelHandle label) { }
}
public enum TableIndex : byte
Expand Down Expand Up @@ -3337,14 +3338,14 @@ public enum Machine : ushort
MipsFpu16 = (ushort)1126,
Tricore = (ushort)1312,
Ebc = (ushort)3772,
Amd64 = (ushort)34404,
M32R = (ushort)36929,
Arm64 = (ushort)43620,
LoongArch32 = (ushort)25138,
LoongArch64 = (ushort)25188,
RiscV32 = (ushort)20530,
RiscV64 = (ushort)20580,
RiscV128 = (ushort)20776,
LoongArch32 = (ushort)25138,
LoongArch64 = (ushort)25188,
Amd64 = (ushort)34404,
M32R = (ushort)36929,
Arm64 = (ushort)43620,
}
public partial class ManagedPEBuilder : System.Reflection.PortableExecutable.PEBuilder
{
Expand Down

0 comments on commit fdb3354

Please sign in to comment.