/// <summary> /// Constructs a new trigger information object with the given name, /// the name of the table on which it is attached and the event /// at which it should be fired. /// </summary> /// <param name="triggerName">The fully qualified name of the trigger.</param> /// <param name="eventType">The modification event on the given table at which to /// fire the trigger.</param> /// <param name="triggerType">The type of trigger.</param> /// <param name="tableName">The fully qualified name of the table on which to attach /// the trigger.</param> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="triggerName"/> is <c>null</c> /// </exception> public TriggerInfo(ObjectName triggerName, TriggerType triggerType, TriggerEventType eventType, ObjectName tableName) { if (triggerName == null) throw new ArgumentNullException("triggerName"); if (triggerType == TriggerType.Callback && tableName != null) throw new ArgumentException("A CALLBACK TRIGGER cannot define any table to be attached to."); TriggerName = triggerName; EventType = eventType; TableName = tableName; TriggerType = triggerType; Body = new TriggerBody(this); }
/// <summary> /// Constructs a new trigger information object with the given name, /// the name of the table on which it is attached and the event /// at which it should be fired. /// </summary> /// <param name="triggerName">The fully qualified name of the trigger.</param> /// <param name="eventType">The modification event on the given table at which to /// fire the trigger.</param> /// <param name="triggerType">The type of trigger.</param> /// <param name="tableName">The fully qualified name of the table on which to attach /// the trigger.</param> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="triggerName"/> is <c>null</c> /// </exception> public TriggerInfo(ObjectName triggerName, TriggerType triggerType, TriggerEventType eventType, ObjectName tableName) { if (triggerName == null) { throw new ArgumentNullException("triggerName"); } if (triggerType == TriggerType.Callback && tableName != null) { throw new ArgumentException("A CALLBACK TRIGGER cannot define any table to be attached to."); } TriggerName = triggerName; EventType = eventType; TableName = tableName; TriggerType = triggerType; Arguments = new List <SqlExpression>(); Body = new TriggerBody(this); }