public static IFFFile.Node FindNode(this IFFFile file, string nodeToFind, string rootNode = "SHOT") { if (rootNode != null && (file.Root.Type != rootNode || !file.Root.Children.Any())) { return(null); } return(FindSubNode(file.Root, nodeToFind)); }
public override void ReadFile(IFFFile File, ITemplateRepository repo) { if (File.Root.Type != "SITN") { _Logger.Warn("Got {0} when expecting SHOT", File.Root.Type); return; } ReadNode(File.Root, repo, false); }
public static IEnumerable <IFFFile.Node> FindSiblingNodes(this IFFFile file, string nodeToFind, string rootNode = null) { if (file.Root.Type != rootNode || !file.Root.Children.Any()) { return(new IFFFile.Node[0]); } var found = FindSubNode(file.Root, nodeToFind); if (found == null || found.Parent == null) { return(new IFFFile.Node[0]); } return(found.Parent.Children); }
public override void ReadFile(IFFFile File, ITemplateRepository repo) { ReadNode(File.Root, repo); }
public virtual void ReadFile(IFFFile File, ITemplateRepository repo) { ReadNode(File.Root, repo); //InternalParse(File.Root, repo); }
public SharedObjectTemplate(IFFFile File, ITemplateRepository repo) { ReadFile(File, repo); }
public GenericSharedTemplate(string rootNodeType, IFFFile file, ITemplateRepository repo) : this(rootNodeType, file.Root, repo) { }
static IFFEntry() { GetIff = new IFFFile(); }