CmisSync.Lib.Database.Database.GetOperationRetryCounter C# (CSharp) Метод

GetOperationRetryCounter() публичный Метод

Gets the upload retry counter.
public GetOperationRetryCounter ( SyncItem item, OperationType type ) : long
item SyncItem Path of the local file.
type OperationType
Результат long
        public long GetOperationRetryCounter(SyncItem item, OperationType type)
        {
            Dictionary<string, object> parameters = new Dictionary<string, object>();
            parameters.Add("path", item.RemoteRelativePath);
            object result = null;
            switch (type)
            {
                case OperationType.DOWNLOAD:
                    goto case OperationType.DELETE;
                case OperationType.DELETE:
                    result = ExecuteSQLFunction(String.Format("SELECT {0}Counter FROM failedoperations WHERE path=@path", operationTypeToString(type)), parameters);
                    break;
                default:
                    parameters.Add("date", File.GetLastWriteTimeUtc(item.LocalPath));
                    result = ExecuteSQLFunction(String.Format("SELECT {0}Counter FROM failedoperations WHERE path=@path AND lastLocalModificationDate=@date", operationTypeToString(type)), parameters);
                    break;
            }
            if (result != null && !(result is DBNull))
            { return (long)result; }
            else
            { return 0; }
        }

Same methods

Database::GetOperationRetryCounter ( string path, OperationType type ) : long