Docear4Word.CiteProcRunner.CreateEntryAndPagePairByID C# (CSharp) Method

CreateEntryAndPagePairByID() private method

private CreateEntryAndPagePairByID ( string id ) : Docear4Word.EntryAndPagePair
id string
return Docear4Word.EntryAndPagePair
        EntryAndPagePair CreateEntryAndPagePairByID(string id)
        {
            var hashIndex = id.IndexOf("#");
            string entryName;
            string pageNumberOverride;

            if (hashIndex == -1)
            {
                entryName = id;
                pageNumberOverride = null;
            }
            else
            {
                entryName = id.Substring(0, hashIndex);
                pageNumberOverride = id.Substring(hashIndex + 1);
            }

            var entry = databaseProvider()[entryName];
            if (entry == null)
            {
                throw new InvalidOperationException(String.Format("Cannot find item named '{0}' in BibTex database", entryName));
            }

            return new EntryAndPagePair(entry, pageNumberOverride);
        }