示例#1
0
        private SolutionRepositoryItemInfo <T> GetSolutionRepositoryItemInfo <T>()
        {
            SolutionRepositoryItemInfoBase SRIIBase = GetSolutionRepositoryItemInfo(typeof(T));
            SolutionRepositoryItemInfo <T> SRII     = (SolutionRepositoryItemInfo <T>)SRIIBase;

            return(SRII);
        }
示例#2
0
        /// <summary>
        /// Get Repository Item by it GUID
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="repositoryItemGuid"></param>
        /// <returns></returns>
        public T GetRepositoryItemByGuid <T>(Guid repositoryItemGuid)
        {
            SolutionRepositoryItemInfo <T> SRII = GetSolutionRepositoryItemInfo <T>();
            T RI = SRII.GetItemByGuid(repositoryItemGuid);

            return(RI);
        }
示例#3
0
        // ------------------------------------------------------------------------------------------------
        //  private functions
        // ------------------------------------------------------------------------------------------------

        public void AddItemInfo <T>(string pattern, string rootFolder, bool containRepositoryItems, string displayName, string PropertyNameForFileName)
        {
            SolutionRepositoryItemInfo <T> SRII = new SolutionRepositoryItemInfo <T>();

            SRII.ItemFileSystemRootFolder = rootFolder;
            SRII.PropertyForFileName      = PropertyNameForFileName;
            SRII.Pattern = pattern;
            SRII.ItemRootReposiotryfolder = new RepositoryFolder <T>(this, SRII, pattern, rootFolder, containRepositoryItems, displayName, true);

            mSolutionRepositoryItemInfoDictionary.Add(typeof(T), SRII);
            mSolutionRootFolders.Add((RepositoryFolderBase)SRII.ItemRootRepositoryFolder);
        }
示例#4
0
 public RepositoryFolder(SolutionRepository SolutionRepository, SolutionRepositoryItemInfo <T> solutionRepositoryItemInfo, string pattern, string FolderRelativePath, bool ContainsRepositoryItems = true, string DisplayName = null, bool isRootFolder = false)
 {
     this.SolutionRepository     = SolutionRepository;
     mSolutionRepositoryItemInfo = solutionRepositoryItemInfo;
     this.FolderRelativePath     = FolderRelativePath;
     //this.FolderFullPath = SolutionRepository.GetFolderFullPath(FolderRelativePath);
     this.DisplayName             = DisplayName;
     this.ContainsRepositoryItems = ContainsRepositoryItems;
     this.ItemFilePattern         = pattern;
     base.ItemType = typeof(T);
     IsRootFolder  = isRootFolder;
 }
示例#5
0
        /// <summary>
        /// Get first cached Repository Item from provided Repository Item Type (if list is empty then null will be returned)
        /// </summary>
        /// <typeparam name="T">Repository Item Type</typeparam>
        /// <returns></returns>
        public dynamic GetFirstRepositoryItem <T>()
        {
            SolutionRepositoryItemInfo <T> SRII = GetSolutionRepositoryItemInfo <T>();

            if (SRII.GetAllItemsCache().Count > 0)
            {
                return(SRII.GetAllItemsCache()[0]);
            }
            else
            {
                return(null);
            }
        }
示例#6
0
        /// <summary>
        /// Get list of All cached Repository Items from provided Repository Item Type
        /// </summary>
        /// <typeparam name="T">Repository Item Type</typeparam>
        /// <returns></returns>
        public ObservableList <T> GetAllRepositoryItems <T>()
        {
            SolutionRepositoryItemInfo <T> SRII = GetSolutionRepositoryItemInfo <T>();

            return(SRII.GetAllItemsCache());
        }
示例#7
0
        /// <summary>
        /// Get the root RepositoryFolder of the provided Repository Item Type
        /// </summary>
        /// <typeparam name="T">Repository Item Type</typeparam>
        /// <returns></returns>
        public RepositoryFolder <T> GetRepositoryItemRootFolder <T>()
        {
            SolutionRepositoryItemInfo <T> SRII = GetSolutionRepositoryItemInfo <T>();

            return(SRII.ItemRootReposiotryfolder);
        }