Source

main / Source / WebService / Web.Admin / RepositoryFactory.cs

Full commit
Naethra D ba1cb57 










































namespace DataUp.Web.Admin
{
    public class RepositoryFactory
    {
        public static IRepository GetRepositoryInstance(string instanceName)
        {
            switch (instanceName)
            {
                case Constants.MerrittRepositoryName:
                    return new MerritRepository();
                default:
                    return new MerritRepository();
            }
        }

        public static string GetIdentifierLink(string repositoryName)
        {
            // TODO : URL is hard coded as of now. Need to get it from a DB/persisted place.
            switch (repositoryName.ToLower())
            {
                case Constants.MerrittRepositoryName:
                    return Constants.MerrittIdentifierLink;
                default:
                    return Constants.MerrittIdentifierLink;
            }
        }

        public static string GetPostFileLink(string repositoryName)
        {
            // TODO : URL is hard coded as of now. Need to get it from a DB/persisted place.
            switch (repositoryName.ToLower())
            {
                case Constants.MerrittRepositoryName:
                    return Constants.MerrittPostFileLink;
                default:
                    return Constants.MerrittPostFileLink;
            }
        }
    }
}