123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- using System;
- using System.Collections.Generic;
- using Aitex.Core.RT.ConfigCenter;
- using Aitex.Core.RT.IOCore;
- using MECF.Framework.Common.SCCore;
- namespace Aitex.Core.RT.SCCore
- {
- public static class SC
- {
- public static ISCManager Manager { set; private get; }
- public static void SetItemValue(string name, object value)
- {
- if (Manager != null)
- Manager.SetItemValue(name, value);
- }
- public static void SetItemValueStringFormat(string name, string value)
- {
- if (Manager != null)
- Manager.SetItemValueStringFormat(name, value);
- }
- public static void SetItemValue(string name, bool value)
- {
- if (Manager != null)
- Manager.SetItemValue(name, value);
- }
- public static void SetItemValue(string name, int value)
- {
- if (Manager != null)
- Manager.SetItemValue(name, value);
- }
- public static void SetItemValue(string name, double value)
- {
- if (Manager != null)
- Manager.SetItemValue(name, value);
- }
- public static void SetItemValue(string name, string value)
- {
- if (Manager != null)
- Manager.SetItemValue(name, value);
- }
- public static void SetItemValueFromString(string name, string value)
- {
- if (Manager != null)
- Manager.SetItemValueFromString(name, value);
- }
- public static SCConfigItem GetConfigItem(string name)
- {
- if (Manager != null)
- return Manager.GetConfigItem(name);
- return null;
- }
- public static bool ContainsItem(string name)
- {
- if (Manager != null)
- return Manager.ContainsItem(name);
- return false;
- }
- public static SCConfigItem GetConfigItem(string path, string name)
- {
- return GetConfigItem(path+"."+name);
- }
- public static T GetValue<T>(string name) where T : struct
- {
- if (Manager != null)
- return Manager.GetValue<T>(name);
- return default(T);
- }
- public static string GetStringValue(string name)
- {
- if (Manager != null)
- return Manager.GetStringValue(name);
- return null;
- }
- public static List<SCConfigItem> GetItemList()
- {
- if (Manager != null)
- return Manager.GetItemList();
- return null;
- }
- public static string GetConfigFileContent( )
- {
- if (Manager != null)
- return Manager.GetFileContent();
- return "";
- }
- }
- }
|