Exemple #1
0
 public void Dispose()
 {
     if (this._locationService != null)
     {
         this._locationService.Dispose();
         this._locationService = null;
     }
     this._filenameMap = null;
 }
Exemple #2
0
        public SharedCodeService(SharedCodeServiceParameters parameters, ILoggingService loggingService)
        {
            Debug.Assert(parameters != null, "parameters cannot be null");
            Debug.Assert(parameters.SharedSourceFiles != null, "sharedSourceFiles cannot be null");
            Debug.Assert(parameters.ClientAssemblies != null, "clientAssemblies cannot be null");

            // Convert optional list of PDB paths to semicolon separated list
            string symbolSearchPath = parameters.SymbolSearchPaths == null
                                        ? null
                                        : string.Join(";", parameters.SymbolSearchPaths);

            // We create an aggregating source file location service that will check in this order:
            //  1. SourceInfoAttributes generated by Live Intellisense, then
            //  2. PDB info
            ISourceFileProviderFactory[] factories =
            {
                new SourceInfoSourceFileProviderFactory(),
                new PdbSourceFileProviderFactory(symbolSearchPath, loggingService)
            };

            _locationService   = new SourceFileLocationService(factories, this._filenameMap);
            _sharedSourceFiles = new SharedSourceFiles(this._locationService, this._filenameMap, parameters.SharedSourceFiles);
            _sharedAssemblies  = new SharedAssemblies(parameters.ClientAssemblies, parameters.ClientAssemblyPathsNormalized, loggingService);
        }