private void AddConnectionToConnections(Connection connection) { if (Connections.All(c => c.Name != connection.Name)) { Connections = new List<Connection>(Connections) { connection }; } }
void ValidateEntityConnections() { foreach (var entity in Entities.Where(entity => Connections.All(c => c.Name != entity.Connection))) { Error("The {0} entity references an invalid connection: {1}.", entity.Name, entity.Connection); } }
void PreValidateDefaultConnection(string name) { if (Connections.All(c => c.Name != name)) { this.Connections.Add(this.GetDefaultOf <Connection>(c => { c.Name = name; })); } }
private void ModifyDefaultConnection(string name) { if (Connections.All(c => c.Name != name)) { this.Connections.Add(this.GetDefaultOf <TflConnection>(c => { c.Name = name; })); } }
private void AddConnectionToConnections(Subscription subscription) { if (Connections.All(c => c.Name != subscription.Name)) { Connections = new List <Subscription>(Connections) { subscription }; } }
void PreValidateDefaultOutput() { if (Connections.All(c => c.Name != "output")) { Connections.Add(this.GetDefaultOf <Connection>(c => { c.Name = "output"; c.Provider = "internal"; })); } }
private void ModifyDefaultOutput() { if (Connections.All(c => c.Name != "output")) { Connections.Add(this.GetDefaultOf <TflConnection>(c => { c.Name = "output"; c.Provider = "internal"; })); } }
protected override void Validate() { if (Connections.Count < 2) { Error("You need at least two connections defined; one named 'input', and one named 'output.'"); } if (Connections.All(c => c.Name != "input")) { Error("Please define an input named 'input.'"); } if (Connections.All(c => c.Name != "output")) { Error("Please define an input named 'output.'"); } }
protected override void Validate() { if (Connections.Count < 2) { Error("You need at least two connections; and input, and an output."); } if (Connections.All(c => c.Name != "input")) { Error("Please define an input connection named input."); } if (Connections.All(c => c.Name != "output")) { Error("Please define an output connection named output."); } }
void ValidateLogConnections() { if (Log.Count <= 0) { return; } foreach (var log in Log.Where(log => log.Connection != Constants.DefaultSetting).Where(log => Connections.All(c => c.Name != log.Connection))) { Error(string.Format("Log {0}'s connection {1} doesn't exist.", log.Name, log.Connection)); } }
void ValidateActionConnections() { foreach (var action in Actions.Where(action => action.Connection != string.Empty).Where(action => Connections.All(c => c.Name != action.Connection))) { Error("The {0} action references an invalid connection: {1}.", action.Name, action.Connection); } }
void ValidateTemplateActionConnections() { foreach (var action in Templates.SelectMany(template => template.Actions.Where(a => a.Connection != string.Empty).Where(action => Connections.All(c => c.Name != action.Connection)))) { Error("The {0} template action references an invalid connection: {1}.", action.Name, action.Connection); } }
void ValidateMapConnections() { foreach (var map in Maps.Where(m => m.Query != string.Empty).Where(map => Connections.All(c => c.Name != map.Connection))) { Error("The {0} map references an invalid connection: {1}.", map.Name, map.Connection); } }