/// <summary> /// Adds new library to the script library. /// </summary> /// <param name="desc">Configuration of script library to be added and reflected later.</param> /// <returns>True if library was added, false if the library was not added.</returns> private bool AddLibrary(ScriptLibraryConfigurationNode /*!*/ desc) { Debug.Assert(desc != null); if (libraries == null) { libraries = new List <ScriptLibraryConfigurationNode>(); } else { // check for duplicity if (FindAddedLibrary(desc) >= 0) { return(false); } } // add the library configuration to be loaded lazily libraries.Add(desc); return(true); }
/// <summary> /// Adds new library to the script library. /// </summary> /// <param name="desc">Configuration of script library to be added and reflected later.</param> /// <returns>True if library was added, false if the library was not added.</returns> private bool AddLibrary(ScriptLibraryConfigurationNode/*!*/ desc) { Debug.Assert(desc != null); if (libraries == null) { libraries = new List<ScriptLibraryConfigurationNode>(); } else { // check for duplicity if (FindAddedLibrary(desc) >= 0) return false; } // add the library configuration to be loaded lazily libraries.Add(desc); return true; }
/// <summary> /// Check if the given library was already and returns its index within <see cref="libraries"/>. /// </summary> private int FindAddedLibrary(ScriptLibraryConfigurationNode /*!*/ desc) { return(libraries.IndexOf(desc)); }
/// <summary> /// Check if the given library was already and returns its index within <see cref="libraries"/>. /// </summary> private int FindAddedLibrary(ScriptLibraryConfigurationNode/*!*/ desc) { return libraries.IndexOf(desc); }