public override void Add(DbgEntity aEntity) { SymSourceProvider provider = null; // if (aEntity.FSEntity.IsFile) { if (aEntity.Exists && aEntity.FSEntity.IsValid) { provider = ProvisioningManager.GetProvider(aEntity.FSEntity.FullName); } // if (provider != null) { using (SymSourceCollection sources = provider.CreateSources(aEntity.FullName)) { // Make sure the time to read attribute is setup in alignment with // whether the entity was explicitly added by the user or found implicitly // by scanning. if (aEntity.WasAddedExplicitly == false) { foreach (SymSource source in sources) { // This means, don't read this source until it is actually // referenced by the client. I.e. until the client activates // a code segment that refers to this source.TimeToRead = SymSource.TTimeToRead.EReadWhenNeeded; } } // Ownership is transferred iSources.AddRange(sources); sources.Clear(); } } else { throw new NotSupportedException("Specified file type is not supported"); } } else { throw new ArgumentException("SymbianSymbolLib does not support directory entities"); } }
public override SymSourceCollection CreateSources(string aFileName) { System.Diagnostics.Debug.Assert(iMapProvider != null); // Read OBY file and resolve to map files in host file system. iTransientSources = new SymSourceCollection(); try { ObeyFileReader reader = new ObeyFileReader(aFileName); reader.EntryRead += new ObeyFileReader.ObyEntryHandler(Reader_EntryRead); reader.Read(TSynchronicity.ESynchronous); } catch (Exception) { iTransientSources.Clear(); } // This source provider doesn't directly create any sources SymSourceCollection ret = iTransientSources; iTransientSources = null; return(ret); }