当前位置: 首页>>代码示例>>C#>>正文


C# IAlbum类代码示例

本文整理汇总了C#中IAlbum的典型用法代码示例。如果您正苦于以下问题:C# IAlbum类的具体用法?C# IAlbum怎么用?C# IAlbum使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IAlbum类属于命名空间,在下文中一共展示了IAlbum类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AlbumViewModel

 public AlbumViewModel(IAlbum iAlbum)
 {
     _Album = iAlbum;
     _ImagesVM = new CollectionWithDetailVM<IAlbumPicture>(_Album.Images);
     var tm = Register(Album.Tracks.LiveOrderBy(t => t.TrackNumber));
     _OrderedTracks = Register(tm.LiveThenBy(t => t.Path));
 }
开发者ID:David-Desmaisons,项目名称:MusicCollection,代码行数:7,代码来源:AlbumViewModel.cs

示例2: Audio

        /// <summary>
        /// Initializes a new instance of a <see cref="Audio" /> object.
        /// </summary>
        /// <param name="audioFile">A <see cref="FileInfo"/> object containing the original audio file for this object. This is intended to be 
        /// specified when creating a new media object from a file. Specify null when instantiating an object for an existing database
        /// record.</param>
        /// <param name="parentAlbum">The album that contains this object. This is a required parameter.</param>
        /// <exception cref="GalleryServerPro.Events.CustomExceptions.InvalidMediaObjectException">Thrown when 
        /// <paramref name="audioFile"/> refers to a file that is not in the same directory as the parent album's directory.</exception>
        /// <exception cref="GalleryServerPro.Events.CustomExceptions.UnsupportedMediaObjectTypeException">Thrown when
        /// <paramref name="audioFile"/> is specified (not null) and its file extension does not correspond to an audio MIME
        /// type, as determined by the MIME type definition in the configuration file.</exception>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="parentAlbum" /> is null.</exception>
        /// <remarks>This constructor does not verify that <paramref name="audioFile"/> refers to a file type that is enabled in the 
        /// configuration file.</remarks>
        internal Audio(FileInfo audioFile, IAlbum parentAlbum)
            : this(int.MinValue, parentAlbum, string.Empty,
						int.MinValue, int.MinValue, int.MinValue, string.Empty, int.MinValue, int.MinValue,
						int.MinValue, string.Empty, int.MinValue, int.MinValue, int.MinValue, int.MinValue,
						String.Empty, DateTime.Now, String.Empty, DateTime.MinValue, parentAlbum != null ? parentAlbum.IsPrivate : false, false, audioFile, null)
        {
        }
开发者ID:Jiyuu,项目名称:galleryserverpro,代码行数:22,代码来源:Audio.cs

示例3: Image

        /// <summary>
        /// Initializes a new instance of an <see cref="Image"/> object.
        /// </summary>
        /// <param name="imageFile">A <see cref="System.IO.FileInfo"/> object containing the original image for this object.</param>
        /// <param name="parentAlbum">The album that contains this object. This is a required parameter.</param>
        /// <exception cref="GalleryServerPro.ErrorHandler.CustomExceptions.InvalidMediaObjectException">Thrown when 
        /// <paramref name="imageFile"/> refers to a file that is not in the same directory as the parent album's directory.</exception>
        /// <exception cref="GalleryServerPro.ErrorHandler.CustomExceptions.UnsupportedMediaObjectTypeException">Thrown when
        /// <paramref name="imageFile"/> is specified (not null) and its file extension does not correspond to an image MIME
        /// type, as determined by the MIME type definition in the configuration file.</exception>
        /// <exception cref="GalleryServerPro.ErrorHandler.CustomExceptions.UnsupportedImageTypeException">Thrown when the 
        /// .NET Framework is unable to load an image file into the <see cref="System.Drawing.Bitmap"/> class. This is 
        /// probably because it is corrupted, not an image supported by the .NET Framework, or the server does not have 
        /// enough memory to process the image. The file cannot, therefore, be handled using the <see cref="Image"/> 
        /// class; use <see cref="GenericMediaObject"/> instead. This exception is thrown only when <paramref name="imageFile"/>
        /// is specified (non-null).</exception>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="parentAlbum" /> is null.</exception>
        /// <remarks>This constructor does not verify that <paramref name="imageFile"/> refers to a file type that is enabled in the 
        /// configuration file.</remarks>
        internal Image(System.IO.FileInfo imageFile, IAlbum parentAlbum)
            : this(int.MinValue, parentAlbum, string.Empty, string.Empty, string.Empty,
				int.MinValue, int.MinValue, int.MinValue, string.Empty, int.MinValue, int.MinValue,
				int.MinValue, string.Empty, int.MinValue, int.MinValue, int.MinValue, int.MinValue,
				String.Empty, DateTime.MinValue, String.Empty, DateTime.MinValue, parentAlbum != null ? parentAlbum.IsPrivate : false, false, imageFile)
        {
        }
