Lucene.Net.Support: Deleted AppSettings (no longer in use)
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/1631768c Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/1631768c Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/1631768c Branch: refs/heads/api-work Commit: 1631768c684265a4f3669a9c5863cbe8c4a24df8 Parents: 47e6487 Author: Shad Storhaug <[email protected]> Authored: Thu Apr 13 01:09:48 2017 +0700 Committer: Shad Storhaug <[email protected]> Committed: Thu Apr 13 01:09:48 2017 +0700 ---------------------------------------------------------------------- src/Lucene.Net/Lucene.Net.csproj | 1 - src/Lucene.Net/Support/AppSettings.cs | 162 ----------------------------- 2 files changed, 163 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1631768c/src/Lucene.Net/Lucene.Net.csproj ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Lucene.Net.csproj b/src/Lucene.Net/Lucene.Net.csproj index d28a1a8..107f6c0 100644 --- a/src/Lucene.Net/Lucene.Net.csproj +++ b/src/Lucene.Net/Lucene.Net.csproj @@ -594,7 +594,6 @@ <Compile Include="Store\SingleInstanceLockFactory.cs" /> <Compile Include="Store\TrackingDirectoryWrapper.cs" /> <Compile Include="Store\VerifyingLockFactory.cs" /> - <Compile Include="Support\AppSettings.cs" /> <Compile Include="Support\AssemblyExtensions.cs" /> <Compile Include="Support\AtomicBoolean.cs" /> <Compile Include="Support\AtomicInteger.cs" /> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1631768c/src/Lucene.Net/Support/AppSettings.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Support/AppSettings.cs b/src/Lucene.Net/Support/AppSettings.cs deleted file mode 100644 index 83ee7d6..0000000 --- a/src/Lucene.Net/Support/AppSettings.cs +++ /dev/null @@ -1,162 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -using System; - -namespace Lucene.Net.Support -{ - /// <summary> - /// - /// </summary> - public class AppSettings - { - private static System.Collections.Specialized.ListDictionary settings = new System.Collections.Specialized.ListDictionary(); - - /// <summary> - /// - /// </summary> - /// <param name="key"></param> - /// <param name="defValue"></param> - public static void Set(System.String key, int defValue) - { - settings[key] = defValue; - } - - /// <summary> - /// - /// </summary> - /// <param name="key"></param> - /// <param name="defValue"></param> - public static void Set(System.String key, long defValue) - { - settings[key] = defValue; - } - - /// <summary> - /// - /// </summary> - /// <param name="key"></param> - /// <param name="defValue"></param> - public static void Set(System.String key, System.String defValue) - { - settings[key] = defValue; - } - - /// <summary> - /// - /// </summary> - /// <param name="key"></param> - /// <param name="defValue"></param> - public static void Set(System.String key, bool defValue) - { - settings[key] = defValue; - } - - /// <summary> - /// - /// </summary> - /// <param name="key"></param> - /// <param name="defValue"></param> - /// <returns></returns> - public static int Get(System.String key, int defValue) - { - if (settings[key] != null) - { - return (int)settings[key]; - } - - var theValue = Configuration.Configuration.GetAppSetting(key); - - if (theValue == null) - { - return defValue; - } - int retValue = Convert.ToInt32(theValue.Trim()); - settings[key] = retValue; - return retValue; - } - - /// <summary> - /// - /// </summary> - /// <param name="key"></param> - /// <param name="defValue"></param> - /// <returns></returns> - public static long Get(System.String key, long defValue) - { - if (settings[key] != null) - { - return (long)settings[key]; - } - - var theValue = Configuration.Configuration.GetAppSetting(key); - - if (theValue == null) - { - return defValue; - } - long retValue = Convert.ToInt64(theValue.Trim()); - settings[key] = retValue; - return retValue; - } - - /// <summary> - /// - /// </summary> - /// <param name="key"></param> - /// <param name="defValue"></param> - /// <returns></returns> - public static System.String Get(System.String key, System.String defValue) - { - if (settings[key] != null) - { - return (System.String)settings[key]; - } - - System.String theValue = Configuration.Configuration.GetAppSetting(key); - - if (theValue == null) - { - return defValue; - } - settings[key] = theValue; - return theValue; - } - - public static bool Get(System.String key, bool defValue) - { - if (settings[key] != null) - { - return (bool)settings[key]; - } - - var theValue = Configuration.Configuration.GetAppSetting(key); - - if (theValue == null) - { - return defValue; - } - bool retValue = Convert.ToBoolean(theValue.Trim()); - settings[key] = retValue; - return retValue; - } - } -} \ No newline at end of file
