private ObjectType CreateObjectTypeFrom(textfilecontent_object fileContentObject, string fileName, string line, string path) { EntityObjectStringType pathFrom = (EntityObjectStringType)fileContentObject.GetItemValue(textfilecontent_ItemsChoices.path); EntityObjectStringType fileNameFrom = (EntityObjectStringType)fileContentObject.GetItemValue(textfilecontent_ItemsChoices.filename); EntityObjectStringType lineFrom = (EntityObjectStringType)fileContentObject.GetItemValue(textfilecontent_ItemsChoices.line); EntityObjectStringType newPath = this.CreateObjectStringTypeFrom(pathFrom); newPath.Value = !string.IsNullOrEmpty(path) ? path : newPath.Value; EntityObjectStringType newFileName = this.CreateObjectStringTypeFrom(fileNameFrom); newFileName.Value = !string.IsNullOrEmpty(fileName) ? fileName : newFileName.Value; EntityObjectStringType newLine = this.CreateObjectStringTypeFrom(lineFrom); newLine.Value = !string.IsNullOrEmpty(line) ? line : newLine.Value; return this.CreateFileObject(newFileName, newLine, newPath); }
private IEnumerable<string> ProcessVariableForLine(textfilecontent_object fileContentObject) { EntityObjectStringType line = (EntityObjectStringType)fileContentObject.GetItemValue(textfilecontent_ItemsChoices.line); return this.processVariablesForEntity(line); }