Beispiel #1
0
        public void Test_GetProvider()
        {
            IObjectProvider <Object1> provider = IocManager.Instance.Resolve <IObjectProvider <Object1> >();

            Assert.IsNotNull(provider);
            MyDbObject obj = provider.GetObject();

            Assert.IsNotNull(obj);
            Assert.IsTrue(obj.Is <Object1>());
        }
Beispiel #2
0
 protected User(MyDbObject dbObject)
 {
     // creates an object representing an existing user, from a database object
 }
Beispiel #3
0
 private ExtendedUser(MyDbObject dbObject) : base(dbObject)
 {
     //add extra data onto the base class here
 }
Beispiel #4
0
 public static ExtendedUser GetExtendedUser(MyDbObject dbObj)
 {
     return(new ExtendedUser(dbObject));
 }
Beispiel #5
0
 public static User GetUser(MyDbObject dbObject)
 {
     return(User(dbObject));
 }