示例#1
0
文件: Package.cs 项目: koav/Rhetos
 private static void CheckIdentifierAndVersion(string fileName, Package p)
 {
     if (string.IsNullOrEmpty(p.Identifier))
         throw new FrameworkException("Missing 'Identifier' element in package specification: " + fileName + ".");
     if (string.IsNullOrEmpty(p.Version))
         throw new FrameworkException("Missing 'Version' element in package specification: " + fileName + ".");
 }
示例#2
0
文件: Package.cs 项目: koav/Rhetos
        private static void ValidatePackage(string fileName, Package p)
        {
            CheckIdentifierAndVersion(fileName, p);

            if (p.Dependencies == null)
                p.Dependencies = new List<Package>();

            foreach (var dependency in p.Dependencies)
                CheckIdentifierAndVersion(fileName, dependency);
        }