Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inconsistency in mmRole.cs
Message
 
To
06/01/2005 18:01:50
Max Fillmore
Essential Skills, Inc.
Lenexa, Kansas, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00974877
Message ID:
00977039
Views:
38
Max,

>In the constructor of mmRoleRules you don't do this but simply assume that the user will stick with the single string value:
>
> mmRole oRole = (mmRole)hostObject;
> this.AddRequiredField(oRole.DescriptionField);
>
>This might be fairly trivial for the experienced but wouldn't it be better to maintain consistent usage between these two related objects?

I've changed the code in the mmRoleRules constructor to the following:
public mmRoleRules(ImmBusinessRuleHost hostObject) : base(hostObject)
{
	mmRole oRole = (mmRole)hostObject;
	if (!mmString.Empty(oRole.DescriptionField))
	{
		this.AddRequiredField(oRole.DescriptionField);
	}
	else
	{
		if (oRole.DescriptionFields != null && oRole.DescriptionFields.Length > 0)
		{
			foreach (string DescField in oRole.DescriptionFields)
			{
				this.AddRequiredField(DescField);
			}
		}
	}
}
Thanks,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform