Exemplo n.º 1
0
 public PropertyWrapper(
     ICardDataAccess cardDataAccess,
     IPropertyTypeDataAccess propertyTypeDataAccess,
     int ownerId,
     int propertyTypeId)
 {
     _owner        = new PropWrapper <Card>(() => cardDataAccess.Get(ownerId));
     _propertyType = new PropWrapper <PropertyType>(() => propertyTypeDataAccess.Get(propertyTypeId));
 }
Exemplo n.º 2
0
        public CardSpaceCardWrapper(ICardDataAccess cardDataAccess,
                                    int cardId,
                                    ICardSpaceDataAccess cardSpaceDataAccess,
                                    int cardSpaceId)
        {
            var cardContext = new CardContext()
            {
                DataAccess = cardDataAccess, CardId = cardId
            };

            _card = new PropWrapper <Card>(
                cardContext,
                o => ((CardContext)o).DataAccess.Get(((CardContext)o).CardId));

            var spaceContext = new CardSpaceContext()
            {
                DataAccess = cardSpaceDataAccess, CardSpaceId = cardSpaceId
            };

            _cardSpace = new PropWrapper <CardSpace>(
                spaceContext,
                o => ((CardSpaceContext)o).DataAccess.Get(((CardSpaceContext)o).CardSpaceId));
        }
Exemplo n.º 3
0
 public CardProvider(ICardDataAccess cardDataAccess)
 {
     DataAccess = cardDataAccess;
 }
Exemplo n.º 4
0
 public HardLinkWrapper(ICardDataAccess cardDataAccess, int originId, int targetId)
 {
     CardDataAccess = cardDataAccess;
     _origin        = new PropWrapper <Card>(() => cardDataAccess.Get(originId));
     _target        = new PropWrapper <Card>(() => cardDataAccess.Get(targetId));
 }
Exemplo n.º 5
0
 public PropertyDataAccess(ICardDataAccess cardDataAccess, IPropertyTypeDataAccess propertyTypeDataAccess)
 {
     CardDataAccess         = cardDataAccess;
     PropertyTypeDataAccess = propertyTypeDataAccess;
 }
Exemplo n.º 6
0
 public HardLinkDataAccess(ICardDataAccess cardDataAccess)
 {
     CardDataAccess = cardDataAccess;
 }
Exemplo n.º 7
0
 public CardSpaceCardsDataAccess(ICardDataAccess cardDataAccess, ICardSpaceDataAccess cardSpaceDataAccess)
 {
     CardDataAccess      = cardDataAccess;
     CardSpaceDataAccess = cardSpaceDataAccess;
 }