예제 #1
0
        /// <summary>
        /// Returns erorr logs by criteria
        /// </summary>
        /// <param name="criteria">The criteria</param>
        /// <param name="skip">Number of records to skip</param>
        /// <param name="take">Number of records to take</param>
        /// <remarks>Give a negative number to either skip or take, retrieves all records found</remarks>
        public static ErrorLog[] GetErrorLogs(TransactionModelContainer container, Predicate<ErrorLog>[] criteria, int skip = 0, int take = 1)
        {
            var errorLogs = new ErrorLog[0];

            int i = 1;
            if (i == 1)
            {
                throw new NotImplementedException("THIS METHOD IS NOT IMPLEMENTED YET");
            }

            return errorLogs;
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the ErrorLogs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToErrorLogs(ErrorLog errorLog)
 {
     base.AddObject("ErrorLogs", errorLog);
 }
예제 #3
0
        /// <summary>
        /// Logs an occurring error to the system. The log will actually create after a SaveChanges call.
        /// </summary>
        /// <param name="issuedBy">Issuer</param>
        /// <param name="issuedMsg">Message to log</param>
        /// <param name="severity">Severity (default = LOW)</param>
        /// <remarks>container.SaveChanges is required</remarks>
        public static ErrorLog LogsError(TransactionModelContainer container, string issuedBy, string issuedMsg,
            SeverityEnum severity = SeverityEnum.LOW)
        {
            var log = new ErrorLog(issuedBy, issuedMsg, severity);
            container.ErrorLogs.AddObject(log);

            return log;
        }
 /// <summary>
 /// Create a new ErrorLog object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="issuedBy">Initial value of the IssuedBy property.</param>
 /// <param name="issuedDate">Initial value of the IssuedDate property.</param>
 /// <param name="issuedMessage">Initial value of the IssuedMessage property.</param>
 /// <param name="severity">Initial value of the Severity property.</param>
 /// <param name="version">Initial value of the Version property.</param>
 public static ErrorLog CreateErrorLog(global::System.Int64 id, global::System.String issuedBy, global::System.DateTime issuedDate, global::System.String issuedMessage, global::System.Byte severity, global::System.Byte[] version)
 {
     ErrorLog errorLog = new ErrorLog();
     errorLog.Id = id;
     errorLog.IssuedBy = issuedBy;
     errorLog.IssuedDate = issuedDate;
     errorLog.IssuedMessage = issuedMessage;
     errorLog.Severity = severity;
     errorLog.Version = version;
     return errorLog;
 }