blog
I am recently in vacation in New Zealand - Auckland.
I ll anwer all the question regarding SmartCodeGenerator and SmartMassEmail
as soon as I can make some time.
Thankyou for your understanding.
Shahed Khan
SmartCodeGenerator Implements Asp.Net ProviderPattern and DBSchemaProvider class comes with the following signature.public abstract class DBSchemaProvider : ProviderBase { // Methods protected DBSchemaProvider(); public abstract ParameterSchemaCollection GetCommandParameters(Comman... command); public abstract CommandResultSchemaCollection GetCommandResultSchemas(Com... command); public abstract CommandSchemaCollection GetCommands(DatabaseSchema database); public abstract string GetCommandText(CommandSchema ......
Last couple of days I was busy writing the DBSchemaProvider for SmartCodeGenerator. I have kept the provider signature very similiar to CodeSmiths SchemaExplorer. As a result the current SchemaProviders that available for CodeSmith can be incorporated with SmartCodeGenerator with very minor changes. I already converted The SchemaProviders for MYSQL and Native Oracle and this will ship with the next release CTP2.2. Here is the signature for SmartCodeGenerator.DBSchema... : public abstract ParameterSchemaCollection ......
SmartCodegenerator CTP 2.1 includes 3 new UIProperties and now supports enum, StringCollection and ScMandatoryString.You will notice the following additional nodes in the PropertyAndPropertyMaps.xml file. <PropertyTypeAndUIProper... <PropertyType>ScEnum&... <PropertyUI>ScEnumUIP... <PropertyType>SmartCo... ......
While trying to set value for enum via Reflection I discovered .Net2.0 is much smarter in setting values.In .Net2.0 the following works: Int32 property = int.Parse("20");if (propertyInfo.CanWrite){ this.propertyInfo.SetValue(... property, null);} but this same code as above will not work in .Net1.1 and will throw a cast exception. Here is the workaround for .Net1.1, where we explicitly do Enum.ToObject(...) . ie.object property = int.Parse("20");object newEnumValue = Enum.ToObject(propertyInfo.... ......
This came up when I was writing a UIProperty for SmartCodeGenerator, The combo box should display all the available enum options in a DropDownList for the enduser to choose from them.So if someone defines a enum like this:public enum MyEnum{ ten = 10, twenty = 20 , thirty = 30}and a class using the enum as one of its property, ie. public class TheProperties{ public TheProperties( ) { //Please Assign Default Values here this.myVar = MyEnum.twenty; } private MyEnum testEnumProp; public MyEnum TestEnumProp ......
I have uploaded this SmartCodeGenerator Template that generates a csharp class, that implements IClonable, IDictionary. This SCG Template can be downloaded here. Here is a sample output: // ===========================... Generated by SmartCodeGenerator. // // website www.smartcodegenerator.com, email shahed.khan@gmail.com// ===========================... using System;using System.Collections; ......
I have uploaded the MandatoryStringUIProperty at community.smartcodegenerato... and is available to download.This UIProperty will force user to enter text in the textbox. To Include this UIProperty in your project please follow these steps:=====================... Copy the files ScMandatoryStringUIProperty... and ScMandatoryStringUIProperty... your Projectcs PropertyControls folder. Step2: Copy the file ScMandatoryStringProperty.cs in ......
I uploaded a new SCG Temple which generates class that implements the following interfacesIDictionary, ICollection, IEnumerable, ICloneableAnd Hashtable methods.This Example has same output as Codesmith template file "CSHashtable.cst":Example:p... class TestClass : IDictionary, ICollection, IEnumerable, ICloneable{}This template is avaialble to download from smartcodegenerator community site.http://community.smart... ......
This link describes the regular expression class that parses asp.nethttp://msdn.microsof... Regular Expression Classes AspCodeRegex Class Provides a regular expression to parse an ASP.NET code block. AspExprRegex Class Provides a regular expression to parse an ASP.NET expression block. CommentRegex Class Provides a regular expression to parse an ASP.NET comment block. DatabindExprRegex Class Provides a regular expression to parse an ASP.NET data-binding expression. DirectiveRegex ......
Good News for the Vb.Net developers.I recently added VSTemplate for VBVSTemplate: SCGCTP2.0vstemplateVbDotnet2 So you can start writing templates in Vb.Net as well.To work with Visualstudio2005TemplatesVb ===========================... SmartCodeGeneratorVb.zip from Visualstudio2005_Templates folder to your My Documents\Visual Studio 2005\Templates\ProjectTempl... folder.Copy SmartCodeGeneratorTemplateV... from Visualstudio2005_Templates to your My Documents\Visual Studio 2005\Templates\ItemTemplates ......
The current downloads upto CTP2.0 ships with only 4 UIProperty for the .Net types (int, string, boolean and ScSqlTablesProperty) but it is very easy to introduce your own UIProperty for any .Net Types. Lets jump into writing one:UIProperty: UIProperty is User Interface that is automatically generated in the web page during the Template Generation process. When you declare a property in TheProperties class a User interface to collect data from the user is automatically generated for you. For example ......
I am glad to inform the release of SmartCodeGenerator CTP 2.0 in both .Net1.1 and .Net2.0. As a result Templates can be generated both in VS2003 and VS2005. Please download from Codeplex:http://www.codeple... Notes:1. I am not using the Asp.Net Profile object in the core api to generate user interface, instead introduced a Custom class "TheProperties". Please refer to tutorials at www.smartcodegenerator.com for more details.There are some other changes made to ......