public DataItem(DataItemCategory category, string dataItemType, string name, string id) : this(new PropertyCollection()) { OpenNETCF.Validate .Begin() .IsNotNullOrEmpty(dataItemType) .IsNotNullOrEmpty(name) .IsNotNullOrEmpty(id) .Check(); this.Category = category; switch (category) { case DataItemCategory.Sample: ValueType = typeof(double); break; case DataItemCategory.Condition: throw new NotSupportedException(); case DataItemCategory.Event: // TODO: ValueType = typeof(object); break; } this.Type = dataItemType.ToUpper(); this.Name = name; this.ID = id; }
public DataItem(DataItemCategory category, string dataItemType, string name, string id, Boolean writeable) : this(category, dataItemType, name, id) { Writable = writeable; }
public DataItem(DataItemCategory category, DataItemType dataItemType, string name, string id) : this(category, dataItemType.ToString(), name, id) { }