Skip to content

Instantly share code, notes, and snippets.

@im-kashi
im-kashi / cs-coding-conventions.md
Last active October 16, 2020 04:09
C# コーディング 規約

プロジェクト

  • プロジェクトは新しい csproj を使用し、その基本は下記とする。
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
  </PropertyGroup>
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.Net.Http.Headers;
using ProtoBuf;
namespace Inasync {
public class ProtobufInputFormatter : InputFormatter {
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
namespace Inasync {
/// <summary>
/// AdX OpenRTB に適したレスポンスにする属性。
/// </summary>
@im-kashi
im-kashi / Web.Release.config
Created February 6, 2017 04:16
Web.config 差分テンプレ
<configuration>
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<httpCookies httpOnlyCookies="true" requireSSL="true" lockItem="true" xdt:Transform="Replace" />
</system.web>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Strict-Transport-Security" value="max-age=31536000" xdt:Transform="Insert" />
</customHeaders>