Esempio n. 1
0
 /// <summary>
 /// Creates a new extractor instance for one compilation unit.
 /// </summary>
 /// <param name="logger">The object used for logging.</param>
 /// <param name="pathTransformer">The object used for path transformations.</param>
 public StandaloneExtractor(ILogger logger, PathTransformer pathTransformer, CommonOptions options) : base(logger, pathTransformer)
 {
     Mode = ExtractorMode.Standalone;
     if (options.QlTest)
     {
         Mode |= ExtractorMode.QlTest;
     }
 }
 public new void saveFilesWithRollback(IEnumerable <DataTable> tables, ExtractorMode extractMode, Int32 maxTries)
 {
     using (ImpersonatorUtils impersonator = new ImpersonatorUtils())
     {
         impersonator.startImpersonation(_networkUserDomain, _networkUserName, _networkUserPwd);
         base.saveFilesWithRollback(tables, extractMode, maxTries);
     }
 }
 public new string saveToFile(System.Data.DataTable table, ExtractorMode type, bool usingEncryption)
 {
     using (ImpersonatorUtils impersonator = new ImpersonatorUtils())
     {
         impersonator.startImpersonation(_networkUserDomain, _networkUserName, _networkUserPwd);
         return(base.saveToFile(table, type, usingEncryption));
     }
 }
 public new IList <System.Data.DataTable> loadFromAllFiles(string sitecode, ExtractorMode type)
 {
     using (ImpersonatorUtils impersonator = new ImpersonatorUtils())
     {
         impersonator.startImpersonation(_networkUserDomain, _networkUserName, _networkUserPwd);
         return(base.loadFromAllFiles(sitecode, type));
     }
 }
Esempio n. 5
0
    public void ResetGrid()
    {
        currExTry  = extractTry;
        currScnTry = scanTry;
        if (buttonGrid != null)
        {
            foreach (var button in buttonGrid)
            {
                Destroy(button);
            }
            buttonGrid = null;
        }
        grid.GenerateNodes();
        BuildScreen();
        mode = ExtractorMode.EXTRACTION;
        ChangeMode((int)ExtractorMode.EXTRACTION);
        resourceTotal = 0;

        UpdateUI();
    }
        public ValidateLocalizableExtractor(ExtractOptions options)
        {
            _repository    = options.SourceDirectory;
            _extractorMode = options.ExtractorMode;

            switch (options.ExtractorMode)
            {
            case ExtractorMode.Commit:
                _extractorParameter = options.CommitSha;
                break;

            case ExtractorMode.TagName:
                _extractorParameter = options.TagName;
                break;

            default:
                _extractorParameter = string.Empty;
                break;
            }
        }
Esempio n. 7
0
    //Extraction = 0, Scanning = 1
    public void ChangeMode(int newMode)
    {
        //Cannot override complete unless reset
        if (mode == ExtractorMode.COMPLETE)
        {
            return;
        }

        //Change mode and functionality
        mode = (ExtractorMode)newMode;
        switch (mode)
        {
        case ExtractorMode.EXTRACTION:
            foreach (var button in buttonGrid)
            {
                button.GetComponent <BoxCollider>().enabled = true;
            }
            Debug.Log("Extract Mode Activated");
            break;

        case ExtractorMode.SCANNING:
            foreach (var button in buttonGrid)
            {
                button.GetComponent <BoxCollider>().enabled = true;
            }
            Debug.Log("Scan Mode Activated");
            break;

        case ExtractorMode.COMPLETE:
            foreach (var button in buttonGrid)
            {
                button.GetComponent <BoxCollider>().enabled = false;
            }
            Debug.Log("Extraction Complete");
            break;

        default:
            break;
        }
    }
Esempio n. 8
0
 internal static Tuple file_extraction_mode(File file, ExtractorMode mode) =>
 new Tuple("file_extraction_mode", file, mode);
Esempio n. 9
0
 internal static void file_extraction_mode(this System.IO.TextWriter trapFile, Entities.File file, ExtractorMode mode) =>
 trapFile.WriteTuple("file_extraction_mode", file, mode);