Вы можете использовать метод .named(name)
, который клонирует данный тип, дает ему новый name
и предоставляет вам возможность «расширить» его дополнительными свойствами, представлениями, действиями или, возможно, переопределениями объявленных в оригинальном виде.
Пример:
const Square = types
.model("Square",
{
width: types.number
}
)
.views(self => ({
surface() {
return self.width * self.width
}
}))
// create a new type, based on Square
const Box = Square
.named("Box")
.views(self => {
// save the base implementation of surface
const superSurface = self.surface
return {
// super contrived override example!
surface() {
return superSurface() * 1
},
volume() {
return self.surface * self.width
}
}
}))
Спасибо, я попробовал его прежде, но перестал работать, попробовал еще раз и хорошо работал, должно быть, пропустил что-то в первый раз вокруг.
Шаги очень просты:
Anonymous access is no longer a simple configuration for MS SQL Reporting Services 2008. I started on that path and ended up integrating Reporting Services into our existing security system. You could follow these instructions to achieve anonymous access also.