コード例 #1
0
        public static System.Boolean WaitOneMSS(
            System.Threading.WaitHandle target)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { target }, out result))
            {
                return((System.Boolean)result);
            }
            else
            {
                kk++;
                if (kk == 1)
                {
                    return(target.WaitOne());
                }
                else
                {
                    OPCDataLogger.OPCLoggerWriteQuene writeQueue = OPCDataLogger.DotTest.Factories.OPCLoggerWriteQueneFactory.CreateOPCLoggerWriteQuene01();
                    Accessor writeQAccessor = ReflectionAccessor.Wrap(writeQueue);
                    writeQAccessor.SetField("m_terminate", true);
                    kk = 0;
                    return(true);
                }
            }
        }
コード例 #2
0
 public static void GetStatusMSS(
     OPCTrendLib.OPCData.OpcServer target,
     out OPCTrendLib.OPCDataInterface.SERVERSTATUS serverStatus)
 {
     serverStatus = null; object result;
     // NOTE: out and ref parameters are not passed from a test specific stub
     if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { target, serverStatus }, out result))
     {
         string currentMethod = Dottest.Framework.Stubs.CurrentTestMethod.Name;
         if (currentMethod.Equals("TestReconnectAndAddToOPC02"))
         {
             throw new Exception("Error 0x333 The RPC server is unavailable.");
         }
         else if (currentMethod.Equals("TestIsOPCServerConnected01"))
         {
             serverStatus = new OPCTrendLib.OPCDataInterface.SERVERSTATUS();
             serverStatus.eServerState = OPCTrendLib.OPCDataInterface.OPCSERVERSTATE.OPC_STATUS_SUSPENDED;
             serverStatus.ftStartTime  = DateTime.Now.ToFileTime();
         }
         else
         {
             serverStatus = new OPCTrendLib.OPCDataInterface.SERVERSTATUS();
             serverStatus.eServerState = OPCTrendLib.OPCDataInterface.OPCSERVERSTATE.OPC_STATUS_RUNNING;
             serverStatus.ftStartTime  = DateTime.Now.ToFileTime();
         }
         return;
     }
     else
     {
         target.GetStatus(out serverStatus);
     }
 }
コード例 #3
0
        public static System.Object CreateInstanceMSSS(System.Type type)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { type }, out result))
            {
                return((System.Object)result);
            }
            else
            {
                return(System.Activator.CreateInstance(type));
            }
        }
コード例 #4
0
        public static void WriteLineMSSS(System.String value_1)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { value_1 }, out result))
            {
                return;
            }
            else
            {
                //System.Console.WriteLine(value_1);
            }
        }
コード例 #5
0
        public static void ExitMSSS()
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { }, out result))
            {
                return;
            }
            else
            {
                return;
            }
        }
コード例 #6
0
        public static void RunMSSS(System.Windows.Forms.Form mainForm)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { mainForm }, out result))
            {
                return;
            }
            else
            {
                System.Windows.Forms.Application.Run(mainForm);
            }
        }
コード例 #7
0
        public static System.Collections.Generic.List <DAO.Trending.Helper.SqlParameter> CreateEnqueneParametersMSSS(System.Collections.Generic.List <System.String> parameterValues)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { parameterValues }, out result))
            {
                return((System.Collections.Generic.List <DAO.Trending.Helper.SqlParameter>)result);
            }
            else
            {
                return(DAO.Trending.Helper.DAOHelper.CreateEnqueneParameters(parameterValues));
            }
        }
コード例 #8
0
        public static System.IO.FileInfo FileInfo_ctor_MSS(System.String fileName)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { fileName }, out result))
            {
                return((System.IO.FileInfo)result);
            }
            else
            {
                return(new System.IO.FileInfo(fileName));
            }
        }
コード例 #9
0
        public static System.Globalization.UnicodeCategory GetUnicodeCategoryMSSS(System.Char c)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { c }, out result))
            {
                return((System.Globalization.UnicodeCategory)result);
            }
            else
            {
                return(System.Char.GetUnicodeCategory(c));
            }
        }
コード例 #10
0
        public static System.Object GetObjectForNativeVariantMSSS(System.IntPtr pSrcNativeVariant)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { pSrcNativeVariant }, out result))
            {
                return((System.Object)result);
            }
            else
            {
                return(System.Runtime.InteropServices.Marshal.GetObjectForNativeVariant(pSrcNativeVariant));
            }
        }
コード例 #11
0
        public static System.Int32 ReadInt32MSSS(System.IntPtr ptr)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { ptr }, out result))
            {
                return((System.Int32)result);
            }
            else
            {
                return(System.Runtime.InteropServices.Marshal.ReadInt32(ptr));
            }
        }
コード例 #12
0
        public static void CopyMSSS(System.IntPtr source, System.Int32[] destination, System.Int32 startIndex, System.Int32 length)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { source, destination, startIndex, length }, out result))
            {
                return;
            }
            else
            {
                System.Runtime.InteropServices.Marshal.Copy(source, destination, startIndex, length);
            }
        }