开发者ID:KuduApps,项目名称:GalleryServerPro,代码行数:26,代码来源:Image.cs

示例4: Video

        /// <summary>
        /// Initializes a new instance of a <see cref="Video" /> object.
        /// </summary>
        /// <param name="videoFile">A <see cref="FileInfo"/> object containing the original video file for this object. This is intended to be 
        /// specified when creating a new media object from a file. Specify null when instantiating an object for an existing database
        /// record.</param>
        /// <param name="parentAlbum">The album that contains this object. This is a required parameter.</param>
        /// <exception cref="GalleryServerPro.Events.CustomExceptions.InvalidMediaObjectException">Thrown when 
        /// <paramref name="videoFile"/> refers to a file that is not in the same directory as the parent album's directory.</exception>
        /// <exception cref="GalleryServerPro.Events.CustomExceptions.UnsupportedMediaObjectTypeException">Thrown when
        /// <paramref name="videoFile"/> is specified (not null) and its file extension does not correspond to an video MIME
        /// type, as determined by the MIME type definition in the configuration file.</exception>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="parentAlbum" /> is null.</exception>
        /// <remarks>This constructor does not verify that <paramref name="videoFile"/> refers to a file type that is enabled in the 
        /// configuration file.</remarks>
        internal Video(System.IO.FileInfo videoFile, IAlbum parentAlbum)
            : this(int.MinValue, parentAlbum, string.Empty,
						int.MinValue, int.MinValue, int.MinValue, string.Empty, int.MinValue, int.MinValue,
						int.MinValue, string.Empty, int.MinValue, int.MinValue, int.MinValue, int.MinValue,
						String.Empty, DateTime.Now, String.Empty, DateTime.MinValue, parentAlbum != null ? parentAlbum.IsPrivate : false, false, videoFile, null)
        {
        }
开发者ID:Jiyuu,项目名称:galleryserverpro,代码行数:22,代码来源:Video.cs

示例5: FieldProblem_leftend

		public FieldProblem_leftend()
		{
            viewMock = MockRepository.Mock<IAddAlbumPresenter>();
            albumMock = MockRepository.Mock<IAlbum>();

            viewMock.ExpectEvent(x => x.Save += Arg<EventHandler<EventArgs>>.Is.NotNull);
		}
开发者ID:bytedreamer,项目名称:rhino-mocks,代码行数:7,代码来源:FieldProblem_leftend.cs

示例6: FieldProblem_leftend

        public FieldProblem_leftend()
        {
            viewMock = (IAddAlbumPresenter)MockRepository.GenerateMock(typeof(IAddAlbumPresenter), null, null);
            albumMock = MockRepository.GenerateStrictMock<IAlbum>();

            saveRaiser = viewMock.Expect(x => x.Save += null).IgnoreArguments().Constraints(Is.NotNull()).GetEventRaiser();
        }
开发者ID:alaendle,项目名称:rhino-mocks,代码行数:7,代码来源:FieldProblem_leftend.cs

示例7: ForTrack

        //public static IAlbum ForAlbum(int iTrackNumber=0)
        //{
        //    CompleteObservableCollectionImpl<ITrack> coci = new CompleteObservableCollectionImpl<ITrack>();
        //    IAlbum res = Substitute.For<IAlbum>();
        //    res.IsAlive.Returns(true);
        //    res.Tracks.Returns(coci);

        //    for (int i = 0; i < iTrackNumber; i++)
        //    {
        //        IInternalTrack subres = ForTrack(res);
        //    }
        //    return res;
        //}

        internal static IInternalTrack ForTrack(IAlbum Father)
        {
            IInternalTrack res = Substitute.For<IInternalTrack>();
            Father.Tracks.Add(res);
            res.Album.Returns(Father);
            res.IsAlive.Returns(true);
            return res;
        }
开发者ID:David-Desmaisons,项目名称:MusicCollection,代码行数:22,代码来源:SubstiteBuilder.cs

示例8: Album

 public Album(IAlbum album)
 {
     Artist = new Artist(album.Artist);
     CoverId = album.CoverId;
     Name = album.Name;
     Type = album.Type;
     Year = album.Year;
 }
开发者ID:thematlin,项目名称:Jukebox,代码行数:8,代码来源:Album.cs

