Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 public DataItem(DataItemCategory category, string dataItemType, string name, string id, Boolean writeable)
     : this(category, dataItemType, name, id)
 {
     Writable = writeable;
 }
Ejemplo n.º 3
0
 public DataItem(DataItemCategory category, DataItemType dataItemType, string name, string id)
     : this(category, dataItemType.ToString(), name, id)
 {
 }