public static void DeleteModelReference(ModelReference reference) { References.Remove(reference); if (References.All(x => x.Model != reference.Model)) { UnloadModel(reference.Model); } }
public static ModelReference CreateModelReference(IFile file) { var model = LoadModel(file); var reference = new ModelReference(file.FullPathName, model); References.Add(reference); return(reference); }