日期:2014-05-20 浏览次数:20801 次
class E {
public string Name { get; set; }
public List<P> Ps { get; set; }
}
class P {
public string Name { get; set; }
public List<S> Ss { get; set; }
public DateTime PublishedDate { get; set; }
}
class S {
public string Name { get; set; }
public DateTime PublishedDate { get; set; }
}
class Program {
static void Main(string[] args) {
var e1p1s1 = new S() { Name = "e1p1s1" };
var e1p1s2 = new S() { Name = "e1p1s2" };
var e1p1s3 = new S() { Name = "e1p1s3" };
var e1p1s4 = new S() { Name = "e1p1s4" };
var e1p2s1 = new S() { Name = "e1p2s1" };
var e1p2s2 = new S() { Name = "e1p2s2" };
var e2p1s1 = new S() { Name = "e2p1s1" };
var e2p1s2 = new S() { Name = "e2p1s2" };
var e2p1s3 = new S() { Name = "e2p1s3" };
var e2p1s4 = new S() { Name = "e2p1s4" };
var e2p2s1 = new S() { Name = "e2p2s1" };
var e2p2s2 = new S() { Name = "e2p2s2" };
var e2p2s3 = new S() { Name = "e2p2s3" };
var e2p3s1 = new S() { Name = "e2p3s1" };
var e2p3s2 = new S() { Name = "e2p3s2" };
var e1p1 = new P() {
Name = "e1p1",
Ss = new List<S>() {
e1p1s1, e1p1s2, e1p1s3, e1p1s4
}
};
var e1p2 = new P() {
Name = "e1p2", Ss = new List<S>() {
e1p2s1, e1p2s2
}
};
var e2p1 = new P() {
Name = "e2p1", Ss = new List<S>() {
e2p1s1, e2p1s2, e2p1s3, e2p1s4
}
};
var e2p2 = new P() {
Name = "e2p2", Ss = new List<S>() {
e2p2s1, e2p2s2, e2p2s3
}
};
var e2p3 = new P() {
Name = "e2p3", Ss = new List<S>() {
e2p3s1, e2p3s2
}
};
var e1 = new E() {
Name = "e1",
Ps = new List<P>() {
e1p1, e1p2
}
};
var e2 = new E() {
Name = "e2",
Ps = new List<P>() {
e2p1, e2p2, e2p3
}
};
var Es = new List<E>() { e1, e2 };
}
}