Пример #1
0
 public UploadController(ISongs songs, IAlbums albums, IArtists artists)
 {
     _songs   = songs;
     _albums  = albums;
     _artists = artists;
     _session = new DriveSession();
 }
Пример #2
0
 public HomeController(ITreck trecks, IGenres genres, IAlbums albums, IArtist artist)
 {
     _trecks = trecks;
     _genres = genres;
     _albums = albums;
     _artist = artist;
 }
 /// <summary>
 /// COMMON controllers for each album
 /// </summary>
 /// <param name="Albums"></param>
 /// <param name="dataProtectionProvider"></param>
 /// <param name="dataProtectionPurpose"></param>
 /// <param name="PhotoRepository"></param>
 public CommonController(IAlbums Albums, IDataProtectionProvider dataProtectionProvider, DataProtectionPurposeString dataProtectionPurpose, IPhoto PhotoRepository)
 {
     albums = Albums;
     DataProtectionProvider = dataProtectionProvider;
     DataProtectionPurpose  = dataProtectionPurpose;
     photoRepository        = PhotoRepository;
     Protector = DataProtectionProvider.CreateProtector(DataProtectionPurpose.PurposeString);
 }
Пример #4
0
 /// <param name='operations'>
 /// Reference to the Rg.ClientApp.IAlbums.
 /// </param>
 /// <param name='id'>
 /// Required.
 /// </param>
 /// <param name='modifyRequest'>
 /// Required.
 /// </param>
 public static object PutByIdAndModifyrequest(this IAlbums operations, int id, AlbumDefinition modifyRequest)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IAlbums)s).PutByIdAndModifyrequestAsync(id, modifyRequest);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Пример #5
0
 /// <param name='operations'>
 /// Reference to the Rg.ClientApp.IAlbums.
 /// </param>
 /// <param name='albumId'>
 /// Required.
 /// </param>
 /// <param name='likeRequest'>
 /// Required.
 /// </param>
 public static object PostLikeAlbumByAlbumidAndLikerequest(this IAlbums operations, int albumId, LikeRequest likeRequest)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IAlbums)s).PostLikeAlbumByAlbumidAndLikerequestAsync(albumId, likeRequest);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Пример #6
0
 /// <param name='operations'>
 /// Reference to the Rg.ClientApp.IAlbums.
 /// </param>
 /// <param name='userId'>
 /// Required.
 /// </param>
 public static IList <AlbumSummary> GetByUserid(this IAlbums operations, string userId)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IAlbums)s).GetByUseridAsync(userId);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Пример #7
0
 /// <param name='operations'>
 /// Reference to the Rg.ClientApp.IAlbums.
 /// </param>
 /// <param name='createRequest'>
 /// Required.
 /// </param>
 public static AlbumSummary PostByCreaterequest(this IAlbums operations, AlbumDefinition createRequest)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IAlbums)s).PostByCreaterequestAsync(createRequest);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Пример #8
0
 /// <param name='operations'>
 /// Reference to the Rg.ClientApp.IAlbums.
 /// </param>
 /// <param name='albumId'>
 /// Required.
 /// </param>
 public static AlbumDetail GetByAlbumid(this IAlbums operations, int albumId)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IAlbums)s).GetByAlbumidAsync(albumId);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// ASSIGN needed param for Admin role
 /// </summary>
 /// <param name="ToastNotification"></param>
 /// <param name="PhotoRepository"></param>
 /// <param name="AlbumRepository"></param>
 /// <param name="UserManager"></param>
 /// <param name="HostingEnvironment"></param>
 /// <param name="Configuration"></param>
 public AdminController(IToastNotification ToastNotification, IPhoto PhotoRepository, IAlbums AlbumRepository, UserManager <AccountUser> UserManager, IWebHostEnvironment HostingEnvironment, IConfiguration Configuration)
 {
     toastNotification  = ToastNotification;
     photoRepository    = PhotoRepository;
     albumRepository    = AlbumRepository;
     userManager        = UserManager;
     hostingEnvironment = HostingEnvironment;
     configuration      = Configuration;
 }
Пример #10
0
 public MusicController(ITreck trecks, IPlaylist playlists, IPlaylistTreck playlistsTreck, IGenres genres, IAlbums albums, IArtist artist)
 {
     _trecks         = trecks;
     _playlists      = playlists;
     _playlistsTreck = playlistsTreck;
     _genres         = genres;
     _albums         = albums;
     _artist         = artist;
 }
