protected override WebMenuItem[] InitializeRowMenuItems(IBusinessObject businessObject, int listIndex) { WebMenuItem[] baseMenuItems = base.InitializeRowMenuItems(businessObject, listIndex); WebMenuItem[] menuItems = new WebMenuItem[3]; var menuItem0 = new WebMenuItem(); menuItem0.ItemID = listIndex.ToString() + "_0"; menuItem0.Text = menuItem0.ItemID; menuItems[0] = menuItem0; var menuItem1 = new TestBocMenuItem(businessObject); menuItem1.ItemID = listIndex.ToString() + "_1"; menuItem1.Text = menuItem1.ItemID; menuItems[1] = menuItem1; var menuItem2 = new WebMenuItem(); menuItem2.ItemID = listIndex.ToString() + "_2"; menuItem2.Text = menuItem2.ItemID; menuItems[2] = menuItem2; return(ArrayUtility.Combine(baseMenuItems, menuItems)); }
private Assembly CompileTestAssemblyInMemory(string assemblyName, params string[] referencedAssemblies) { AssemblyCompiler assemblyCompiler = AssemblyCompiler.CreateInMemoryAssemblyCompiler( c_testAssemblySourceDirectoryRoot + "\\" + assemblyName, ArrayUtility.Combine(new[] { typeof(MarkerAttribute).Module.Name }, referencedAssemblies)); assemblyCompiler.Compile(); return(assemblyCompiler.CompiledAssembly); }
public void TestCombine() { string[] s1 = { "a", "b", "c" }; string[] s2 = { "d" }; string[] s3 = {}; string[] s4 = { "e", "f" }; string[] res = (string[])ArrayUtility.Combine(s1, s2, s3, s4); Assert.That(string.Concat(res), Is.EqualTo("abcdef")); }
public string BuildAbsolutePath(Assembly assembly, params string[] assemblyRelativePathParts) { ArgumentUtility.CheckNotNull("assembly", assembly); ArgumentUtility.CheckNotNull("assemblyRelativePathParts", assemblyRelativePathParts); string root = GetResourceRoot(); string assemblyName = s_assemblyNameCache.GetOrCreateValue(assembly, key => key.GetName()).Name; string[] completePath = ArrayUtility.Combine(new[] { root, assemblyName }, assemblyRelativePathParts); return(BuildPath(completePath)); }
public void GetStateCombinations_TwoCombinations() { AccessControlTestHelper testHelper = new AccessControlTestHelper(); using (testHelper.Transaction.EnterNonDiscardingScope()) { SecurableClassDefinition orderClass = testHelper.CreateOrderClassDefinition(); StateCombination stateCombination = testHelper.CreateStateCombination(orderClass); List <StateCombination> stateCombinations = testHelper.CreateOrderStateAndPaymentStateCombinations(orderClass); Assert.That(orderClass.StateCombinations, Is.EqualTo(ArrayUtility.Combine(stateCombination, stateCombinations.ToArray()))); } }
protected override WebMenuItem[] InitializeRowMenuItems(IBusinessObject businessObject, int listIndex) { var baseRowMenuItems = base.InitializeRowMenuItems(businessObject, listIndex); var rowMenuItems = new WebMenuItem[2]; rowMenuItems[0] = new WebMenuItem { ItemID = "RowMenuItemCmd1", Text = "Row menu 1" }; rowMenuItems[1] = new WebMenuItem { ItemID = "RowMenuItemCmd2", Text = "Row menu 2" }; return(ArrayUtility.Combine(baseRowMenuItems, rowMenuItems)); }