Skip to content

Commit 7a99883

Browse files
committed
start
1 parent ee68be3 commit 7a99883

4 files changed

Lines changed: 23 additions & 21 deletions

File tree

.github/copilot-instructions.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
# Instructions
22

3-
When creating pull requests, always follow the [PR template](PULL_REQUEST_TEMPLATE.md).
3+
## General Guidelines
44

5-
Use the following coding guidelines: https://github.com/NuGet/NuGet.Client/blob/dev/docs/coding-guidelines.md
5+
- When creating pull requests, always follow the [PR template](PULL_REQUEST_TEMPLATE.md).
6+
- Always format before submitting a pull request.
67

7-
Always format before submitting a pull request.
8+
## Coding Standards
89

9-
Never use reflection.
10+
- Use the following coding guidelines: https://github.com/NuGet/NuGet.Client/blob/dev/docs/coding-guidelines.md
11+
- Never use reflection.
12+
13+
## Project-Specific Rules
14+
15+
- All files in the repository are nullable by default (project-level nullable enable). No need to add `#nullable enable` directives to individual files.

src/NuGet.Core/NuGet.ProjectModel/CircularMemoryStream.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
#nullable disable
5-
64
using System;
75
using System.IO;
86

@@ -15,7 +13,7 @@ internal sealed class CircularMemoryStream : MemoryStream
1513
{
1614
private readonly byte[] _buffer;
1715

18-
internal event EventHandler<ArraySegment<byte>> OnFlush;
16+
internal event EventHandler<ArraySegment<byte>>? OnFlush;
1917

2018
internal CircularMemoryStream(byte[] buffer) : base(buffer)
2119
{

src/NuGet.Core/NuGet.ProjectModel/HashObjectWriter.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
#nullable disable
5-
64
using System;
75
using System.Collections.Generic;
86
using System.IO;
@@ -134,7 +132,7 @@ public void WriteNameValue(string name, bool value)
134132
_writer.WriteValue(value);
135133
}
136134

137-
public void WriteNameValue(string name, string value)
135+
public void WriteNameValue(string name, string? value)
138136
{
139137
if (name == null)
140138
{
@@ -260,11 +258,11 @@ public void WriteArrayEnd()
260258
--_nestLevel;
261259
}
262260

263-
private void OnFlush(object sender, ArraySegment<byte> bytes)
261+
private void OnFlush(object? sender, ArraySegment<byte> bytes)
264262
{
265263
if (bytes.Count > 0)
266264
{
267-
_hashFunc.Update(bytes.Array, bytes.Offset, bytes.Count);
265+
_hashFunc.Update(bytes.Array!, bytes.Offset, bytes.Count);
268266
}
269267
}
270268

src/NuGet.Core/NuGet.ProjectModel/PublicAPI.Shipped.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,18 @@ NuGet.ProjectModel.FileFormatException.Line.get -> int
8989
~NuGet.ProjectModel.FileFormatException.Path.get -> string
9090
NuGet.ProjectModel.HashObjectWriter
9191
NuGet.ProjectModel.HashObjectWriter.Dispose() -> void
92-
~NuGet.ProjectModel.HashObjectWriter.GetHash() -> string
93-
~NuGet.ProjectModel.HashObjectWriter.HashObjectWriter(NuGet.Packaging.IHashFunction hashFunc) -> void
92+
NuGet.ProjectModel.HashObjectWriter.GetHash() -> string!
93+
NuGet.ProjectModel.HashObjectWriter.HashObjectWriter(NuGet.Packaging.IHashFunction! hashFunc) -> void
9494
NuGet.ProjectModel.HashObjectWriter.WriteArrayEnd() -> void
95-
~NuGet.ProjectModel.HashObjectWriter.WriteArrayStart(string name) -> void
96-
~NuGet.ProjectModel.HashObjectWriter.WriteNameArray(string name, System.Collections.Generic.IEnumerable<string> values) -> void
97-
~NuGet.ProjectModel.HashObjectWriter.WriteNameValue(string name, bool value) -> void
98-
~NuGet.ProjectModel.HashObjectWriter.WriteNameValue(string name, int value) -> void
99-
~NuGet.ProjectModel.HashObjectWriter.WriteNameValue(string name, string value) -> void
100-
~NuGet.ProjectModel.HashObjectWriter.WriteNonEmptyNameArray(string name, System.Collections.Generic.IEnumerable<string> values) -> void
95+
NuGet.ProjectModel.HashObjectWriter.WriteArrayStart(string! name) -> void
96+
NuGet.ProjectModel.HashObjectWriter.WriteNameArray(string! name, System.Collections.Generic.IEnumerable<string!>! values) -> void
97+
NuGet.ProjectModel.HashObjectWriter.WriteNameValue(string! name, bool value) -> void
98+
NuGet.ProjectModel.HashObjectWriter.WriteNameValue(string! name, int value) -> void
99+
NuGet.ProjectModel.HashObjectWriter.WriteNameValue(string! name, string? value) -> void
100+
NuGet.ProjectModel.HashObjectWriter.WriteNonEmptyNameArray(string! name, System.Collections.Generic.IEnumerable<string!>! values) -> void
101101
NuGet.ProjectModel.HashObjectWriter.WriteObjectEnd() -> void
102102
NuGet.ProjectModel.HashObjectWriter.WriteObjectStart() -> void
103-
~NuGet.ProjectModel.HashObjectWriter.WriteObjectStart(string name) -> void
103+
NuGet.ProjectModel.HashObjectWriter.WriteObjectStart(string! name) -> void
104104
NuGet.ProjectModel.IAssetsLogMessage
105105
NuGet.ProjectModel.IAssetsLogMessage.Code.get -> NuGet.Common.NuGetLogCode
106106
NuGet.ProjectModel.IAssetsLogMessage.EndColumnNumber.get -> int

0 commit comments

Comments
 (0)