<?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 : Generic Emtpy Guid Verifier</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Generic Emtpy Guid Verifier</description>
  <pubDate>Wed, 10 Jun 2026 17:39:54 -700</pubDate>
  <lastBuildDate>Fri, 03 Sep 2010 06:53:22 -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=2115</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>Generic Emtpy Guid Verifier : Thanks!  That really helped....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2115&amp;PID=8333#8333</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=916" rel="nofollow">BringerOD</a><br /><strong>Subject:</strong> 2115<br /><strong>Posted:</strong> 03-Sep-2010 at 6:53am<br /><br />Thanks!<DIV>&nbsp;</DIV><DIV>That really helped.</DIV>]]>
   </description>
   <pubDate>Fri, 03 Sep 2010 06:53:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2115&amp;PID=8333#8333</guid>
  </item> 
  <item>
   <title>Generic Emtpy Guid Verifier : Hi Bryan;I agree that the Verification...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2115&amp;PID=8329#8329</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> 2115<br /><strong>Posted:</strong> 02-Sep-2010 at 5:49pm<br /><br />Hi Bryan;<div><br></div><div>I agree that the Verification chapter needs some work. We have made that a priority to improve the Wiki in the next few months.</div><div><br></div><div>As for your question, instead of creating a DelegateVerifier, we should use a PropertyValueVerifier abstract class to create the generic GUID.Empty verifier. The PropertyValueVerifier abstract class is useful when you need to create a custom verifier when comparing objects or values. You can refer to our API Documentation --&gt; IdeaBlade.Validation namespace for more useful Verifier classes.</div><div><br></div><div>Here's the code to create your generic GUID.Empty verifier:</div><div><br></div><div>private static Verifier CheckForGUIDEmptyVerifier(Type entityType, string propertyName) {</div><div>&nbsp;&nbsp; &nbsp; &nbsp;Verifier v = new GUIDEmptyVerifier(entityType, propertyName);</div><div>&nbsp;&nbsp; &nbsp; &nbsp;v.VerifierArgs.ErrorMessageInfo.ErrorMessage =&nbsp;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;String.Format("{0} cannot be blank", propertyName);</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;return v;</div><div>&nbsp;&nbsp; &nbsp;}</div><div>&nbsp;&nbsp; &nbsp;</div><div>&nbsp;&nbsp; &nbsp;public class GUIDEmptyVerifier : PropertyValueVerifier {</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;public GUIDEmptyVerifier(Type pType, String propertyName, String displayName = null, bool? shouldTreatEmptyStringAsNull = null)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;: base(new PropertyValueVerifierArgs(pType, propertyName, false, displayName, shouldTreatEmptyStringAsNull)) {</div><div>&nbsp;&nbsp; &nbsp; &nbsp;}</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;protected override VerifierResult VerifyValue(object itemToVerify, object valueToVerify,</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;TriggerContext triggerContext, VerifierContext verifierContext) {</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;var aGUID = (Guid)valueToVerify;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;var result = (aGUID != Guid.Empty);</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return new VerifierResult(result);</div><div>&nbsp;&nbsp; &nbsp; &nbsp;}</div><div>&nbsp;&nbsp; &nbsp;}&nbsp;</div>]]>
   </description>
   <pubDate>Thu, 02 Sep 2010 17:49:13 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2115&amp;PID=8329#8329</guid>
  </item> 
  <item>
   <title>Generic Emtpy Guid Verifier : This is how far I got.  Just...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2115&amp;PID=8322#8322</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=916" rel="nofollow">BringerOD</a><br /><strong>Subject:</strong> 2115<br /><strong>Posted:</strong> 01-Sep-2010 at 9:42pm<br /><br />This is how far I got.<DIV>&nbsp;</DIV><DIV>Just not sure how to get the property to validate.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>public</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>static</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>class</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>VerifierHelper</P></FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P>{</P><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>private</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>static</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Verifier</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> GuidCannotBeEmpty(</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>EntityProperty</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> pEntityProperty)</DIV><P>{</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>string</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> description = pEntityProperty.PropertyInfo.Name + </FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>" cannot be blank."</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>;</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> verifier = </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>new</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>DelegateVerifier</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&lt;</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>EntityBase</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&gt;(description, GuidCannotBeEmptyCondition);</P><P>verifier.AddTriggers(pEntityProperty.Name);</P><P>verifier.VerifierOptions.ExecutionModes = </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>VerifierExecutionModes</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.InstanceAndOnAfterSetTriggers;</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>return</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> verifier;</P><P>}</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>private</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>static</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>VerifierResult</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> GuidCannotBeEmptyCondition(</P><P></FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>EntityBase</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> entityBase, </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>TriggerContext</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> pTriggerContext, </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>VerifierContext</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> pVerifierContext)</P><P>{</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>if</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> (pTriggerContext != </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>null</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> &amp;&amp;</P><P></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>pTriggerContext.Timing == </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>TriggerTiming</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.BeforeSet)</P><P>{</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>throw</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>new</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>VerifierException</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>(</FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>"Verifier not implemented for Preset"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>);</P><P>}</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>return</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>new</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>VerifierResult</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>(?????);</P><P>}</P><P>}</P></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Wed, 01 Sep 2010 21:42:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2115&amp;PID=8322#8322</guid>
  </item> 
  <item>
   <title>Generic Emtpy Guid Verifier : Can someone help me make a generic...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2115&amp;PID=8321#8321</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=916" rel="nofollow">BringerOD</a><br /><strong>Subject:</strong> 2115<br /><strong>Posted:</strong> 01-Sep-2010 at 9:39pm<br /><br />Can someone help me make a generic verifier that checks a Guid to see if its equal to Guid.Empty?<DIV>&nbsp;</DIV><DIV>I am not getting how to write these yet.&nbsp; They don't make alot of sense to me.</DIV><DIV>&nbsp;</DIV><DIV>I can see how to make one for a specific entity type.</DIV><DIV>&nbsp;</DIV><DIV>The whole process is very complicated for someone who is new to DevForce.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>I have read the documentation 3 times now.</DIV><DIV>&nbsp;</DIV><DIV>Bryan</DIV>]]>
   </description>
   <pubDate>Wed, 01 Sep 2010 21:39:28 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2115&amp;PID=8321#8321</guid>
  </item> 
 </channel>
</rss>