public EntityType(string entityTypeName, string domainParentName = @"", string connectionStringName = @"", string storageType = @"BlobStream", ProjectionDefinitions projectionDefinitions = null, ClassifierDefinitions classifierDefinitions = null, EventTypes eventTypes = null, IdentifierGroupDefinitions identifierGroupDefinitions = null) { _entityTypeName = entityTypeName; if (!string.IsNullOrWhiteSpace(connectionStringName)) { _connectionStringName = connectionStringName; } else { // make a default connection string to use _connectionStringName = ConnectionStringNameAttribute.DefaultConnectionStringName(domainParentName, entityTypeName); } if (!string.IsNullOrWhiteSpace(storageType)) { _storageType = storageType; } if (null == projectionDefinitions) { _projectionDefinitions = new ProjectionDefinitions(); } else { _projectionDefinitions = projectionDefinitions; } if (null == classifierDefinitions) { _classifierDefinitions = new ClassifierDefinitions(); } else { _classifierDefinitions = classifierDefinitions; } if (null == eventTypes) { _eventTypes = new EventTypes(); } else { _eventTypes = eventTypes; } if (null == identifierGroupDefinitions) { _identifierGroupDefinitions = new IdentifierGroupDefinitions(); } else { _identifierGroupDefinitions = identifierGroupDefinitions; } }
/// <summary> /// Add a classifier definition to the collection /// </summary> add /// <returns></returns> public static ClassifierDefinitions Add(this ClassifierDefinitions classifierDefinitions, ClassifierDefinition classifierDefinitionToAdd) { classifierDefinitions.AddClassifierDefinition(classifierDefinitionToAdd); return(classifierDefinitions); }