コード例 #1
0
        internal static string PrepareTempDir()
        {
            object[] args = new object[0];
            string   ret  = ((string)(m_privateType.InvokeStatic("PrepareTempDir", new System.Type[0], args)));

            return(ret);
        }
コード例 #2
0
        internal static bool ShowExceptionMessageBox()
        {
            object[] args = new object[0];
            bool     ret  = ((bool)(m_privateType.InvokeStatic("ShowExceptionMessageBox", new System.Type[0], args)));

            return(ret);
        }
コード例 #3
0
 internal static void SetSiteItemRowDefaults(global::Mediachase.Cms.Dto.SiteDto.SiteRow row)
 {
     object[] args = new object[] {
         row
     };
     m_privateType.InvokeStatic("SetSiteItemRowDefaults", new System.Type[] {
         typeof(global::Mediachase.Cms.Dto.SiteDto.SiteRow)
     }, args);
 }
コード例 #4
0
 internal static global::System.Drawing.Size GetBestSubDivision(global::System.Drawing.Size boundingSize)
 {
     object[] args = new object[] {
         boundingSize
     };
     global::System.Drawing.Size ret = ((global::System.Drawing.Size)(m_privateType.InvokeStatic("GetBestSubDivision", new System.Type[] {
         typeof(global::System.Drawing.Size)
     }, args)));
     return(ret);
 }
コード例 #5
0
        internal static string padding(int n)
        {
            object[] args = new object[] {
                n
            };
            string ret = ((string)(m_privateType.InvokeStatic("padding", new System.Type[] {
                typeof(int)
            }, args)));

            return(ret);
        }
コード例 #6
0
ファイル: VSCodeGenAccessors.cs プロジェクト: odnodn/mscui
        internal static string FormatTitle(string title)
        {
            object[] args = new object[] {
                title
            };
            string ret = ((string)(m_privateType.InvokeStatic("FormatTitle", new System.Type[] {
                typeof(string)
            }, args)));

            return(ret);
        }
コード例 #7
0
ファイル: VSCodeGenAccessors.cs プロジェクト: formist/LinkMe
        internal static int Main(string[] args)
        {
            object[] _args = new object[] {
                args
            };
            int ret = ((int)(m_privateType.InvokeStatic("Main", new System.Type[] {
                typeof(string).MakeArrayType()
            }, _args)));

            return(ret);
        }
コード例 #8
0
        internal static string LoadTextFromResource(string name)
        {
            object[] args = new object[] {
                name
            };
            string ret = ((string)(m_privateType.InvokeStatic("LoadTextFromResource", new System.Type[] {
                typeof(string)
            }, args)));

            return(ret);
        }
コード例 #9
0
 internal static void IsNotNull(object pv_objValue, string pv_strName)
 {
     object[] args = new object[] {
         pv_objValue,
         pv_strName
     };
     m_privateType.InvokeStatic("IsNotNull", new System.Type[] {
         typeof(object),
         typeof(string)
     }, args);
 }
コード例 #10
0
        internal static int GetCodeVersion(string code)
        {
            object[] args = new object[] {
                code
            };
            int ret = ((int)(m_privateType.InvokeStatic("GetCodeVersion", new System.Type[] {
                typeof(string)
            }, args)));

            return(ret);
        }
コード例 #11
0
 internal static byte[] UdpTransfer(global::System.Net.IPEndPoint server, byte[] requestMessage)
 {
     object[] args = new object[] {
         server,
         requestMessage
     };
     byte[] ret = ((byte[])(m_privateType.InvokeStatic("UdpTransfer", new System.Type[] {
         typeof(global::System.Net.IPEndPoint),
         typeof(byte).MakeArrayType()
     }, args)));
     return(ret);
 }
コード例 #12
0
 internal static global::WXML.Model.WXMLModel Parse(global::System.Xml.XmlReader reader, global::System.Xml.XmlResolver xmlResolver)
 {
     object[] args = new object[] {
         reader,
         xmlResolver
     };
     global::WXML.Model.WXMLModel ret = ((global::WXML.Model.WXMLModel)(m_privateType.InvokeStatic("Parse", new System.Type[] {
         typeof(global::System.Xml.XmlReader),
         typeof(global::System.Xml.XmlResolver)
     }, args)));
     return(ret);
 }
コード例 #13
0
        internal static global::PaytonByrd_ProcessConfigurationTests.PaytonByrd_ProcessConfiguration_ParameterValidationErrorAccessor CreateValid()
        {
            object[] args     = new object[0];
            object   _ret_val = m_privateType.InvokeStatic("CreateValid", new System.Type[0], args);

            global::PaytonByrd_ProcessConfigurationTests.PaytonByrd_ProcessConfiguration_ParameterValidationErrorAccessor _ret = null;
            if ((_ret_val != null))
            {
                _ret = new global::PaytonByrd_ProcessConfigurationTests.PaytonByrd_ProcessConfiguration_ParameterValidationErrorAccessor(_ret_val);
            }
            global::PaytonByrd_ProcessConfigurationTests.PaytonByrd_ProcessConfiguration_ParameterValidationErrorAccessor ret = _ret;
            return(ret);
        }
コード例 #14
0
 internal static global::System.Reflection.MethodInfo GenerateMethod(global::System.Type objectType, int schemeId, global::System.Data.DataTable dtSource)
 {
     object[] args = new object[] {
         objectType,
         schemeId,
         dtSource
     };
     global::System.Reflection.MethodInfo ret = ((global::System.Reflection.MethodInfo)(m_privateType.InvokeStatic("GenerateMethod", new System.Type[] {
         typeof(global::System.Type),
         typeof(int),
         typeof(global::System.Data.DataTable)
     }, args)));
     return(ret);
 }
コード例 #15
0
 internal static global::System.Drawing.Rectangle BoundingBox(System.Collections.Generic.List<int>[] scanLines)
 {
     object[] args = new object[] {
         scanLines};
     global::System.Drawing.Rectangle ret = ((global::System.Drawing.Rectangle)(m_privateType.InvokeStatic("BoundingBox", new System.Type[] {
             typeof(System.Collections.Generic.List<int>).MakeArrayType()}, args)));
     return ret;
 }
コード例 #16
0
 internal static global::System.Type SolverType(string name)
 {
     object[] args = new object[] {
         name
     };
     global::System.Type ret = ((global::System.Type)(m_privateType.InvokeStatic("SolverType", new System.Type[] {
         typeof(string)
     }, args)));
     return(ret);
 }
コード例 #17
0
        public void CreateBuiltIns_Test()
        {
            // There are currently 9 classses derived from Command
            var cmdTypes = Command.GetDerivedClassesCollection();

            Assert.Equal(9, cmdTypes.Count);

            // Get # of built in commands defined
            var builtIns = new List <Command>();

            foreach (var cmdType in cmdTypes)
            {
                mstest.PrivateType cmdPt      = new mstest.PrivateType(cmdType.GetType());
                List <Command>     listOfType = (List <Command>)cmdPt.GetStaticProperty(nameof(Command.BuiltInCommands));
                foreach (var c in listOfType)
                {
                    builtIns.Add(c);
                }
            }

            // Ensure there are no duplicates
            var query = builtIns.GroupBy(x => x.Cmd)
                        .Where(g => g.Count() > 1)
                        .Select(y => y.Key)
                        .ToList();

            Assert.Empty(query);

            // Invoke the CreateBuiltIns method and compare result to expected
            // https://stackoverflow.com/questions/9122708/unit-testing-private-methods-in-c-sharp
            CommandInvoker target = new CommandInvoker();

            mstest.PrivateType pt = new mstest.PrivateType(typeof(CommandInvoker));
            CommandInvoker     returnedBuiltIns = (CommandInvoker)pt.InvokeStatic("CreateBuiltIns", false);

            Assert.NotEmpty(returnedBuiltIns);
            Assert.Equal(builtIns.Count, returnedBuiltIns.Count);

            // Now test with disableBuiltIns true
            returnedBuiltIns = (CommandInvoker)pt.InvokeStatic("CreateBuiltIns", true);
            Assert.Empty(returnedBuiltIns);
        }
コード例 #18
0
        internal static double RFCTimeZoneToGMTBias(string zone)
        {
            object[] args = new object[] {
                zone
            };
            double ret = ((double)(m_privateType.InvokeStatic("RFCTimeZoneToGMTBias", new System.Type[] {
                typeof(string)
            }, args)));

            return(ret);
        }
コード例 #19
0
        internal static string GetResource(string pv_strResourceName)
        {
            object[] args = new object[] {
                pv_strResourceName
            };
            string ret = ((string)(m_privateType.InvokeStatic("GetResource", new System.Type[] {
                typeof(string)
            }, args)));

            return(ret);
        }
コード例 #20
0
        internal static global::test.com_nlf_calendar_SolarAccessor fromYmd(int year, int month, int day)
        {
            object[] args = new object[] {
                year,
                month,
                day
            };
            object _ret_val = m_privateType.InvokeStatic("fromYmd", new System.Type[] {
                typeof(int),
                typeof(int),
                typeof(int)
            }, args);

            global::test.com_nlf_calendar_SolarAccessor _ret = null;
            if ((_ret_val != null))
            {
                _ret = new global::test.com_nlf_calendar_SolarAccessor(_ret_val);
            }
            global::test.com_nlf_calendar_SolarAccessor ret = _ret;
            return(ret);
        }
