Beispiel #1
0
        public Instance GetInstance(string name)
        {
            string descFile = Path.Combine(InstancesFolder, name, "craftalyst-instance.json");

            if (!File.Exists(descFile))
                return null;

            var config = InstanceDescription.FromFile(descFile);
            var instance = new Instance(this, Path.Combine(InstancesFolder, name), config);
            instance.Name = name;

            return instance;
        }
Beispiel #2
0
        public Instance CreateInstance(string name, InstanceDescription description)
        {
            var instance = new Instance(this, Path.Combine (InstancesFolder, name), description);
            instance.Description = description;
            instance.IsNewInstance = true;

            return instance;
        }