<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : BatchInterceptor - Null Instance...</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : BatchInterceptor - Null Instance...</description>
  <pubDate>Thu, 23 May 2013 22:00:54 -700</pubDate>
  <lastBuildDate>Thu, 06 Jan 2011 14:42:21 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2415</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>BatchInterceptor - Null Instance... : It is good to know that it is...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9580#9580</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=761" rel="nofollow">as123</a><br /><strong>Subject:</strong> 2415<br /><strong>Posted:</strong> 06-Jan-2011 at 2:42pm<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; It is good to know that it is available through the VerifierContext at the end of the batch.<DIV>&nbsp;</DIV><DIV><DIV></DIV><DIV></DIV>Thanks</DIV>]]>
   </description>
   <pubDate>Thu, 06 Jan 2011 14:42:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9580#9580</guid>
  </item> 
  <item>
   <title>BatchInterceptor - Null Instance... : as123;Yes, that was done on purpose...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9579#9579</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2415<br /><strong>Posted:</strong> 06-Jan-2011 at 2:38pm<br /><br />as123;<div><br></div><div>Yes, that was done on purpose because the triggerContext and instance are already available inside the verifierContext. Here's how you can get them.</div><div><br></div><div>if(verifierContext.EndOfBatch) {</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>var verifierResult = verifierContext.VerifierResults.Last(); &nbsp;//I'm just using last as an example.</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>triggerContext = verifierResult.TriggerContext;</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>instance = verifierResult.TargetInstance;</div><div>}</div>]]>
   </description>
   <pubDate>Thu, 06 Jan 2011 14:38:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9579#9579</guid>
  </item> 
  <item>
   <title>BatchInterceptor - Null Instance... : I see. Let me find out whether...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9555#9555</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2415<br /><strong>Posted:</strong> 04-Jan-2011 at 12:40pm<br /><br />I see. Let me find out whether this was done on purpose or not. I will file a defect report and get back to you.]]>
   </description>
   <pubDate>Tue, 04 Jan 2011 12:40:50 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9555#9555</guid>
  </item> 
  <item>
   <title>BatchInterceptor - Null Instance... : The purpose is to populate some...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9552#9552</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=761" rel="nofollow">as123</a><br /><strong>Subject:</strong> 2415<br /><strong>Posted:</strong> 04-Jan-2011 at 9:58am<br /><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; The purpose is to populate some kind of Error Summary at the end of the Batch with some Context Information from the instance being validated. Since the context is available until the last verifier returns, I expected it to be available as the context for the last batch. Is there a reason it is cleaned up at the end of the batch?&nbsp;<div><br></div><div>Thanks</div>]]>
   </description>
   <pubDate>Tue, 04 Jan 2011 09:58:20 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9552#9552</guid>
  </item> 
  <item>
   <title>BatchInterceptor - Null Instance... : as123;This may or may not be set...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9545#9545</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2415<br /><strong>Posted:</strong> 04-Jan-2011 at 1:27am<br /><br />as123;<div><br></div><div>This may or may not be set to null on purpose since it's the end of batch. Could you tell me the reason why you're trying to access the instance at the end of batch and not before it?</div>]]>
   </description>
   <pubDate>Tue, 04 Jan 2011 01:27:02 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9545#9545</guid>
  </item> 
  <item>
   <title>BatchInterceptor - Null Instance... : I am using DevForce version 6.0.7....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9543#9543</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=761" rel="nofollow">as123</a><br /><strong>Subject:</strong> 2415<br /><strong>Posted:</strong> 03-Jan-2011 at 10:50pm<br /><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; I am using DevForce version 6.0.7.&nbsp;<div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;The current instance is null when&nbsp;verifierContext.EndOfBatch is true. &nbsp;In fact, I have logic to execute only when EndOfBatch is true (which I did not notice earlier), and the current instance is not available at that point.</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;I duplicated this issue in the &nbsp;sample application provided by DevForce earlier. Please let me know if you need additional information.</div><div><br></div><div>Thanks</div><div><br></div><div>Sample Code:</div><div><br></div><div>--------------</div><div>....</div><div>_mgr.VerifierEngine.BatchInterceptor = TestBatchInterceptor;</div><div>...</div><div>-----------</div><div>...</div><div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public static VerifierErrorContinuationMode TestBatchInterceptor(object currInstance, TriggerContext triggerContext, VerifierContext verifierContext)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (verifierContext.EndOfBatch)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;verifierContext.VerifierResults.Add(new VerifierResult(VerifierResultCode.Error,</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String.Format(</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "Accumulated a total of {0} error(s)",</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; verifierContext.VerifierResults.Errors.Count)));</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return VerifierErrorContinuationMode.Stop;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return VerifierErrorContinuationMode.Continue;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div></div><div><br></div>]]>
   </description>
   <pubDate>Mon, 03 Jan 2011 22:50:51 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9543#9543</guid>
  </item> 
  <item>
   <title>BatchInterceptor - Null Instance... : I couldn&amp;#039;t repro this. What...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9539#9539</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2415<br /><strong>Posted:</strong> 03-Jan-2011 at 6:28pm<br /><br />I couldn't repro this. What version are you using?]]>
   </description>
   <pubDate>Mon, 03 Jan 2011 18:28:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9539#9539</guid>
  </item> 
  <item>
   <title>BatchInterceptor - Null Instance... : In the problem scenario, the verifiers...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9538#9538</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=761" rel="nofollow">as123</a><br /><strong>Subject:</strong> 2415<br /><strong>Posted:</strong> 03-Jan-2011 at 6:20pm<br /><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; In the problem scenario, the verifiers were triggered by Setters (AfterSet).&nbsp;]]>
   </description>
   <pubDate>Mon, 03 Jan 2011 18:20:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9538#9538</guid>
  </item> 
  <item>
   <title>BatchInterceptor - Null Instance... : as123;Are you calling the verifier...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9537#9537</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2415<br /><strong>Posted:</strong> 03-Jan-2011 at 6:18pm<br /><br />as123;<div><br></div><div>Are you calling the verifier with VerifierEngine.Execute method or are you triggering the verifier with the property set method?</div>]]>
   </description>
   <pubDate>Mon, 03 Jan 2011 18:18:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9537#9537</guid>
  </item> 
  <item>
   <title>BatchInterceptor - Null Instance... : The instance being passed to VerifierBatchInterceptor...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9535#9535</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=761" rel="nofollow">as123</a><br /><strong>Subject:</strong> 2415<br /><strong>Posted:</strong> 03-Jan-2011 at 6:04pm<br /><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;The instance being passed to VerifierBatchInterceptor delegate is always null (found while debugging) even though the verifier is having the proper Instance passed. &nbsp;Is there anything I need to do to populate it?&nbsp;<div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;I am setting the BatchInterceptor delegate method to the corresponding property in VeriferEngine, and the BatchInteceptor method is called correctly, &nbsp;but only the VerifierContext is set.&nbsp;</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Any idea what might be going on here?</div><div><br></div><div>Thanks</div><div><br></div>]]>
   </description>
   <pubDate>Mon, 03 Jan 2011 18:04:23 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2415&amp;PID=9535#9535</guid>
  </item> 
 </channel>
</rss>