public ManifestModuleInfo(ModuleManifest manifest)
            : base(manifest.Id, manifest.ModuleType, (manifest.Dependencies ?? new ManifestDependency[0]).Select(d => d.Id).ToArray())
        {
            Id = manifest.Id;
            Version = new SemanticVersion(new System.Version(manifest.Version));
            PlatformVersion = new SemanticVersion(new System.Version(manifest.PlatformVersion));
            Title = manifest.Title;
            Description = manifest.Description;
            Authors = manifest.Authors;
            Owners = manifest.Owners;
            LicenseUrl = manifest.LicenseUrl;
            ProjectUrl = manifest.ProjectUrl;
            IconUrl = manifest.IconUrl;
            RequireLicenseAcceptance = manifest.RequireLicenseAcceptance;
            ReleaseNotes = manifest.ReleaseNotes;
            Copyright = manifest.Copyright;
            Tags = manifest.Tags;
            UseFullTypeNameInSwagger = manifest.UseFullTypeNameInSwagger;

            Ref = manifest.PackageUrl;
            Identity = new ModuleIdentity(Id, Version);

            Errors = new List<string>();

            Dependencies = new List<ModuleIdentity>();
            if (manifest.Dependencies != null)
            {
                Dependencies.AddRange(manifest.Dependencies.Select(x => new ModuleIdentity(x.Id, x.Version)));
            }
            Styles = new List<ManifestBundleItem>();
            if (manifest.Styles != null)
            {
                Styles.AddRange(manifest.Styles);
            }
            Scripts = new List<ManifestBundleItem>();
            if (manifest.Scripts != null)
            {
                Scripts.AddRange(manifest.Scripts);
            }
            Permissions = new List<ModulePermissionGroup>();
            if (manifest.Permissions != null)
            {
                Permissions.AddRange(manifest.Permissions);
            }
            Settings = new List<ModuleSettingsGroup>();
            if (manifest.Settings != null)
            {
                Settings.AddRange(manifest.Settings);
            }
            Groups = new List<string>();
            if (manifest.Groups != null)
            {
                Groups.AddRange(manifest.Groups);
            }
            InitializationMode = InitializationMode.OnDemand;
        }
        public ManifestModuleInfo(ModuleManifest manifest)
            : base(manifest.Id, manifest.ModuleType, (manifest.Dependencies ?? new ManifestDependency[0]).Select(d => d.Id).ToArray())
        {
            Id                       = manifest.Id;
            Version                  = new SemanticVersion(new System.Version(manifest.Version));
            PlatformVersion          = new SemanticVersion(new System.Version(manifest.PlatformVersion));
            Title                    = manifest.Title;
            Description              = manifest.Description;
            Authors                  = manifest.Authors;
            Owners                   = manifest.Owners;
            LicenseUrl               = manifest.LicenseUrl;
            ProjectUrl               = manifest.ProjectUrl;
            IconUrl                  = manifest.IconUrl;
            RequireLicenseAcceptance = manifest.RequireLicenseAcceptance;
            ReleaseNotes             = manifest.ReleaseNotes;
            Copyright                = manifest.Copyright;
            Tags                     = manifest.Tags;
            UseFullTypeNameInSwagger = manifest.UseFullTypeNameInSwagger;

            Ref      = manifest.PackageUrl;
            Identity = new ModuleIdentity(Id, Version);

            Errors = new List <string>();

            Dependencies = new List <ModuleIdentity>();
            if (manifest.Dependencies != null)
            {
                Dependencies.AddRange(manifest.Dependencies.Select(x => new ModuleIdentity(x.Id, x.Version)));
            }
            Styles = new List <ManifestBundleItem>();
            if (manifest.Styles != null)
            {
                Styles.AddRange(manifest.Styles);
            }
            Scripts = new List <ManifestBundleItem>();
            if (manifest.Scripts != null)
            {
                Scripts.AddRange(manifest.Scripts);
            }
            Permissions = new List <ModulePermissionGroup>();
            if (manifest.Permissions != null)
            {
                Permissions.AddRange(manifest.Permissions);
            }
            Settings = new List <ModuleSettingsGroup>();
            if (manifest.Settings != null)
            {
                Settings.AddRange(manifest.Settings);
            }
            Groups = new List <string>();
            if (manifest.Groups != null)
            {
                Groups.AddRange(manifest.Groups);
            }
            Incompatibilities = new List <ModuleIdentity>();
            if (manifest.Incompatibilities != null)
            {
                Incompatibilities.AddRange(manifest.Incompatibilities.Select(x => new ModuleIdentity(x.Id, x.Version)));
            }

            InitializationMode = InitializationMode.OnDemand;
        }