For the records: I'd do it differently :-)
I'd add another contributor without replacing or changing anything.
The contributor code would be
foreach(PropertySet propSet in model.Properties)
{
propSet.Dependency.IsOptional = false;
}
Of course, to get this working you'd have to make the IsOptional
writable, but well, we welcome patches :-D
A more ellaborated version that checks for an attribute:
foreach(PropertySet propSet in model.Properties)
{
if (propSet.Property.IsDefined(typeof(MyAttribute))
{
propSet.Dependency.IsOptional = false;
}
}
Now, isn't the Microkernel extensible or what? ;-)
On 7/18/06, Ayende Rahien <[EMAIL PROTECTED]> wrote:
> The property dependencies will be satisfied iff they exists.
> But if they do not exist, they will not prevent the object from being
> created.
--
Cheers,
hammett
http://hammett.castleproject.org/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
CastleProject-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/castleproject-users