private static IModuleList GetModules(PagesSettings settings) { ModuleList moduleList = new ModuleList { { MarkdownFiles, new ModuleCollection { new ReadFiles(ctx => GetGlobbingPattern(ctx, settings.PagesPattern, settings.IgnorePaths, "md")), new Meta(WebKeys.EditFilePath, (doc, ctx) => doc.FilePath(Keys.RelativeFilePath)), new If(settings.ProcessIncludes, new Include()), new FrontMatter(new Yaml.Yaml()), new Execute(ctx => new Markdown.Markdown() .UseConfiguration(settings.MarkdownConfiguration.Invoke <string>(ctx)) .UseExtensions(settings.MarkdownExtensionTypes.Invoke <IEnumerable <Type> >(ctx))) } }, { RazorFiles, new Concat { new ReadFiles( ctx => GetGlobbingPattern(ctx, settings.PagesPattern, settings.IgnorePaths, "cshtml")), new Meta(WebKeys.EditFilePath, (doc, ctx) => doc.FilePath(Keys.RelativeFilePath)), new If(settings.ProcessIncludes, new Include()), new FrontMatter(new Yaml.Yaml()) } }, { WriteMetadata, new ModuleCollection { new Excerpt(), new Title(), new WriteFiles(".html").OnlyMetadata() } } }; // Tree and sort Comparison <IDocument> sort = settings.Sort ?? ((x, y) => Comparer.Default.Compare(x.String(Keys.Title), y.String(Keys.Title))); if (settings.CreateTree) { Tree tree = settings.TreePlaceholderFactory == null ? new Tree().WithNesting(true, true) : new Tree().WithNesting(true, true).WithPlaceholderFactory(settings.TreePlaceholderFactory); tree.WithSort(sort); moduleList.Add(CreateTreeAndSort, tree); } else { moduleList.Add(CreateTreeAndSort, new Sort(sort)); } return(moduleList); }
public ShellViewModel(IRegionManager rm, IEventAggregator ea) { _rm = rm; #region 加载列表 ea.GetEvent <Models.Events.RegisterMenuEvent>().Subscribe(s => { ModuleList.Add(new Menu_Module { IconName = s.IconName, ModuleNmae = s.MenuName, PageName = s.PageName, }); }); #endregion #region 模块选择命令 ModuleChangedCommand = new DelegateCommand <string>(p => { if (p == null) { return; } rm.RequestNavigate("主tab", p); NaviIndex = -1; }); #endregion #region 关闭tabItem命令 CloseTabItemCommadn = new DelegateCommand <object>(P => { _rm.Regions["主tab"].Remove(P); }); #endregion }
private void InitModules() { ModuleList.Clear(); AddedModuleList.Clear(); if (SelectedApplication != null) { List <DynEntity> allModules = ApplicationDesignService.GetAllApplictionModuleCollection(); List <DynEntity> currentApplicationModules = ApplicationDesignService.GetAplicationModulesByAplicationID(SelectedApplication.ApplicationID); foreach (var module in allModules) { bool isHave = false; foreach (var addedModule in currentApplicationModules) { if (Convert.Equals(addedModule["ModuleID"], module["ModuleID"])) { AddedModuleList.Add(new ApplicationModule() { ModuleName = module["ModuleName"] as string, ModuleID = (int)module["ModuleID"] }); isHave = true; break; } } if (!isHave) { ModuleList.Add(new ApplicationModule() { ModuleName = module["ModuleName"] as string, ModuleID = (int)module["ModuleID"] }); } } } }
public void ScanModule(ModuleDefinition module) { ModuleList.Add(module); foreach (var type in module.Types) { ScanType(type); } }
public ModuleListViewModel(SingleProcess process) { ProcessLabel = $"Process: {process.Id} {process.Name}"; _modulesList = new ObservableCollection <SingleModule>(); foreach (ProcessModule processModule in process.ModuleList) { ModuleList.Add(new SingleModule(processModule)); } }
public void ThrowsWhenAddingDuplicateNamedModule() { // Given CountModule count = new CountModule("A"); CountModule count2 = new CountModule("B"); ModuleList list = new ModuleList(new NamedModule("A", count)); // When, Then Assert.That(() => list.Add(new NamedModule("A", count2)), Throws.Exception); }
public void AddModule() { // Given ModuleList list = new ModuleList(); CountModule count = new CountModule("A"); // When list.Add(count); // Then list.ShouldBe(new[] { count }); }
/// <summary> /// инициализация элементов списка для UI /// </summary> private void InitializeModuleList() { //ModuleList = ModuleTypes.ModuleList.Keys.ToList(); foreach (var item in ModuleTypes.ModuleList.Keys) { ModuleList.Add(item); } for (byte i = 0; i < 16; i++) { ModuleListForUI.Add(ModuleList.First()); } }
public void AddNamedModule() { // Given ModuleList list = new ModuleList(); CountModule count = new CountModule("A"); // When list.Add(new NamedModule("Foo", count)); // Then Assert.That(list.AsKeyValuePairs(), Is.EqualTo(new[] { new KeyValuePair <string, IModule>("Foo", count) })); }
public void ContainsModule() { // Given ModuleList list = new ModuleList(); CountModule count = new CountModule("A"); // When list.Add(count); // Then Assert.That(list.Contains(count), Is.True); }
public async virtual void OpenPage(string pageName) { if (string.IsNullOrWhiteSpace(pageName)) { return; } var m = ModuleManager.Modules.FirstOrDefault(t => t.Name.Equals(pageName)); if (m == null) { return; } var module = ModuleList.FirstOrDefault(t => t.Name == m.Name); if (module == null) { var dialog = NetCoreProvider.Get <IBusinessModule>(m.TypeName); if (dialog != null) { await dialog.BindDefaultModel(m.Auth); ModuleList.Add(new ModuleUIComponent() { Code = m.Code, Auth = m.Auth, Name = m.Name, TypeName = m.TypeName, Body = dialog.GetView() }); } else { var dialogbase = NetCoreProvider.Get <IBaseModule>(m.TypeName); dialogbase.BindDefaultModel(); ModuleList.Add(new ModuleUIComponent() { Code = m.Code, Name = m.Name, TypeName = m.TypeName, Body = dialogbase.GetView() }); } //将数据库中获取的菜单Namespace在容器当中查找依赖关系的实例 CurrentModule = ModuleList[ModuleList.Count - 1]; GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce; GC.Collect(); } else { CurrentModule = module; } }
/// <summary> /// 初始化首页 /// </summary> void InitHomeView() { var dialog = NetCoreProvider.ResolveNamed <IHomeCenter>("HomeCenter"); dialog.BindDefaultModel(); ModuleUIComponent component = new ModuleUIComponent(); component.Name = "首页"; component.Body = dialog.GetView(); ModuleList.Add(component); ModuleManager.Modules.Add(component); CurrentModule = ModuleList.Last(); }
/// <summary> /// 初始化首页 /// </summary> void InitHomeView() { var dialog = NetCoreProvider.Get <IBaseModule>("HomeCenter"); dialog.BindDefaultModel(); ModuleUIComponent component = new ModuleUIComponent(); component.Name = "首页"; component.Body = dialog.GetView(); ModuleList.Add(component); ModuleManager.Modules.Add(component); CurrentModule = ModuleList[ModuleList.Count - 1]; }
public void DoesNotContainModule() { // Given ModuleList list = new ModuleList(); CountModule count = new CountModule("A"); CountModule count2 = new CountModule("B"); // When list.Add(count); // Then Assert.That(list.Contains(count2), Is.False); }
public override void ExecuteAdd() { Sys_Modules module = new Sys_Modules(); module.ID = new ModuleInfoBLL().GetMaxModuleID(); module.MenuID = Convert.ToInt32(MenuID); FrmModuleSettingEdit edit = new FrmModuleSettingEdit(module); edit.SaveEvent += (m) => { ModuleList.Add(m); }; edit.ShowDialog(); }
public ModuleInfo_HL2002() { DeviceType = EnumDeviceName.HL2002; Name = DeviceType.ToString(); ModuleList.Add(new Module_8() { DeviceType = EnumDeviceName.HL2002, DataTypeOfSubItem = EnumType.USINT, IOType = EnumModuleIOType.OUT, Name = "HL2002", Header = "DO24V_", NeedIndex = false, }); }
public ModuleInfo_HL1001() { DeviceType = EnumDeviceName.HL1001; Name = DeviceType.ToString(); ModuleList.Add(new Module_8() { DeviceType = EnumDeviceName.HL1001, DataTypeOfSubItem = EnumType.USINT, IOType = EnumModuleIOType.IN, Name = "HL1001", Header = "DI24V_", NeedIndex = false, }); }
public ModuleInfo_HL4001() { DeviceType = EnumDeviceName.HL4001; Name = DeviceType.ToString(); for (int i = 0; i < 4; i++) { ModuleList.Add(new Module_16() { DeviceType = EnumDeviceName.HL4001, DataTypeOfSubItem = EnumType.UINT, IOType = EnumModuleIOType.OUT, Name = "HL4001", Header = $"AO_010V_Ch{i+1}_", NeedIndex = true, }); } }
internal void RegisterModule(Type module) { if (!ModuleHelper.IsModule(module, 0)) { throw new Exception($"type {module.FullName} is not ModuleBase"); } if (!ModuleList.Any(m => m == module)) { ModuleList.Add(module); } var moduleAssesmbly = module.Assembly; if (!ModuleAssemblyList.Any(m => m.FullName == moduleAssesmbly.FullName)) { ModuleAssemblyList.Add(moduleAssesmbly); } }
public ModuleInfo_HL3002() { DeviceType = EnumDeviceName.HL3002; Name = DeviceType.ToString(); for (int i = 0; i < 4; i++) { ModuleList.Add(new Module_16() { DeviceType = EnumDeviceName.HL3002, DataTypeOfSubItem = EnumType.UINT, IOType = EnumModuleIOType.IN, Name = "HL3002", Header = $"AI_420mA_Ch{i+1}_", NeedIndex = true, }); } }
public static void Register(IAuthenticationModule authenticationModule) { ExceptionHelper.UnmanagedPermission.Demand(); if (authenticationModule == null) { throw new ArgumentNullException("authenticationModule"); } lock (s_ModuleBinding) { IAuthenticationModule module = findModule(authenticationModule.AuthenticationType); if (module != null) { ModuleList.Remove(module); } ModuleList.Add(authenticationModule); } }
private void Initialize(IEnumerable <ModuleBase> modules, IEnumerable <Type> domainComponents) { ModuleList moduleList = new ModuleList(); foreach (ModuleBase module in modules) { moduleList.Add(module); } objectSpaceProvider = new XPObjectSpaceProvider(new MemoryDataStoreProvider(), true); ExpressApplicationSetupParameters parameters = new ExpressApplicationSetupParameters("test app", objectSpaceProvider, new ControllersManager(), moduleList); parameters.DomainComponents = domainComponents != null ? domainComponents : Type.EmptyTypes; Setup(parameters); }
// Register an authentication module with the authentication manager. public static void Register(IAuthenticationModule authenticationModule) { if (authenticationModule == null) { throw new ArgumentNullException("authenticationModule"); } lock (typeof(AuthenticationManager)) { IAuthenticationModule module; module = FindModuleByType (authenticationModule.AuthenticationType); if (module != null) { ModuleList.Remove(module); } ModuleList.Add(authenticationModule); } }
public static async Task <ImmutableArray <IDocument> > RunTestAsync( this Bootstrapper bootstrapper, string outputsPipeline, Phase outputsPhase, IFileProvider fileProvider) { ImmutableArray <IDocument> outputs; bootstrapper.ConfigureEngine(engine => { IPipeline pipeline = engine.Pipelines[outputsPipeline]; ModuleList modules = null; switch (outputsPhase) { case Phase.Input: modules = pipeline.InputModules; break; case Phase.Process: modules = pipeline.ProcessModules; break; case Phase.PostProcess: modules = pipeline.PostProcessModules; break; case Phase.Output: modules = pipeline.OutputModules; break; } modules.Add(new ExecuteConfig(Config.FromContext(ctx => { outputs = ctx.Inputs; return(ctx.Inputs); }))); engine.FileSystem.RootPath = "/"; engine.FileSystem.FileProvider = fileProvider; }); await bootstrapper.RunAsync(); return(outputs); }
/// <summary> /// 打开页面 /// </summary> /// <param name="pageName"></param> /// <returns></returns> public async virtual Task OpenPage(string pageName) { try { if (string.IsNullOrWhiteSpace(pageName)) { return; } var pageModule = this.ModuleManager.Modules.FirstOrDefault(t => t.Name.Equals(pageName)); if (pageModule == null) { return; } var module = this.ModuleList.FirstOrDefault(t => t.Name == pageModule.Name); if (module == null) { var dialog = NetCoreProvider.ResolveNamed <IBaseCenter>(pageModule.TypeName); await dialog.BindDefaultModel(pageModule.Auth); ModuleList.Add(new ModuleUIComponent() { Code = pageModule.Code, Auth = pageModule.Auth, Name = pageModule.Name, TypeName = pageModule.TypeName, Body = dialog.GetView() }); CurrentModule = ModuleList.Last(); } else { CurrentModule = module; } } catch (Exception ex) { Msg.Error(ex.Message); } }
public Content() { InputModules = new ModuleList { new ReadFiles("**/{!_,}*.{html,cshtml,md}") }; ProcessModules = new ModuleList { new ProcessIncludes(), new ExtractFrontMatter(new ParseYaml()), new FilterDocuments(Config.FromDocument(doc => !Archives.IsArchive(doc))), new EnumerateValues(), new AddTitle(), new SetDestination(".html"), new ExecuteIf(Config.FromDocument(doc => doc.MediaTypeEquals(MediaTypes.Markdown))) { new RenderMarkdown().UseExtensions() }, new ExecuteIf(Config.FromDocument(doc => !doc.ContainsKey(HtmlKeys.Excerpt))) { new GenerateExcerpt() // Note that if the document was .cshtml the except might contain Razor instructions or might not work at all }, new OrderDocuments(), new CreateTree().WithNesting(true, true) }; PostProcessModules = new ModuleList { new FlattenTree(), new FilterDocuments(Config.FromDocument(doc => !doc.GetBool(Keys.TreePlaceholder))), // Don't render placeholder pages }; PostProcessModules.Add(GetRenderModules()); OutputModules = new ModuleList { new WriteFiles() }; }
public ModuleInfo_HL5001() { DeviceType = EnumDeviceName.HL5001; Name = DeviceType.ToString(); ModuleList.Add(new Module_32() { DeviceType = EnumDeviceName.HL5001, DataTypeOfSubItem = EnumType.UDINT, IOType = EnumModuleIOType.IN, Name = "HL5001", Header = "Counter600_H_" }); ModuleList.Add(new Module_32() { DeviceType = EnumDeviceName.HL5001, DataTypeOfSubItem = EnumType.UDINT, IOType = EnumModuleIOType.IN, Name = "HL5001", Header = "Counter600_L_" }); }
bool IModel.addModule(string moduleID, string name, string courseID, int credits) { IModule duplicateModule = this.ModuleList.FirstOrDefault(cour => cour.ModuleID == moduleID.Trim()); if (duplicateModule != null) { return(false); } else { try { IModule amodule = UserFactory.GetModule(moduleID, name, courseID, credits); ModuleList.Add(amodule); DataLayer.AddNewModule(amodule); return(true); } catch (System.Exception ex) { return(false); } } }
public ModuleInfo_HL5002() { DeviceType = EnumDeviceName.HL5002; Name = DeviceType.ToString(); ModuleList.Add(new Module_32() { DeviceType = EnumDeviceName.HL5001, DataTypeOfSubItem = EnumType.UDINT, IOType = EnumModuleIOType.IN, Name = "HL5002", Header = "AbsEncodeSSI_", NeedIndex = false, }); ModuleList.Add(new Module_16() { DeviceType = EnumDeviceName.HL5001, DataTypeOfSubItem = EnumType.UINT, IOType = EnumModuleIOType.OUT, Name = "HL5002", Header = "AbsEncode_Cmd_", NeedIndex = false, }); }
public override bool ModLoad() { DataDriver = MyBase.DataDriver; //Load the DB into memory try { if (DataDriver.DBExists("floodserv.db")) { FloodDB = DataDriver.LoadDB("floodserv.db"); if (FloodDB == null) { throw (new Exception("NickServ: Unknown DB Load Error")); // return false; } } else { MakeDB(); } BlackLight.Services.Timers.Timer FSSaveTimer; FSSaveTimer = new BlackLight.Services.Timers.Timer(new TimeSpan(0), new TimeSpan(0, 5, 0), - 1, new Timers.TimedCallBack(TimerSaveDB)); MyBase.timerController.addTimer(FSSaveTimer); MyBase.Core.events.OnFinishedNetBurst += new BlackLight.Services.Core.ServicesCore.ServicesEvents.OnFinishedNetBurstEventHandler(this.OnConnect); } catch (Exception ex) { MyBase.Core.SendLogMessage("FloodServ", "ModLoad", BlackLight.Services.Error.Errors.ERROR, "Exception", "", ex.Message, ex.StackTrace); //show("FloodServ Error " + ex.Message + " " + ex.StackTrace); return false; } mFloodServ = new LocalClient("FloodServ",new MessageCallBack(FloodServCallBack) ,MyBase.Core); ModuleList tModules = new ModuleList(); tModules.Add(MyBase.ModuleManage.Modules["Help"]); MyService = new FloodServService(mFloodServ, MyBase.Core, FloodDB, tModules); mFloodServ.host = "services.com"; mFloodServ.modes = "S"; mFloodServ.realname = "FloodServ"; mFloodServ.time = BlackLight.Services.Converters.Time.GetTS(DateTime.Now); mFloodServ.username = "******"; MyBase.Core.events.onClientConnect += new BlackLight.Services.Core.ServicesCore.ServicesEvents.onClientConnectEventHandler(MyService.OnClientConnect); mFloodServ.Cmds.Add("HELP", new BlackLight.Services.Nodes.CommandCallBack( MyService.FSHelp)); mFloodServ.Cmds.Add("NPWATCH", new BlackLight.Services.Nodes.CommandCallBack( MyService.FSNPWatch)); mFloodServ.Cmds.Add("NSWATCH", new BlackLight.Services.Nodes.CommandCallBack( MyService.FSNSWatch)); mFloodServ.Cmds.Add("REGWATCH", new BlackLight.Services.Nodes.CommandCallBack( MyService.FSRegWatch)); mFloodServ.Cmds.Add("NPSCAN", new BlackLight.Services.Nodes.CommandCallBack( MyService.FSNPScan)); mFloodServ.Cmds.Add("NSSCAN", new BlackLight.Services.Nodes.CommandCallBack( MyService.FSNSScan)); mFloodServ.Cmds.Add("REGSCAN", new BlackLight.Services.Nodes.CommandCallBack( MyService.FSRegScan)); MyBase.Core.LocalClients.AddClient(mFloodServ); return true; }
public override bool ModLoad() { DataDriver = MyBase.DataDriver; //Load the DB into memory try { if (DataDriver.DBExists("nickserv.db")) { NickDB = DataDriver.LoadDB("nickserv.db"); if (NickDB == null) { throw (new Exception("NickServ: Unknown DB Load Error")); // return false; } } else { MakeDB(); } BlackLight.Services.Timers.Timer NSSaveTimer; NSSaveTimer = new BlackLight.Services.Timers.Timer(new TimeSpan(0), new TimeSpan(0, 5, 0), - 1, new Timers.TimedCallBack( TimerSaveDB)); MyBase.timerController.addTimer(NSSaveTimer); MyBase.Core.events.OnFinishedNetBurst += new BlackLight.Services.Core.ServicesCore.ServicesEvents.OnFinishedNetBurstEventHandler(this.OnConnect); } catch (Exception ex) { MyBase.Core.SendLogMessage("Nick", "ModLoad", BlackLight.Services.Error.Errors.ERROR, "Exception", "", ex.Message, ex.StackTrace); //show("NickServ Error " + ex.Message + " " + ex.StackTrace); return false; } mNickServ = new LocalClient("NickServ", new MessageCallBack(NickServCallBack), MyBase.Core); ModuleList tModules = new ModuleList(); tModules.Add(MyBase.ModuleManage.Modules["Help"]); MyService = new NickServService(mNickServ, MyBase.Core, NickDB, tModules); mNickServ.host = "services.com"; mNickServ.modes = "S"; mNickServ.realname = "NickyServ"; mNickServ.time = BlackLight.Services.Converters.Time.GetTS(DateTime.Now); mNickServ.username = "******"; // Client mNickServ.Cmds.Add("REGISTER", new BlackLight.Services.Nodes.CommandCallBack( MyService.NSRegister)); // Client mNickServ.Cmds.Add("IDENTIFY", new BlackLight.Services.Nodes.CommandCallBack( MyService.NSIdentify)); // Client mNickServ.Cmds.Add("GROUP", new BlackLight.Services.Nodes.CommandCallBack( MyService.NSGroup)); // Client mNickServ.Cmds.Add("GLIST", new BlackLight.Services.Nodes.CommandCallBack( MyService.NSGList)); // Client/Oper mNickServ.Cmds.Add("DROP", new BlackLight.Services.Nodes.CommandCallBack( MyService.NSDrop)); // Client mNickServ.Cmds.Add("GHOST", new BlackLight.Services.Nodes.CommandCallBack( MyService.NSGhost)); mNickServ.Cmds.Add("HELP", new BlackLight.Services.Nodes.CommandCallBack( MyService.NSHelp)); // Client/Open - (oper gets more) // bNickServ.Cmds.Add("INFO", AddressOf MyService.NullFunction) // Client // bNickServ.Cmds.Add("LOGOUT", AddressOf MyService.NullFunction) // Client // bNickServ.Cmds.Add("RECOVER", AddressOf MyService.NullFunction) // Client // bNickServ.Cmds.Add("RELEASE", AddressOf MyService.NullFunction) // Client // bNickServ.Cmds.Add("AJOIN", AddressOf MyService.NullFunction) // Client / Oper // bNickServ.Cmds.Add("ACCESS", AddressOf MyService.NullFunction) // Client / Oper // bNickServ.Cmds.Add("ALIST", AddressOf MyService.NullFunction) // Client // bNickServ.Cmds.Add("STATUS", AddressOf MyService.NullFunction) // Client/Oper // bNickServ.Cmds.Add("SET", AddressOf MyService.NullFunction) // Oper // bNickServ.Cmds.Add("FIND", AddressOf MyService.NullFunction) // Oper // bNickServ.Cmds.Add("FORBID", AddressOf MyService.NullFunction) // Oper // bNickServ.Cmds.Add("UNFORBID", AddressOf MyService.NullFunction) // Oper // bNickServ.Cmds.Add("SUSPEND", AddressOf MyService.NullFunction) // Oper // bNickServ.Cmds.Add("UNSUSPEND", AddressOf MyService.NullFunction) // Oper - de oper/dc // bNickServ.Cmds.Add("NOOP", AddressOf MyService.NullFunction) // Oper //bNickServ.Cmds.Add("UNIDENTIFY", AddressOf MyService.NullFunction) MyBase.Core.LocalClients.AddClient(mNickServ); return true; }
public void ParseData() { int dataSizeUnit = 4; PresetSize = BitConverter.ToInt32(PatchData, 0); PresetName = Encoding.UTF8.GetString(PatchData, 4, 16); int numberOfModules = BitConverter.ToInt32(PatchData, 20); int dataPosition = 24; for (int moduleNumber = 0; moduleNumber < numberOfModules; moduleNumber++) { int moduleSize = BitConverter.ToInt32(PatchData, dataPosition) * dataSizeUnit; byte[] moduleData = new byte[moduleSize]; Array.Copy(PatchData, dataPosition, moduleData, 0, moduleSize); ModuleList.Add(new ZoiaModule(moduleData, FormatDictionary)); dataPosition += moduleSize; } int numberOfConnections = BitConverter.ToInt32(PatchData, dataPosition); dataPosition += dataSizeUnit; int connectionSize = 20; for (int connectionNumber = 0; connectionNumber < numberOfConnections; connectionNumber++) { byte[] connectionData = new byte[connectionSize]; Array.Copy(PatchData, dataPosition, connectionData, 0, connectionSize); this.ConnectionList.Add(new ZoiaConnection(connectionData)); dataPosition += connectionSize; } int numberOfPages = BitConverter.ToInt32(PatchData, dataPosition); dataPosition += dataSizeUnit; int pageSize = 16; for (int pageNumber = 0; pageNumber < numberOfPages; pageNumber++) { string pageName = Encoding.UTF8.GetString(PatchData, dataPosition, pageSize); PageList.Add(pageName); dataPosition += pageSize; } int starredParameterCount = BitConverter.ToInt32(PatchData, dataPosition); dataPosition += dataSizeUnit; int starredParameterSize = 4; for (int starredParameterNumber = 0; starredParameterNumber < starredParameterCount; starredParameterNumber++) { byte[] starredParameterData = new byte[starredParameterSize]; Array.Copy(PatchData, dataPosition, starredParameterData, 0, starredParameterSize); StarredParameterList.Add(new ZoiaStarredParameter(starredParameterData)); dataPosition += starredParameterSize; } int moduleColorSize = 4; for (int moduleColorNumber = 0; moduleColorNumber < numberOfModules; moduleColorNumber++) { int moduleColor = BitConverter.ToInt32(PatchData, dataPosition); ModuleList[moduleColorNumber].ModuleColorId = moduleColor; dataPosition += moduleColorSize; } NumberOfBytesParsed = dataPosition; }