コード例 #13
0
        public static System.Boolean IsCanFollowConstMSSS(/*OPCTrendLib.Token*/ object token)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { token }, out result))
            {
                return((System.Boolean)result);
            }
            else
            {
                return((System.Boolean)Helper.CallStaticMethod(typeof(OPCTrendLib.Parser), "IsCanFollowConst", new object[] { token }));
            }
        }
コード例 #14
0
        public static System.Boolean ExistsMSSS(System.String path)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { path }, out result))
            {
                return((System.Boolean)result);
            }
            else
            {
                return(System.IO.File.Exists(path));
            }
        }
コード例 #15
0
        public static void ConfigureMSSS(System.IO.FileInfo configFile)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { configFile }, out result))
            {
                return;
            }
            else
            {
                log4net.Config.XmlConfigurator.Configure(configFile);
            }
        }
コード例 #16
0
        public static System.Windows.Forms.DialogResult ShowMSSS(System.String text, System.String caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { text, caption, buttons, icon }, out result))
            {
                return((System.Windows.Forms.DialogResult)result);
            }
            else
            {
                return(STEE.ISCS.MulLanguage.MessageBoxDialog.Show(text, caption, buttons, icon));
            }
        }
コード例 #17
0
        public static System.Diagnostics.Process[] GetProcessesByNameMSSS(System.String processName)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { processName }, out result))
            {
                return((System.Diagnostics.Process[])result);
            }
            else
            {
                return(System.Diagnostics.Process.GetProcessesByName(processName));
            }
        }
コード例 #18
0
        public static System.String GetINIDataStringMSSS(System.String entryCategory, System.String entryKey, System.String entryDefault, System.Int32 entrySize, System.String entryFile)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { entryCategory, entryKey, entryDefault, entrySize, entryFile }, out result))
            {
                return((System.String)result);
            }
            else
            {
                return(TrendingHelper.ConfigureFileHelper.GetINIDataString(entryCategory, entryKey, entryDefault, entrySize, entryFile));
            }
        }
コード例 #19
0
        public static System.String CheckLocationAndAddSQLMSSS(System.String LocationColName)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { LocationColName }, out result))
            {
                return((System.String)result);
            }
            else
            {
                return(DAO.Trending.Helper.DAOHelper.CheckLocationAndAddSQL(LocationColName));
            }
        }
コード例 #20
0
        public static void setLogFileMSSS(System.String file)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { file }, out result))
            {
                return;
            }
            else
            {
                STEE.ISCS.Log.LogHelper.setLogFile(file);
            }
        }
コード例 #21
0
        public static TrendingHelper.ConfigureFileHelper GetInstanceMSSS()
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { }, out result))
            {
                return((TrendingHelper.ConfigureFileHelper)result);
            }
            else
            {
                return(TrendingHelper.ConfigureFileHelper.GetInstance());
            }
        }
コード例 #22
0
        public static void InfoMSSS(System.String className, System.String functionName, System.String msg)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { className, functionName, msg }, out result))
            {
                return;
            }
            else
            {
                STEE.ISCS.Log.LogHelper.Info(className, functionName, msg);
            }
        }
コード例 #23
0
        public static void SetCompatibleTextRenderingDefaultMSSS(System.Boolean defaultValue)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { defaultValue }, out result))
            {
                return;
            }
            else
            {
                return;
            }
        }
コード例 #24
0
        public static System.Diagnostics.Process StartMSSS(System.String fileName)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { fileName }, out result))
            {
                return((System.Diagnostics.Process)result);
            }
            else
            {
                return(System.Diagnostics.Process.Start(fileName));
            }
        }
コード例 #25
0
 public static void initMSS(
 DAO.Trending.Helper.LocationKeyHelper target)
 {
     object result;
     if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { target }, out result))
     {
         return;
     }
     else
     {
         target.init();
     }
 }
コード例 #26
0
        public static System.String GetHostNameMSSS()
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { }, out result))
            {
                return((System.String)result);
            }
            else
            {
                return("occ-mft-01");
            }
        }
コード例 #27
0
        public static System.Int32 VariantClearMSSS(System.IntPtr addrofvariant)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { addrofvariant }, out result))
            {
                return((System.Int32)result);
            }
            else
            {
                return(OPCTrendLib.OPCHeader.DUMMY_VARIANT.VariantClear(addrofvariant));
            }
        }
コード例 #28
0
        public static System.ComponentModel.TypeConverter GetConverterMSSS(System.Object component)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { component }, out result))
            {
                return((System.ComponentModel.TypeConverter)result);
            }
            else
            {
                return(System.ComponentModel.TypeDescriptor.GetConverter(component));
            }
        }
コード例 #29
0
 public static System.Drawing.Graphics CreateGraphicsMSS(
     System.Windows.Forms.Control target)
 {
     object result;
     if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { target }, out result))
     {
         return (System.Drawing.Graphics)result;
     }
     else
     {
         return target.CreateGraphics();
     }
 }
コード例 #30
0
        public static System.Int32 CompareMSSS(System.DateTime t1, System.DateTime t2)
        {
            object result;

            if (TestSpecificStubsUtil.RunTestSpecificStub(System.Reflection.MethodBase.GetCurrentMethod(), new object[] { t1, t2 }, out result))
            {
                return((System.Int32)result);
            }
            else
            {
                return(System.DateTime.Compare(t1, t2));
            }
        }