Mono.Addins.Description.AddinDescription.SetBasePath C# (CSharp) Method

SetBasePath() private method

private SetBasePath ( string path ) : void
path string
return void
        internal void SetBasePath(string path)
        {
            basePath = path;
        }

Usage Example

Example #1
0
        bool ScanConfigAssemblies(IProgressStatus monitor, string filePath, AddinScanResult scanResult, out AddinDescription config)
        {
            config = null;

            try {
                IAssemblyReflector reflector = GetReflector (monitor, scanResult, filePath);

                string basePath = Path.GetDirectoryName (filePath);

                using (var s = fs.OpenFile (filePath)) {
                    config = AddinDescription.Read (s, basePath);
                }
                config.FileName = filePath;
                config.SetBasePath (basePath);
                config.AddinFile = filePath;

                return ScanDescription (monitor, reflector, config, null, scanResult);
            }
            catch (Exception ex) {
                // Something went wrong while scanning the assembly. We'll ignore it for now.
                monitor.ReportError ("There was an error while scanning add-in: " + filePath, ex);
                return false;
            }
        }