Skip to content

Add csharp-library-rules.md: unified System.Web namespace documentation - #1

Draft
b10240k7 with Copilot wants to merge 2 commits into
mainfrom
copilot/unify-style-web-directory
Draft

Add csharp-library-rules.md: unified System.Web namespace documentation#1
b10240k7 with Copilot wants to merge 2 commits into
mainfrom
copilot/unify-style-web-directory

Conversation

Copilot AI commented Mar 13, 2026

Copy link
Copy Markdown

csharp-library-rules.md was absent; the System.Web directory lacked any documented usage rules, and style was inconsistent.

Changes

  • New file: csharp-library-rules.md — covers 11 System.Web types with a uniform per-entry structure:
    • Namespace — fully qualified location
    • Description — one-line summary
    • Rules — prescriptive bullet guidelines (security, threading, lifecycle)
    • Example — fenced C# code block

Types covered

HttpContext · HttpRequest · HttpResponse · HttpServerUtility · HttpApplication · IHttpHandler · IHttpModule · HttpCookie · HttpSessionState · HttpRuntime · HttpUtility

Example entry structure

// HttpCookie — always set security flags
HttpCookie cookie = new HttpCookie("sessionId", token)
{
    HttpOnly = true,
    Secure   = true,
    Expires  = DateTime.UtcNow.AddHours(1)
};
HttpContext.Current.Response.Cookies.Add(cookie);

A General Rules section at the end covers cross-cutting concerns: System.Web is .NET Framework only (not .NET 5+), all HttpRequest input must be validated, and all HTML output must be encoded.

Original prompt

csharp-library-rules.md System.Web目录文件清空重写风格要统一

创建自 VS Code


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: b10240k7 <225606231+b10240k7@users.noreply.github.com>
Copilot AI changed the title [WIP] Update styling for System.Web directory files Add csharp-library-rules.md: unified System.Web namespace documentation Mar 13, 2026
Copilot AI requested a review from b10240k7 March 13, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants