Thumbnail file hits. Based on a patch from D Bera
[beagle.git] / beagled / Lucene.Net / Util / Constants.cs
blob0c0e8dfff4eccf1d363f8783978881edefd2479e
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.
16 using System;
17 namespace Lucene.Net.Util
19 /// <summary> Some useful constants.
20 ///
21 /// </summary>
22 /// <author> Doug Cutting
23 /// </author>
24 /// <version> $Id: Constants.cs,v 1.1 2005/01/17 19:54:32 joeshaw Exp $
25 ///
26 /// </version>
28 public sealed class Constants
30 private Constants()
32 } // can't construct
34 /// <summary>The value of <tt>System.getProperty("java.version")<tt>. *</summary>
35 public static readonly System.String JAVA_VERSION = System.Configuration.ConfigurationSettings.AppSettings.Get("java.version");
36 /// <summary>True iff this is Java version 1.1. </summary>
37 public static readonly bool JAVA_1_1 = JAVA_VERSION.StartsWith("1.1.");
38 /// <summary>True iff this is Java version 1.2. </summary>
39 public static readonly bool JAVA_1_2 = JAVA_VERSION.StartsWith("1.2.");
40 /// <summary>True iff this is Java version 1.3. </summary>
41 public static readonly bool JAVA_1_3 = JAVA_VERSION.StartsWith("1.3.");
43 /// <summary>The value of <tt>System.getProperty("os.name")<tt>. *</summary>
44 public static readonly System.String OS_NAME = System.Environment.GetEnvironmentVariable("OS");
45 /// <summary>True iff running on Linux. </summary>
46 public static readonly bool LINUX = OS_NAME.StartsWith("Linux");
47 /// <summary>True iff running on Windows. </summary>
48 public static readonly bool WINDOWS = OS_NAME.StartsWith("Windows");
49 /// <summary>True iff running on SunOS. </summary>
50 public static readonly bool SUN_OS = OS_NAME.StartsWith("SunOS");