private void ExtractParameters(SXILElementCategory aCategory) { foreach (SXILElement element in aCategory) { if (element is SXILElementExtension) { SXILElementExtension entry = (SXILElementExtension)element; // string extension = entry.Name; if (!extension.StartsWith(".")) { extension = "." + extension; } // if (entry.Type == SXILElementExtension.TType.ETypeFailure) { Trace("[CmdInput] ExtractFileList() - failed extension: " + extension); iSinkParams.FileExtensionFailed = extension; } else if (entry.Type == SXILElementExtension.TType.ETypeSuccess) { Trace("[CmdInput] ExtractFileList() - success extension: " + extension); iSinkParams.FileExtensionSuccess = extension; } } else if (element is SXILElementCommand) { SXILElementCommand entry = (SXILElementCommand)element; // if (entry.Name == KInputFileCommandNameAnalysis) { string type = entry.Details.Trim().ToUpper(); Trace("[CmdInput] ExtractFileList() - command: " + type); switch (type) { case KInputFileCommandNameAnalysisFull: iSinkParams.DetailLevel = CISinkSerializationParameters.TDetailLevel.EFull; break; case KInputFileCommandNameAnalysisSummary: iSinkParams.DetailLevel = CISinkSerializationParameters.TDetailLevel.ESummary; break; default: throw new NotSupportedException("Unsupported analysis type"); } } else { throw new NotSupportedException("Unsupported command: " + entry.Name); } } } }
public override void XmlParse(XmlNode aNode) { XmlAttributeCollection attribs = aNode.Attributes; if (attribs.Count < 1 || attribs["name"] == null) { throw new ArgumentException("Mandatory name node missing"); } XmlAttribute nameAttribute = attribs["name"]; string name = nameAttribute.Value.Trim(); // Get details if present string details = aNode.InnerText.Trim(); SXILElementCommand command = new SXILElementCommand(name, details); base.Document.CurrentNode.Add(command); iHandled = true; }
private void ExtractParameters(SXILElementCategory aCategory) { foreach (SXILElement element in aCategory) { if (element is SXILElementCommand) { SXILElementCommand entry = (SXILElementCommand)element; // string type = entry.Details.Trim(); if (entry.Name == KInputFileCommandNameAnalysis) { Trace("[CmdInput] ExtractFileList() - command: " + type); switch (type.ToUpper()) { case KInputFileCommandNameAnalysisViewer: iEngine.OperationType = HeapWizardEngine.TOperationType.EOperationTypeAnalyseAndView; break; case KInputFileCommandNameAnalysisCompareTwoHeaps: iEngine.OperationType = HeapWizardEngine.TOperationType.EOperationTypeCompareHeapDumps; break; default: throw new HAUIException("Unsupported analysis type", HAUIException.KErrCommandLineAnalysisTypeNotSupported); } } else if (entry.Name == KInputFileCommandThread) { iThreadName = type; } else { throw new HAUIException("Unsupported command: " + entry.Name, HAUIException.KErrCommandLineInvalidCommand); } } } }