Beispiel #1
0
        protected internal IMdContentProvider GetContentProvider()
        {
            // see if git is being used or just the file system
            // if the config has a value for gitUri then its git

            IMdContentProvider result = null;

            MdContentProviderType mdProviderType = fainting.goat.common.Config.GetContentProviderTypeFromConfig(this.Config);

            if (mdProviderType == MdContentProviderType.Git)
            {
                result = new GitMdContentProvier(
                    KernelManager.GetKernel().Get <GitHelper>(),
                    this.Config,
                    this.LocalRepoPath);
            }
            else if (mdProviderType == MdContentProviderType.FileSystem)
            {
                result = new FileSystemMdContentProvider();
            }
            else
            {
                string message = string.Format("Unknown MdContentProviderType [{0}]", mdProviderType);
                // TODO: Change provider type here
                throw new ApplicationException(message);
            }

            return(result);
        }
        protected internal IMdContentProvider GetContentProvider()
        {
            // see if git is being used or just the file system
            // if the config has a value for gitUri then its git

            IMdContentProvider result = null;

            MdContentProviderType mdProviderType = fainting.goat.common.Config.GetContentProviderTypeFromConfig(this.Config);
            if (mdProviderType == MdContentProviderType.Git) {

                result = new GitMdContentProvier(
                    KernelManager.GetKernel().Get<GitHelper>(),
                    this.Config,
                    this.LocalRepoPath);
            }
            else if (mdProviderType == MdContentProviderType.FileSystem) {
                result = new FileSystemMdContentProvider();
            }
            else {
                string message = string.Format("Unknown MdContentProviderType [{0}]", mdProviderType);
                // TODO: Change provider type here
                throw new ApplicationException(message);
            }

            return result;
        }