示例#1
0
 public static IForceEntrySymbol CreateEntry(
     ISymbol containingSymbol,
     ForceEntryNode item,
     DiagnosticBag diagnostics)
 {
     return(new ForceEntrySymbol(containingSymbol, item, diagnostics));
 }
示例#2
0
        public static ForceNode Force(ForceEntryNode forceEntry, string id = null)
        {
            var catalogue = forceEntry.FirstAncestorOrSelf <CatalogueBaseNode>();

            if (catalogue is null)
            {
                throw new ArgumentException(
                          "Can't use ForceEntry that isn't a descendant of any Catalogue or Gamesystem.",
                          nameof(forceEntry));
            }
            return(Force(
                       id: id ?? NewId(),
                       name: forceEntry.Name,
                       entryId: forceEntry.Id,
                       entryGroupId: null,
                       publicationId: forceEntry.PublicationId,
                       page: forceEntry.Page,
                       catalogueId: catalogue.Id,
                       catalogueRevision: catalogue.Revision,
                       catalogueName: catalogue.Name));
        }