/// <summary>
        /// Resolves the models of an extension from a ParsedPartial.
        /// </summary>
        /// <param name="parsedFragment">The partially parsed extension.</param>
        /// <returns>The models of the extension</returns>
        public static List<Repository> Resolve( Fragment parsedFragment )
        {
            IEnumerable<Fragment> repositoryPartials = parsedFragment.Fragments.Where( p => p.Keyword == Keywords.ExtensionDirectives.DeclareRepository );
              if( !repositoryPartials.Any() ) return null;

              List<Repository> repositories = new List<Repository>();
              foreach( Fragment repositoryPartial in repositoryPartials ) {
            Repository repository = new Repository {
                                                 TargetModelName = repositoryPartial.Parameters,
                                                 SourceFragment = repositoryPartial,
                                               };
            repositories.Add( repository );
            if( repositoryPartial.Fragments.Any() ) {
              foreach( Fragment dataMember in repositoryPartial.Fragments ) {
            if( dataMember.Keyword == Keywords.PluginDirectives.Action ) {
              Action action = ActionResolver.ResolveAction( dataMember );
              repository.Methods.Add( action );

            } else if( dataMember.Keyword == Keywords.Implementation) {
              repository.Implementation = dataMember.Parameters;

            } else if( dataMember.Keyword == Keywords.InternalType ) {
              repository.InternalType = dataMember.Parameters;
            }
              }
            }
              }

              return repositories;
        }
 /// <summary>
 /// Does this repository wrap an internal type WITHOUT providing an own implementation.
 /// This is usually the case when referencing repositories that already exist in TYPO3, like Tx_Extbase_Domain_Repository_FrontendUserRepository
 /// </summary>
 /// <param name="repository"></param>
 /// <returns></returns>
 private static bool PurelyWrapsInternalType( Repository repository )
 {
     return !string.IsNullOrEmpty( repository.InternalType ) && string.IsNullOrEmpty( repository.Implementation );
 }