示例9: AlbumViewer

        public AlbumViewer(IAlbum album)
        {
            InitializeComponent();
            _album = album;

            albumName.Text = _album.Name;
            musicList.Items.AddRange(_album.GetAllMusics().Select(p=>p.Name).ToArray());
        }
开发者ID:Sorcha,项目名称:SD-Trabalho1,代码行数:8,代码来源:AlbumViewer.cs

示例10: SaveCommit

 public void SaveCommit(IAlbum album, out bool success)
 {
     using (IUnitOfWork u = UnitOfWork.Begin())
     {
         Save(album, out success);
         if (success)
             u.Commit();
     }
 }
开发者ID:coredweller,项目名称:PhishMarket,代码行数:9,代码来源:AlbumService.cs

示例11: CopyGalleryObject

        /// <summary>
        /// Copy the specified object and place it in the specified destination album. This method creates a completely separate copy
        /// of the original, including copying the physical files associated with this object. The copy is persisted to the data
        /// store and then returned to the caller. When copying albums, all the album's children, grandchildren, etc are also copied.
        /// The audit fields of the copied objects are automatically updated before saving.
        /// </summary>
        /// <param name="galleryObjectToCopy">The gallery object to copy.</param>
        /// <param name="destinationAlbum">The album to which the current object should be copied.</param>
        /// <returns>
        /// Returns a new gallery object that is an exact copy of the original, except that it resides in the specified
        /// destination album, and of course has a new ID. Child objects are recursively copied.
        /// </returns>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="galleryObjectToCopy" /> is null.</exception>
        public static IGalleryObject CopyGalleryObject(IGalleryObject galleryObjectToCopy, IAlbum destinationAlbum)
        {
            if (galleryObjectToCopy == null)
                throw new ArgumentNullException("galleryObjectToCopy");

            string currentUser = Utils.UserName;

            return galleryObjectToCopy.CopyTo(destinationAlbum, currentUser);
        }
开发者ID:raquelsa,项目名称:GalleryServerProWeb,代码行数:22,代码来源:GalleryObjectController.cs

示例12: ConvertToDto

        public static Album ConvertToDto(IAlbum album)
        {
            using (album)
            {
                album.WaitUntilLoaded();

                return Mapper.Map<IAlbum, Album>(album);
            }
        }
开发者ID:torshy,项目名称:torshify-server,代码行数:9,代码来源:Convertion.cs

示例13: ViewPhotoForm

 /// <summary>
 /// Initializes a new instance of the <see cref="ViewPhotoForm"/> class.
 /// </summary>
 /// <param name="currentAlbum">The album whose photos the user is viewing.</param>
 /// <param name="photoToDisplay">the specific photo to view.</param>
 /// <remarks>
 /// Author(s): Miguel Gonzales and Andrea Tan
 /// </remarks>
 public ViewPhotoForm(IAlbum currentAlbum, IPhoto photoToDisplay)
 {
     this.InitializeComponent();
     this.album = currentAlbum;
     this.Text = this.album.AlbumId + " - Photo Buddy";
     this.allPhotosInAlbum = new List<IPhoto>(this.album.Photos);
     this.photoIndex = this.allPhotosInAlbum.IndexOf(photoToDisplay);
     this.DisplayPhoto(this.photoIndex);
 }
开发者ID:jamesrcounts,项目名称:CS441,代码行数:17,代码来源:ViewPhotoForm.cs

示例14: AlbumInformation

 public AlbumInformation(IAlbum album, Dispatcher dispatcher)
 {
     _tracks = new ObservableCollection<Track>();
     _copyrights = new ObservableCollection<string>();
     _dispatcher = dispatcher;
     _album = album;
     _browse = _album.Browse();
     _isLoading = !_browse.IsComplete;
     _browse.Completed += AlbumBrowseCompleted;
 }
开发者ID:kms,项目名称:torshify-client,代码行数:10,代码来源:AlbumInformation.cs

示例15: Album

        public Album(IAlbum album, Dispatcher dispatcher)
        {
            _dispatcher = dispatcher;
            InternalAlbum = album;

            _artist = new Lazy<Artist>(() => new Artist(InternalAlbum.Artist, dispatcher));
            _albumType = new Lazy<TorshifyAlbumType>(GetAlbumType);
            _name = new Lazy<string>(() => InternalAlbum.Name);
            _year = new Lazy<int>(() => InternalAlbum.Year);
        }
开发者ID:kms,项目名称:torshify-client,代码行数:10,代码来源:Album.cs


注:本文中的IAlbum类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。