/// <summary>
 /// Instantiates a build script object in the given error state.
 /// </summary>
 /// <remarks>
 /// The instance created by this constructor represents a build script that was determined
 /// to be invalid even before the script content was parsed.  This usually happens when the
 /// script repository encounters a problem.
 /// </remarks>
 /// <param name="scriptObject">The identifier of the database object.</param>
 /// <param name="error">The error that was encountered for this script.</param>
 public ScriptFile(DatabaseObject scriptObject, BuildErrorBase error)
 {
     if (scriptObject is TypedDatabaseObject)
     {
         ScriptObject = (TypedDatabaseObject)scriptObject;
     }
     else
     {
         ScriptObject = new TypedDatabaseObject(scriptObject.ServerName, scriptObject.DatabaseName, scriptObject.SchemaName, scriptObject.ObjectName, DatabaseObjectType.Type);
     }
     ScriptError = error;
 }
Beispiel #2
0
        /// <summary>
        /// Marks this build item as having entered an error state.
        /// </summary>
        /// <remarks>
        /// Calling this method will update the <see cref="Status"/> and <see cref="Error"/> properties.
        /// </remarks>
        /// <param name="error">The error state of the build item.</param>
        internal void ReportError(BuildErrorBase error)
        {
            var oldStatus = _status;

            this._status = error.Status;
            this._error  = error;

            if (StatusChanged != null)
            {
                StatusChanged(this, new BuildStatusEventArgs(this._status, oldStatus));
            }
        }
Beispiel #3
0
 /// <summary>
 /// Instantiates a build script object in the given error state.
 /// </summary>
 /// <remarks>
 /// The instance created by this constructor represents a build script that was determined 
 /// to be invalid even before the script content was parsed.  This usually happens when the 
 /// script repository encounters a problem.
 /// </remarks>
 /// <param name="scriptObject">The identifier of the database object.</param>
 /// <param name="error">The error that was encountered for this script.</param>
 public ScriptFile(DatabaseObject scriptObject, BuildErrorBase error)
 {
     if (scriptObject is TypedDatabaseObject)
     {
         ScriptObject = (TypedDatabaseObject)scriptObject;
     }
     else
     {
         ScriptObject = new TypedDatabaseObject(scriptObject.ServerName, scriptObject.DatabaseName, scriptObject.SchemaName, scriptObject.ObjectName, DatabaseObjectType.Type);
     }
     ScriptError = error;
 }
Beispiel #4
0
        /// <summary>
        /// Marks this build item as having entered an error state.
        /// </summary>
        /// <remarks>
        /// Calling this method will update the <see cref="Status"/> and <see cref="Error"/> properties.
        /// </remarks>
        /// <param name="error">The error state of the build item.</param>
        internal void ReportError(BuildErrorBase error)
        {
            var oldStatus = _status;
            this._status = error.Status;
            this._error = error;

            if (StatusChanged != null)
            {
                StatusChanged(this, new BuildStatusEventArgs(this._status, oldStatus));
            }
        }