コード例 #1
0
 public AnonymousController(ICollectionDAO collectionDAO, IComicDAO comicDAO, ICharacterDAO characterDAO, ICreatorDAO creatorDAO, IVolumeDAO volumeDAO, ITagDAO tagDAO)
 {
     this.collectionDAO = collectionDAO;
     this.comicDAO      = comicDAO;
     this.characterDAO  = characterDAO;
     this.creatorDAO    = creatorDAO;
     this.volumeDAO     = volumeDAO;
     this.tagDAO        = tagDAO;
 }
コード例 #2
0
 public SearchController(IComicVineService comicVineService, IComicDAO comicDAO, ICharacterDAO characterDAO, ICreatorDAO creatorDAO, IVolumeDAO volumeDAO, ITagDAO tagDAO)
 {
     comicVine         = comicVineService;
     this.comicDAO     = comicDAO;
     this.characterDAO = characterDAO;
     this.creatorDAO   = creatorDAO;
     this.volumeDAO    = volumeDAO;
     this.tagDAO       = tagDAO;
 }
コード例 #3
0
 public UserController(ICollectionDAO collectionDAO, IComicDAO comicDAO, IComicVineService comicVine, IUserDAO userDAO, ICharacterDAO characterDAO, ICreatorDAO creatorDAO, ITagDAO tagDAO, IVolumeDAO volumeDAO)
 {
     this.collectionDAO = collectionDAO;
     this.comicDAO      = comicDAO;
     this.comicVine     = comicVine;
     this.userDAO       = userDAO;
     this.characterDAO  = characterDAO;
     this.creatorDAO    = creatorDAO;
     this.tagDAO        = tagDAO;
     this.volumeDAO     = volumeDAO;
 }
コード例 #4
0
    // extension methods here
    public static TitleInfoPacket GenerateTitInfo(this ICharacterDAO
                                                  visualEntity)
    {
        var visibleTitle   = visualEntity.Titles.FirstOrDefault(s => s.Visible)?.TitleType;
        var effectiveTitle = visualEntity.Titles.FirstOrDefault(s => s.Active)?.TitleType;

        return(new TitleInfoPacket
        {
            VisualId = visualEntity.VisualId,
            EffectiveTitle = effectiveTitle ?? 0,
            VisualType = visualEntity.VisualType,
            VisibleTitle = visibleTitle ?? 0,
        });
    }