コード例 #1
0
ファイル: Version.cs プロジェクト: tambo1/CKAN
        public void ProvidesVersion()
        {
            var v1 = new ProvidesVersion("SomeModule");

            Assert.AreEqual("provided by SomeModule", v1.ToString());
        }
コード例 #2
0
ファイル: Registry.cs プロジェクト: Gustavo6046/CKAN_LPIP
        /// <summary>
        /// Returns a dictionary of provided (virtual) modules, and a
        /// ProvidesVersion indicating what provides them.
        /// </summary>
        // TODO: In the future it would be nice to cache this list, and mark it for rebuild
        // if our installed modules change.
        internal Dictionary<string, ProvidesVersion> Provided()
        {
            var installed = new Dictionary<string, ProvidesVersion>();

            foreach (var modinfo in installed_modules)
            {
                Module module = modinfo.Value.Module;

                // Skip if this module provides nothing.
                if (module.provides == null)
                {
                    continue;
                }

                foreach (string provided in module.provides)
                {
                    installed[provided] = new ProvidesVersion(module.identifier);
                }
            }

            return installed;
        }
コード例 #3
0
ファイル: Version.cs プロジェクト: adamhomer88/CKAN
 public void ProvidesVersion()
 {
     var v1 = new ProvidesVersion("SomeModule");
     Assert.AreEqual("provided by SomeModule", v1.ToString());
 }