Example #1
0
        /// <summary>
        /// Gets the binary file response message when entity not exists.
        /// </summary>
        /// <param name="binaryFileActionType">Type of the binary file action.</param>
        /// <param name="id">The id.</param>
        /// <param name="entityName">Name of the entity.</param>
        /// <returns>a new instance of <see cref="BinaryFileResponseMessage"/></returns>
		public static BinaryFileResponseMessage GetBinaryFileResponseMessageWhenEntityNotExists(
            BinaryFileActionTypes binaryFileActionType
            , string id
            , string entityName)
        {
            BinaryFileResponseMessage _retval = new BinaryFileResponseMessage();

            _retval.IsBinaryFileActionSuccess = false;
            _retval.BinaryFileActionType = binaryFileActionType;
            _retval.ActionLogs = new string[] { string.Format("Entity of Identifier {0} in {1} not exists", id, entityName) };

            return _retval;
        }
        /// <summary>
        /// Gets the binary file response message when entity not exists.
        /// </summary>
        /// <param name="binaryFileActionType">Type of the binary file action.</param>
        /// <param name="id">The id.</param>
        /// <param name="entityName">Name of the entity.</param>
        /// <returns>a new instance of <see cref="BinaryFileResponseMessage"/></returns>
        public static BinaryFileResponseMessage GetBinaryFileResponseMessageWhenEntityNotExists(
            BinaryFileActionTypes binaryFileActionType
            , string id
            , string entityName)
        {
            BinaryFileResponseMessage _retval = new BinaryFileResponseMessage();

            _retval.IsBinaryFileActionSuccess = false;
            _retval.BinaryFileActionType      = binaryFileActionType;
            _retval.ActionLogs = new string[] { string.Format("Entity of Identifier {0} in {1} not exists", id, entityName) };

            return(_retval);
        }
        /// <summary>
        /// Gets the binary file response message when database failed.
        /// </summary>
        /// <param name="binaryFileActionType">Type of the binary file action.</param>
        /// <param name="id">The id.</param>
        /// <param name="entityName">Name of the entity.</param>
        /// <param name="message">The message.</param>
        /// <returns>a new instance of <see cref="BinaryFileResponseMessage"/></returns>
        public static BinaryFileResponseMessage GetBinaryFileResponseMessageWhenDatabaseFailed(
            BinaryFileActionTypes binaryFileActionType
            , string id
            , string entityName
            , string message)
        {
            BinaryFileResponseMessage _retval = new BinaryFileResponseMessage();

            _retval.IsBinaryFileActionSuccess = false;
            _retval.BinaryFileActionType      = binaryFileActionType;
            _retval.ActionLogs = new string[] { string.Format("Database failed when Entity of Identifier {0} in {1}, Details: {2}", id, entityName, message) };

            return(_retval);
        }
Example #4
0
        /// <summary>
        /// Gets the binary file response message when database failed.
        /// </summary>
        /// <param name="binaryFileActionType">Type of the binary file action.</param>
        /// <param name="id">The id.</param>
        /// <param name="entityName">Name of the entity.</param>
        /// <param name="message">The message.</param>
        /// <returns>a new instance of <see cref="BinaryFileResponseMessage"/></returns>
        public static BinaryFileResponseMessage GetBinaryFileResponseMessageWhenDatabaseFailed(
            BinaryFileActionTypes binaryFileActionType
            , string id
            , string entityName
            , string message)
        {
            BinaryFileResponseMessage _retval = new BinaryFileResponseMessage();

            _retval.IsBinaryFileActionSuccess = false;
            _retval.BinaryFileActionType = binaryFileActionType;
            _retval.ActionLogs = new string[] { string.Format("Database failed when Entity of Identifier {0} in {1}, Details: {2}", id, entityName, message) };

            return _retval;
        }