<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shiba-yan</author_name>
  <author_url>https://blog.hatena.ne.jp/shiba-yan/</author_url>
  <blog_title>しばやん雑記</blog_title>
  <blog_url>https://blog.shibayan.jp/</blog_url>
  <categories>
    <anon>ASP.NET</anon>
    <anon>SignalR</anon>
  </categories>
  <description>ASP.NET MVC の場合は非同期コントローラを使っていましたが、SignalR では特に何もせずにメソッドを非同期で実行できるようになっています。仕組みは簡単、Task/Task をメソッドの結果として返してあげるだけです。 public Task&lt;IEnumerable&lt;string&gt;&gt; GetValues() { return Task.Factory.StartNew(() =&gt; { Thread.Sleep(5000); return (IEnumerable&lt;string&gt;)new[] { &quot;ほげほげ&quot;, &quot;ふがふが&quot;, &quot;はうはう&quot; }; }); } 5 秒待ってから値を返す…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.shibayan.jp%2Fentry%2F20120314%2F1331731597&quot; title=&quot;SignalR で非同期な処理を実行する - しばやん雑記&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>2012-03-14 22:26:37</published>
  <title>SignalR で非同期な処理を実行する</title>
  <type>rich</type>
  <url>https://blog.shibayan.jp/entry/20120314/1331731597</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
