<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shikaku_sh</author_name>
  <author_url>https://blog.hatena.ne.jp/shikaku_sh/</author_url>
  <blog_title>sh1’s diary</blog_title>
  <blog_url>https://shikaku-sh.hatenablog.com/</blog_url>
  <categories>
    <anon>C#</anon>
    <anon>PRISM</anon>
    <anon>プログラミング</anon>
    <anon>WPF</anon>
  </categories>
  <description>使い方の例 参考 DI コンテナを利用しているプロジェクトで、リソースを破棄する処理をしようと思ったとき、CompositeDisposable を利用するという選択肢があります。 Window を閉じて終了するとき、Window の情報の〇〇を保存する アプリを終了するとき、ゲームの情報の△△を保存する こういう感じの終了処理はよくあるんですが、どこにコードを書いておくのかで悩むところ。コードの場所が散らばって、タイミングがズレてしまったりしても好ましくない。 CompositeDisposable を利用すると、あらかじめ登録しておいた Dispose メソッドの処理をまとめて実行すること…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshikaku-sh.hatenablog.com%2Fentry%2Fc-sharp-combination-of-di-and-compositedisposable&quot; title=&quot;C# DI コンテナと CompositeDisposable の組み合わせ - sh1’s diary&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>https://cdn-ak.f.st-hatena.com/images/fotolife/s/shikaku_sh/20210823/20210823173353.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-07-19 17:47:27</published>
  <title>C# DI コンテナと CompositeDisposable の組み合わせ</title>
  <type>rich</type>
  <url>https://shikaku-sh.hatenablog.com/entry/c-sharp-combination-of-di-and-compositedisposable</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
