コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FileRowViewModel"/> class.
        /// </summary>
        /// <param name="file">
        /// The <see cref="File"/> associated with this row
        /// </param>
        /// <param name="session">
        /// The session
        /// </param>
        /// <param name="containerViewModel">
        /// The <see cref="IViewModelBase<Thing>"/> that is the container of this <see cref="IRowViewModelBase{Thing}"/>
        /// </param>
        public FileRowViewModel(File file, ISession session, IFileStoreRow containerViewModel)
            : base(file, session, (IViewModelBase <Thing>)containerViewModel)
        {
            if (containerViewModel == null)
            {
                throw new ArgumentNullException("containerViewModel", "The containerViewModel may not be null");
            }

            this.fileStoreRow = (IFileStoreRow)containerViewModel;
            this.UpdateProperties();
        }
コード例 #2
0
 /// <summary>
 /// Creates a new instance of <see cref="FileStoreFileAndFolderHandler"/>
 /// </summary>
 /// <param name="fileStoreRow">
 /// The ViewModel that implements both <see cref="IViewModelBase<FileStore>"/> and <see cref="IFileStoreRow"/>.
 /// Typically a <see cref="CommonFileStore"/> or <see cref="DomainFileStore"/>.
 /// </param>
 public FileStoreFileAndFolderHandler(IFileStoreRow <T> fileStoreRow)
 {
     this.fileStoreRow = fileStoreRow;
     this.folderCache  = new Dictionary <Folder, FolderRowViewModel>();
     this.fileCache    = new Dictionary <File, FileRowViewModel>();
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FolderRowViewModel"/> class.
 /// </summary>
 /// <param name="folder">
 /// The <see cref="Folder"/> associated with this row
 /// </param>
 /// <param name="session">
 /// The session
 /// </param>
 /// <param name="containerViewModel">
 /// The <see cref="IViewModelBase<Thing>"/> that is the container of this <see cref="IRowViewModelBase{Thing}"/>
 /// </param>
 public FolderRowViewModel(Folder folder, ISession session, IFileStoreRow containerViewModel)
     : base(folder, session, (IViewModelBase <Thing>)containerViewModel)
 {
     this.fileStoreRow = (IViewModelBase <Thing>)containerViewModel;
 }