Пример #11
0
 public ArtistController(UserManager <DbUser> userManager, IUser myUser, ITreck trecks, IPlaylist playlists, IPlaylistTreck playlistsTreck, IGenres genres, IAlbums albums, IArtist artist)
 {
     _userManager    = userManager;
     _myUser         = myUser;
     _trecks         = trecks;
     _playlists      = playlists;
     _playlistsTreck = playlistsTreck;
     _genres         = genres;
     _albums         = albums;
     _artist         = artist;
 }
 /// <summary>
 /// ASSIGN needed parameters for user functionality
 /// </summary>
 /// <param name="ToastNotification">Gives good notification pop-up for success and falier msg</param>
 /// <param name="HttpContextAccessor"></param>
 /// <param name="PhotoRepository"></param>
 /// <param name="dataProtectionProvider"></param>
 /// <param name="dataProtectionPurpose"></param>
 /// <param name="UserManager"></param>
 /// <param name="albums"></param>
 /// <param name="HostingEnvironment"></param>
 /// <param name="Configuration"></param>
 public UserController(IToastNotification ToastNotification, IHttpContextAccessor HttpContextAccessor, IPhoto PhotoRepository, IDataProtectionProvider dataProtectionProvider, DataProtectionPurposeString dataProtectionPurpose, UserManager <AccountUser> UserManager, IAlbums albums, IWebHostEnvironment HostingEnvironment, IConfiguration Configuration)
 {
     toastNotification      = ToastNotification;
     httpContextAccessor    = HttpContextAccessor;
     photoRepository        = PhotoRepository;
     DataProtectionProvider = dataProtectionProvider;
     DataProtectionPurpose  = dataProtectionPurpose;
     Protector          = DataProtectionProvider.CreateProtector(DataProtectionPurpose.PurposeString);
     userManager        = UserManager;
     albumRepository    = albums;
     hostingEnvironment = HostingEnvironment;
     configuration      = Configuration;
 }
Пример #13
0
 /// <summary>
 /// Initializes a new instance of the RgApiJenya class.
 /// </summary>
 /// <param name='rootHandler'>
 /// Optional. The http client handler used to handle http transport.
 /// </param>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public RgApiJenya(HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
     : base(rootHandler, handlers)
 {
     this._albums       = new Albums(this);
     this._comment      = new Comment(this);
     this._invitations  = new Invitations(this);
     this._media        = new Media(this);
     this._notification = new Notification(this);
     this._profile      = new Profile(this);
     this._search       = new Search(this);
     this._test         = new Test(this);
     this._timeline     = new Timeline(this);
     this._uploadMedia  = new UploadMedia(this);
     this._userImages   = new UserImages(this);
     this._baseUri      = new Uri("https://microsoft-apiappc0ca0972af5842ffbdf629275d59d5b9.azurewebsites.net");
 }
Пример #14
0
        /// <param name='operations'>
        /// Reference to the Rg.ClientApp.IAlbums.
        /// </param>
        /// <param name='userId'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <IList <AlbumSummary> > GetByUseridAsync(this IAlbums operations, string userId, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <System.Collections.Generic.IList <Rg.ClientApp.Models.AlbumSummary> > result = await operations.GetByUseridWithOperationResponseAsync(userId, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
Пример #15
0
        /// <param name='operations'>
        /// Reference to the Rg.ClientApp.IAlbums.
        /// </param>
        /// <param name='albumId'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <AlbumDetail> GetByAlbumidAsync(this IAlbums operations, int albumId, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <Rg.ClientApp.Models.AlbumDetail> result = await operations.GetByAlbumidWithOperationResponseAsync(albumId, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
Пример #16
0
 public InstanceController(IInstances instances, IAlbums albums)
 {
     _instances = instances;
     _albums    = albums;
 }
Пример #17
0
        /// <param name='operations'>
        /// Reference to the Rg.ClientApp.IAlbums.
        /// </param>
        /// <param name='id'>
        /// Required.
        /// </param>
        /// <param name='modifyRequest'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <object> PutByIdAndModifyrequestAsync(this IAlbums operations, int id, AlbumDefinition modifyRequest, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <object> result = await operations.PutByIdAndModifyrequestWithOperationResponseAsync(id, modifyRequest, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
Пример #18
0
        /// <param name='operations'>
        /// Reference to the Rg.ClientApp.IAlbums.
        /// </param>
        /// <param name='albumId'>
        /// Required.
        /// </param>
        /// <param name='likeRequest'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <object> PostLikeAlbumByAlbumidAndLikerequestAsync(this IAlbums operations, int albumId, LikeRequest likeRequest, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <object> result = await operations.PostLikeAlbumByAlbumidAndLikerequestWithOperationResponseAsync(albumId, likeRequest, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
Пример #19
0
        /// <param name='operations'>
        /// Reference to the Rg.ClientApp.IAlbums.
        /// </param>
        /// <param name='createRequest'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <AlbumSummary> PostByCreaterequestAsync(this IAlbums operations, AlbumDefinition createRequest, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <Rg.ClientApp.Models.AlbumSummary> result = await operations.PostByCreaterequestWithOperationResponseAsync(createRequest, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
Пример #20
0
 public HomeController(IAlbums albums)
 {
     _albums = albums;
 }
 public PhotoAlbums(IAlbums albums, IPhotos photos)
 {
     _albums = albums;
     _photos = photos;
 }