public virtual bool CanExtend(string ExtenderCATID, string ExtenderName, object ExtendeeObject) { if (ExtenderName != Name) { return(false); } FileNodeProperties fileNodeProperties = ExtendeeObject as FileNodeProperties; if (fileNodeProperties == null) { return(false); } FileNode fileNode = fileNodeProperties.Node as FileNode; if (fileNode == null) { return(false); } if (fileNode.CreateSingleFileGenerator() == null) { return(false); } return(true); }
public virtual object GetExtender(string ExtenderCATID, string ExtenderName, object ExtendeeObject, IExtenderSite ExtenderSite, int Cookie) { SingleFileGeneratorNodeExtenderProperties extender = null; if (CanExtend(ExtenderCATID, ExtenderName, ExtendeeObject)) { FileNodeProperties fileNodeProperties = (FileNodeProperties)ExtendeeObject; FileNode fileNode = (FileNode)fileNodeProperties.Node; extender = new SingleFileGeneratorNodeExtenderProperties(fileNode); } return(extender); }