Example #1
0
        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);
            }
        }
Example #2
0
		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;
			}
		}