/// <summary>
 /// Gets a namespace model by code reference.
 /// </summary>
 /// <param name="cRef">The code reference.</param>
 /// <returns>A namespace model if found.</returns>
 protected CodeDocSimpleNamespace GetCodeDocSimpleNamespace(CRefIdentifier cRef)
 {
     Contract.Requires(cRef != null);
     return Repository.Namespaces.FirstOrDefault(x => cRef.Equals(x.CRef));
 }
 /// <summary>
 /// Gets an assembly model by code reference.
 /// </summary>
 /// <param name="cRef">The code reference.</param>
 /// <returns>An assembly model if found.</returns>
 public CodeDocSimpleAssembly GetCodeDocSimpleAssembly(CRefIdentifier cRef)
 {
     Contract.Requires(cRef != null);
     var assemblies = Repository.Assemblies;
     return assemblies.FirstOrDefault(x => cRef.Equals(x.CRef))
         ?? assemblies.FirstOrDefault(x => cRef.CoreName == x.AssemblyFileName)
         ?? assemblies.FirstOrDefault(x => cRef.CoreName == x.ShortName);
 }