Ejemplo n.º 1
0
        public void Host(string sourceFilePath)
        {
            ObfuscationConfiguration obfuscationConfiguration;

            sourceFilePath           = Path.GetFullPath(sourceFilePath);
            obfuscationConfiguration = OxymoronEngine.FromJsonFile <ObfuscationConfiguration>(sourceFilePath);

            this.Host(obfuscationConfiguration, (x, y, z) => Console.WriteLine("{0} {1} {2}", x, y, z));
        }
        private ObfuscationConfiguration ThreadSafeLoadCurrentDocument(object parameter)
        {
            string documentFilePath;
            ObfuscationConfiguration obfuscationConfiguration;

            documentFilePath = this.View.FilePath;

            if (!DataTypeFascade.Instance.IsNullOrWhiteSpace(documentFilePath))
            {
                documentFilePath         = Path.GetFullPath(documentFilePath);
                obfuscationConfiguration = OxymoronEngine.FromJsonFile <ObfuscationConfiguration>(documentFilePath);
            }
            else
            {
                // just create new
                obfuscationConfiguration = new ObfuscationConfiguration()
                {
                    ConfigurationVersion = ObfuscationConfiguration.CurrentConfigurationVersion,
                    EngineVersion        = ObfuscationConfiguration.CurrentEngineVersion
                };
            }

            return(obfuscationConfiguration);
        }