public static ITag NewTag(string type) { switch (type) { case "Digital": TagDigital tagDigital = new TagDigital(); return(tagDigital); case "Analog": TagAnalog tagAnalog = new TagAnalog(); return(tagAnalog); case "Sql": TagSql tagSql = new TagSql(); return(tagSql); default: return(null); } }
public static ITag NewTag(string type) { switch (type) { case "Digital": TagDigital tagDigital = new TagDigital(); return tagDigital; case "Analog": TagAnalog tagAnalog = new TagAnalog(); return tagAnalog; case "Sql": TagSql tagSql = new TagSql(); return tagSql; default: return null; } }