示例#1
0
        public static OPSConfig GetConfig(string configFile)
        {
            FileStream    fis        = File.OpenRead(configFile);
            XMLArchiverIn archiverIn = new XMLArchiverIn(fis, "root");

            archiverIn.Add(OPSObjectFactory.GetInstance());
            OPSConfig newConfig = null;

            newConfig = (OPSConfig)archiverIn.Inout("ops_config", newConfig);
            fis.Close();
            return(newConfig);
        }
示例#2
0
 public static OPSConfig GetConfig(string configFile)
 {
     try
     {
         FileStream    fis        = File.OpenRead(configFile);
         XMLArchiverIn archiverIn = new XMLArchiverIn(fis, "root");
         archiverIn.Add(OPSObjectFactory.GetInstance());
         OPSConfig newConfig = null;
         newConfig = (OPSConfig)archiverIn.Inout("ops_config", newConfig);
         fis.Close();
         return(newConfig);
     }
     catch (FileNotFoundException)
     {
         Logger.ExceptionLogger.LogMessage("OPSConfig::GetConfig(), File NOT found: " + configFile);
         return(null);
     }
 }
示例#3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="buf"></param>
 /// <param name="factory"></param>
 public OPSArchiverIn(ReadByteBuffer buf, OPSObjectFactory factory)
 {
     compositeFactory = factory;
     readBuf          = buf;
 }
示例#4
0
 ///
 /// <param name="buf"></param>
 public OPSArchiverIn(ReadByteBuffer buf)
 {
     compositeFactory = OPSObjectFactory.GetInstance();
     readBuf          = buf;
 }