Skip to content

Commit 5964024

Browse files
addition of version argument
commented out file appender completely
1 parent 39710e9 commit 5964024

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

MainClass.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ public static class MainClass
1212
private static readonly log4net.ILog Log =
1313
log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
1414

15+
public static string _version = "1.1.7";
16+
1517
public static void Main(string[] args)
1618
{
1719
string rawFilePath = null;
@@ -29,15 +31,19 @@ public static void Main(string[] args)
2931
string bucketName = null;
3032
var ignoreInstrumentErrors = false;
3133
var noPeakPicking = false;
32-
3334
var help = false;
35+
var version = false;
3436

3537
var optionSet = new OptionSet
3638
{
3739
{
3840
"h|help", "Prints out the options.",
3941
h => help = h != null
4042
},
43+
{
44+
"version", "Prints out the library version.",
45+
v => version = v != null
46+
},
4147
{
4248
"i=|input=", "The raw file input.",
4349
v => rawFilePath = v
@@ -115,6 +121,12 @@ public static void Main(string[] args)
115121
return;
116122
}
117123

124+
if (version)
125+
{
126+
Console.WriteLine(_version);
127+
return;
128+
}
129+
118130
if (outputMetadataString == null && outputFormatString == null)
119131
{
120132
throw new OptionException("The parameter -f or -m should be provided",

Writer/MzMlSpectrumWriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public override void Write(IRawDataPlus rawFile, int firstScanNumber, int lastSc
223223
// software
224224
_writer.WriteStartElement("software");
225225
_writer.WriteAttributeString("id", "ThermoRawFileParser");
226-
_writer.WriteAttributeString("version", "1.1.7");
226+
_writer.WriteAttributeString("version", MainClass._version);
227227
SerializeCvParam(new CVParamType
228228
{
229229
accession = "MS:1000799",

log4net.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<root>
33
<level value="INFO" />
44
<appender-ref ref="console" />
5-
<appender-ref ref="file" />
5+
<!--<appender-ref ref="file" />-->
66
</root>
77
<appender name="console" type="log4net.Appender.ConsoleAppender">
88
<layout type="log4net.Layout.PatternLayout">

0 commit comments

Comments
 (0)