private bool TemplateIsClonable(MasterPagePageTemplateDescriptor templateDescriptor) { string codebehindFile = templateDescriptor.CodeBehindFilePath; if (codebehindFile == null) { return(false); } string masterFile = templateDescriptor.FilePath; string codebehindFileReference = "\"" + Path.GetFileName(codebehindFile) + "\""; string templateId = templateDescriptor.Id.ToString(); return(C1File.ReadAllText(codebehindFile).IndexOf(templateId, StringComparison.OrdinalIgnoreCase) > 0 && C1File.ReadAllText(masterFile).IndexOf(codebehindFileReference, StringComparison.OrdinalIgnoreCase) > 0); }
public MasterPagePageTemplateDeleter(MasterPagePageTemplateDescriptor templateDescriptor) { _templateDescriptor = templateDescriptor; }