From: Eric C. <ecr...@us...> - 2006-09-20 17:00:47
|
User: ecrutchfield Date: 06/09/20 10:00:44 Modified: andromda-aspdotnet/src/main/resources/templates/aspdotnet sessionObject.cs.vsl Log: make Serializable, don't create public properties for attributes unless they're marked public, apply standard private attribute naming conventions Revision Changes Path 1.2 +25 -6 cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/sessionObject.cs.vsl Index: sessionObject.cs.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-aspdotnet/src/main/resources/templates/aspdotnet/sessionObject.cs.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- sessionObject.cs.vsl 17 Sep 2006 17:30:50 -0000 1.1 +++ sessionObject.cs.vsl 20 Sep 2006 17:00:41 -0000 1.2 @@ -6,25 +6,44 @@ /// <summary> ${sessionObject.getDocumentation(" /// ")} /// </summary> + [Serializable] public class ${sessionObject.name} { + #region Private attributes #foreach($attribute in ${sessionObject.attributes}) - private ${attribute.type.fullyQualifiedName} ${attribute.name}; +#set($vis = $attribute.visibilty) +#if(!$vis.equalsIgnoreCase("public")) +#set($vis = "private") #end + $vis ${attribute.type.fullyQualifiedName} _${attribute.name}; +#end + #endregion + + #region Constructor(s) public ${sessionObject.name}() {} ${sessionObject.constructorSignature} { #foreach($attribute in ${sessionObject.attributes}) - this.${attribute.name} = ${attribute.name}; + this._${attribute.name} = ${attribute.name}; #end } + #endregion + + #region Properties #foreach($attribute in ${sessionObject.attributes}) - public ${attribute.type.fullyQualifiedName} $stringUtils.capitalize(${attribute.name}) +#if($attribute.visibility.equalsIgnoreCase("public")) + /// <summary> +$attribute.getDocumentation(" /// "); + /// </summary> + $attribute.visibility ${attribute.type.fullyQualifiedName} $stringUtils.capitalize(${attribute.name}) { - get { return this.${attribute.name};} - set { this.${attribute.name} = value;} + get { return this._${attribute.name};} + set { this._${attribute.name} = value;} } + +#end #end + #endregion } } \ No newline at end of file |