Uploaded image for project: 'OSAMES ORM'
  1. OSAMES ORM
  2. ORM-195

Optimisation du traitement des if dans DbManager.cs

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.3.0
    • Component/s: None
    • Labels:

      Description

      L'idée est de réduire le traitement du booléen

      Unable to find source-code formatter for language: csharp. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      if (transaction_.ConnectionWrapper.IsBackup)
          {
               lock (BackupConnection)
               {
                   // perform code with locking
                  return new DbManagerHelper<IEnumerable<OOrmDbParameter>>(transaction_, cmdType_, cmdText_, SqlCommandType.Adapter).DataAdapter(cmdParams_);
              }
          }
       // no lock
      return new DbManagerHelper<IEnumerable<OOrmDbParameter>>(transaction_, cmdType_, cmdText_, SqlCommandType.Adapter).DataAdapter(cmdParams_);
      

      Vers quelque chose de plus directe:

      Unable to find source-code formatter for language: csharp. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      if (!transaction_.ConnectionWrapper.IsBackup)
           return new DbManagerHelper<IEnumerable<OOrmDbParameter>>(transaction_, cmdType_, cmdText_, SqlCommandType.Adapter).DataAdapter(cmdParams_);
      
          lock (BackupConnection)
          {
              // perform code with locking
              return new DbManagerHelper<IEnumerable<OOrmDbParameter>>(transaction_, cmdType_, cmdText_, SqlCommandType.Adapter).DataAdapter(cmdParams_);
          }
      

        Attachments

          Activity

            People

            Assignee:
            xarkam Benjamin Nolmans
            Reporter:
            xarkam Benjamin Nolmans
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 9 minutes
                9m