public static IsWiXDocumentType GetDocumentType(this XDocument Document) { IsWiXDocumentType docType = IsWiXDocumentType.None; if (NameSpaces(Document)[""] == GetWiXNameSpace(Document)) { switch (Document.Root.Elements().First().Name.LocalName) { case "Product": docType = IsWiXDocumentType.Product; break; case "Module": docType = IsWiXDocumentType.Module; break; case "Fragment": docType = IsWiXDocumentType.Fragment; break; default: docType = IsWiXDocumentType.None; break; } } return(docType); }
public bool IsValidContext() { bool valid = false; IsWiXDocumentType documentType = _documentManager.Document.GetDocumentType(); if (documentType == IsWiXDocumentType.Product || documentType == IsWiXDocumentType.Fragment) { valid = true; } return(valid); }
public bool IsValidContext() { IsWiXDocumentType docType = _mgr.DocumentManager.Document.GetDocumentType(); if (docType != IsWiXDocumentType.None) { return(true); } else { return(false); } }
public bool IsValidContext() { IsWiXDocumentType docType = _documentManager.Document.GetDocumentType(); if (docType == IsWiXDocumentType.Product || docType == IsWiXDocumentType.Module) { return(true); } else { return(false); } }