public PartitionTrendDataDictionaryBuilder(IList<INamedEntity> namedEntities,
     PartitionDataType partitionDataType)
 {
     _namedEntities = namedEntities;
     InitDictionary();
     InitGetDataMethod(partitionDataType);
 }
        public TraceRecordAzureTableMetadata(
            Type type,
            PartitionDataType dataType,
            string tableName,
            string eventType,
            TaskName taskName)
        {
            Assert.IsNotNull(tableName, "tableName != null");
            Assert.IsNotNull(eventType, "eventType != null");

            this.Type = type;
            this.PartitionDataType = dataType;

            // This is the current Schema used by the Uploader. Be careful as it can change.
            this.PartitionKeyDetail = taskName + "." + eventType;
            this.TableName          = tableName;
            this.EventType          = eventType;
            this.TaskName           = taskName;
        }
        public TraceRecordAzureTableMetadata(
            Type type,
            PartitionDataType dataType,
            string partitionKeyDetails,
            string tableName,
            string eventType,
            TaskName taskName)
        {
            Assert.IsNotNull(partitionKeyDetails, "partitionKeyDetails != null");
            Assert.IsNotNull(tableName, "tableName != null");
            Assert.IsNotNull(eventType, "eventType != null");

            this.Type = type;
            this.PartitionDataType  = dataType;
            this.PartitionKeyDetail = partitionKeyDetails;
            this.TableName          = tableName;
            this.EventType          = eventType;
            this.TaskName           = taskName;
        }
 private void InitGetDataMethod(PartitionDataType partitionDataType)
 {
     switch (partitionDataType)
     {
         case PartitionDataType.Age:
             _getDataMethod = GetDataByAge;
             break;
         case PartitionDataType.Sex:
             _getDataMethod = GetDataBySex;
             break;
         case PartitionDataType.Category:
             _getDataMethod = GetDataByCategory;
             break;
     }
 }