コード例 #21
0
 internal static void ParseChannelQueryString(global::System.Web.HttpRequest request, out string channelName, out string userName)
 {
     object[] args = new object[] {
         request,
         null,
         null
     };
     m_privateType.InvokeStatic("ParseChannelQueryString", new System.Type[] {
         typeof(global::System.Web.HttpRequest),
         typeof(string).MakeByRefType(),
         typeof(string).MakeByRefType()
     }, args);
     channelName = ((string)(args[1]));
     userName    = ((string)(args[2]));
 }
コード例 #22
0
        internal static global::SWA.Ariadne.Model.Tests.SWA_Ariadne_Model_MazeDimensionsAccessor Instance(int version)
        {
            object[] args = new object[] {
                version
            };
            object _ret_val = m_privateType.InvokeStatic("Instance", new System.Type[] {
                typeof(int)
            }, args);

            global::SWA.Ariadne.Model.Tests.SWA_Ariadne_Model_MazeDimensionsAccessor _ret = null;
            if ((_ret_val != null))
            {
                _ret = new global::SWA.Ariadne.Model.Tests.SWA_Ariadne_Model_MazeDimensionsAccessor(_ret_val);
            }
            global::SWA.Ariadne.Model.Tests.SWA_Ariadne_Model_MazeDimensionsAccessor ret = _ret;
            return(ret);
        }
コード例 #23
0
        internal static global::PaytonByrd_ProcessConfigurationTests.PaytonByrd_ProcessConfiguration_ParameterValidationErrorAccessor Validate(object pv_objInstance, global::System.Reflection.PropertyInfo pv_objPropertyInfo)
        {
            object[] args = new object[] {
                pv_objInstance,
                pv_objPropertyInfo
            };
            object _ret_val = m_privateType.InvokeStatic("Validate", new System.Type[] {
                typeof(object),
                typeof(global::System.Reflection.PropertyInfo)
            }, args);

            global::PaytonByrd_ProcessConfigurationTests.PaytonByrd_ProcessConfiguration_ParameterValidationErrorAccessor _ret = null;
            if ((_ret_val != null))
            {
                _ret = new global::PaytonByrd_ProcessConfigurationTests.PaytonByrd_ProcessConfiguration_ParameterValidationErrorAccessor(_ret_val);
            }
            global::PaytonByrd_ProcessConfigurationTests.PaytonByrd_ProcessConfiguration_ParameterValidationErrorAccessor ret = _ret;
            return(ret);
        }
コード例 #24
0
 internal static void AddConvert(string aFileName)
 {
     object[] args = new object[] {
         aFileName
     };
     m_privateType.InvokeStatic("AddConvert", new System.Type[] {
         typeof(string)
     }, args);
 }
コード例 #25
0
        internal static string CodeNameFromRssName(string rssName)
        {
            object[] args = new object[] {
                rssName
            };
            string ret = ((string)(m_privateType.InvokeStatic("CodeNameFromRssName", new System.Type[] {
                typeof(string)
            }, args)));

            return(ret);
        }
コード例 #26
0
 internal static void AddValueToRegistryKey(string name, string value)
 {
     object[] args = new object[] {
         name,
         value
     };
     m_privateType.InvokeStatic("AddValueToRegistryKey", new System.Type[] {
         typeof(string),
         typeof(string)
     }, args);
 }
コード例 #27
0
 internal static void WriteInt32(global::System.IO.Stream s, int i)
 {
     object[] args = new object[] {
         s,
         i
     };
     m_privateType.InvokeStatic("WriteInt32", new System.Type[] {
         typeof(global::System.IO.Stream),
         typeof(int)
     }, args);
 }
コード例 #28
0
 internal static int[] ScannerUnpackAction()
 {
     object[] args = new object[0];
     int[]    ret  = ((int[])(m_privateType.InvokeStatic("ScannerUnpackAction", new System.Type[0], args)));
     return(ret);
 }
コード例 #29
0
 internal static global::Denisenko.Cutting.LC4.LC4Numeric NumericFromDecimal(decimal value)
 {
     object[] args = new object[] {
         value
     };
     global::Denisenko.Cutting.LC4.LC4Numeric ret = ((global::Denisenko.Cutting.LC4.LC4Numeric)(m_privateType.InvokeStatic("NumericFromDecimal", new System.Type[] {
         typeof(decimal)
     }, args)));
     return(ret);
 }