cvsimport
[beagle.git] / beagled / Lucene.Net / Util / Constants.cs
blobe7b5da5c45f1a5e5e999b0f6182390e619cbbdf1
1 /*
2 * Copyright 2004 The Apache Software Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 using System;
19 namespace Lucene.Net.Util
22 /// <summary> Some useful constants.
23 ///
24 /// </summary>
25 /// <author> Doug Cutting
26 /// </author>
27 /// <version> $Id: Constants.cs,v 1.3 2006/10/02 17:09:10 joeshaw Exp $
28 ///
29 /// </version>
31 public sealed class Constants
33 private Constants()
35 } // can't construct
37 /// <summary>The value of <tt>System.getProperty("java.version")<tt>. *</summary>
38 public static readonly System.String JAVA_VERSION = System.Configuration.ConfigurationSettings.AppSettings.Get("java.version"); // {{Aroush-1.9}}
39 /// <summary>True iff this is Java version 1.1. </summary>
40 public static readonly bool JAVA_1_1 = JAVA_VERSION.StartsWith("1.1.");
41 /// <summary>True iff this is Java version 1.2. </summary>
42 public static readonly bool JAVA_1_2 = JAVA_VERSION.StartsWith("1.2.");
43 /// <summary>True iff this is Java version 1.3. </summary>
44 public static readonly bool JAVA_1_3 = JAVA_VERSION.StartsWith("1.3.");
46 /// <summary>The value of <tt>System.getProperty("os.name")<tt>. *</summary>
47 public static readonly System.String OS_NAME = System.Environment.GetEnvironmentVariable("OS");
48 /// <summary>True iff running on Linux. </summary>
49 public static readonly bool LINUX = OS_NAME.StartsWith("Linux");
50 /// <summary>True iff running on Windows. </summary>
51 public static readonly bool WINDOWS = OS_NAME.StartsWith("Windows");
52 /// <summary>True iff running on SunOS. </summary>
53 public static readonly bool SUN_OS = OS_NAME.StartsWith("SunOS");