Files
sharangandClaude Opus 5.5 8926255d6f
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m10s
CI / Deploy Agent (push) Successful in 4m42s
feat(dotnet): .NET detection, NuGet SBOM, C# rules and config checks (#447)
Minimal .NET/C# support for epic #445 (N1-N5): detection of solutions/projects and target frameworks, NuGet SBOM without build or restore (pkg:nuget purls for OSV, unresolved-dependency warning, end-of-support frameworks), own C# semgrep rule pack, .NET configuration and key-file checks, .NET build output and restored packages not counted as own code. Fixture fixtures/dotnet/framework48, docs .NET-Projekte (DE/EN).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 14:38:13 +00:00

40 lines
1.0 KiB
C#

using System.Data.SqlClient;
using System.IO;
using System.Net;
using System.Runtime.Serialization.Formatters.Binary;
using System.Security.Cryptography;
namespace Plant.Web
{
public class OrderService : IOrderService
{
private readonly SqlConnection _conn;
public OrderService(SqlConnection conn)
{
_conn = conn;
ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, errors) => true;
}
public int CountOrders(string customer)
{
var cmd = new SqlCommand("SELECT COUNT(*) FROM Orders WHERE Customer = '" + customer + "'", _conn);
return (int)cmd.ExecuteScalar();
}
public object ReadState(Stream body)
{
var formatter = new BinaryFormatter();
return formatter.Deserialize(body);
}
public byte[] Checksum(byte[] data)
{
using (var md5 = MD5.Create())
{
return md5.ComputeHash(data);
}
}
}
}