<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>cookie30000</author_name>
  <author_url>https://blog.hatena.ne.jp/cookie30000/</author_url>
  <blog_title>個人的備忘録</blog_title>
  <blog_url>https://cookie40000.hatenablog.com/</blog_url>
  <categories>
    <anon>.Net</anon>
    <anon>C#</anon>
  </categories>
  <description>拡張メソッドを利用してインタフェースに実装をもたせる場合、インタフェースが公開しているもの以外の状態は利用できない。 が、ConditionalWeakTableを利用することでそれに近いことが実現できる。 class Parameter { public string str { get; set; } } interface IExtensible { } static class Extensions { static ConditionalWeakTable&lt;IExtensible, Parameter&gt; state = new ConditionalWeakTable&lt;IExtens…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcookie40000.hatenablog.com%2Fentry%2F2016%2F04%2F04%2F220228&quot; title=&quot;ConditionalWeakTableを利用して拡張メソッドに状態を持たせる - 個人的備忘録&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-04-04 22:02:28</published>
  <title>ConditionalWeakTableを利用して拡張メソッドに状態を持たせる</title>
  <type>rich</type>
  <url>https://cookie40000.hatenablog.com/entry/2016/04/04/220228</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
